aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknarf <knarf@57fe0bb3-ccba-405f-9b23-de0201f165b7>2010-03-08 16:12:49 +0000
committerknarf <knarf@57fe0bb3-ccba-405f-9b23-de0201f165b7>2010-03-08 16:12:49 +0000
commit9565258e85778f68e55cf346399ba52a63687022 (patch)
tree3dc5be82c548d94b8c1bfc0136634a64d67b35f9
parent284f26cffee4e51ec42b9b47b1bf615232b269ed (diff)
patch from Christian: add entropy and temperature
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinBase/HydroBase/trunk@23 57fe0bb3-ccba-405f-9b23-de0201f165b7
-rwxr-xr-xinterface.ccl4
-rwxr-xr-xparam.ccl15
-rwxr-xr-xschedule.ccl24
-rw-r--r--src/Initialisation.c45
4 files changed, 86 insertions, 2 deletions
diff --git a/interface.ccl b/interface.ccl
index 8c5d143..51d2730 100755
--- a/interface.ccl
+++ b/interface.ccl
@@ -35,7 +35,9 @@ CCTK_REAL eps type = GF Timelevels = 3 tags='ProlongationParameter="HydroBas
CCTK_REAL vel[3] type = GF Timelevels = 3 tags='ProlongationParameter="HydroBase::prolongation_type" tensortypealias="U" interpolator="matter"' "velocity v^i"
-CCTK_REAL Y_e type = GF Timelevels = 3 tags='ProlongationParameter="HydroBase::prolongation_type" tensortypealias="Scalar" interpolator="matter"' "electron fraction"
+CCTK_REAL Y_e type = GF Timelevels = 3 tags='ProlongationParameter="HydroBase::prolongation_type" tensortypealias="Scalar" interpolator="matter"' "Electron Fraction"
+CCTK_REAL temperature type = GF Timelevels = 3 tags='ProlongationParameter="HydroBase::prolongation_type" tensortypealias="Scalar" interpolator="matter"' "Temperature [MeV]"
+CCTK_REAL entropy type = GF Timelevels = 3 tags='ProlongationParameter="HydroBase::prolongation_type" tensortypealias="Scalar" interpolator="matter"' "Specific Entropy [k_b/baryon]"
CCTK_REAL Bvec[3] type = GF Timelevels = 3 tags='ProlongationParameter="HydroBase::prolongation_type" tensortypealias="U" interpolator="matter"' "Magnetic field components B^i"
diff --git a/param.ccl b/param.ccl
index 5add743..89e3e5f 100755
--- a/param.ccl
+++ b/param.ccl
@@ -58,3 +58,18 @@ BOOLEAN hydro_excision "Turn on of off (default) storage for hydro excision"
{
} "no"
+# Settings for temperature and electron fraction
+
+KEYWORD initial_temperature "Initial value for temperature"
+{
+ "none" :: "inactive"
+ "zero" :: "initially set to zero"
+} "none"
+
+KEYWORD initial_entropy "Initial value for entropy"
+{
+ "none" :: "inactive"
+ "zero" :: "initially set to zero"
+} "none"
+
+
diff --git a/schedule.ccl b/schedule.ccl
index 4799da3..8579a96 100755
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -14,6 +14,14 @@ if (timelevels == 1)
{
STORAGE: Bvec[1]
}
+ if (!CCTK_EQUALS(initial_temperature, "none"))
+ {
+ STORAGE: temperature[1]
+ }
+ if (!CCTK_EQUALS(initial_entropy, "none"))
+ {
+ STORAGE: entropy[1]
+ }
}
else if (timelevels == 2)
{
@@ -29,6 +37,14 @@ else if (timelevels == 2)
{
STORAGE: Bvec[2]
}
+ if (!CCTK_EQUALS(initial_temperature, "none"))
+ {
+ STORAGE: temperature[2]
+ }
+ if (!CCTK_EQUALS(initial_entropy, "none"))
+ {
+ STORAGE: entropy[2]
+ }
}
else if (timelevels == 3)
{
@@ -44,6 +60,14 @@ else if (timelevels == 3)
{
STORAGE: Bvec[3]
}
+ if (!CCTK_EQUALS(initial_temperature, "none"))
+ {
+ STORAGE: temperature[3]
+ }
+ if (!CCTK_EQUALS(initial_entropy, "none"))
+ {
+ STORAGE: entropy[3]
+ }
}
if (hydro_excision)
diff --git a/src/Initialisation.c b/src/Initialisation.c
index 3391fde..7e79528 100644
--- a/src/Initialisation.c
+++ b/src/Initialisation.c
@@ -20,6 +20,20 @@ void HydroBase_Zero (CCTK_ARGUMENTS)
eps[i ] = 0.0;
}
+ if (CCTK_ActiveTimeLevels(cctkGH, "HydroBase::temperature") >= 1) {
+#pragma omp parallel for
+ for (int i=0; i<np; ++i) {
+ temperature[i ] = 0.0;
+ }
+ }
+
+ if (CCTK_ActiveTimeLevels(cctkGH, "HydroBase::entropy") >= 1) {
+#pragma omp parallel for
+ for (int i=0; i<np; ++i) {
+ entropy[i ] = 0.0;
+ }
+ }
+
if (CCTK_EQUALS (initial_data_setup_method, "init_some_levels") ||
CCTK_EQUALS (initial_data_setup_method, "init_single_levels"))
{
@@ -38,7 +52,21 @@ void HydroBase_Zero (CCTK_ARGUMENTS)
eps_p[i ] = 0.0;
}
}
-
+
+ if (CCTK_ActiveTimeLevels(cctkGH, "HydroBase::temperature") >= 2) {
+#pragma omp parallel for
+ for (int i=0; i<np; ++i) {
+ temperature_p[i ] = 0.0;
+ }
+ }
+
+ if (CCTK_ActiveTimeLevels(cctkGH, "HydroBase::entropy") >= 2) {
+#pragma omp parallel for
+ for (int i=0; i<np; ++i) {
+ entropy_p[i ] = 0.0;
+ }
+ }
+
if (CCTK_ActiveTimeLevels(cctkGH, "HydroBase::rho") >= 3) {
#pragma omp parallel for
for (int i=0; i<np; ++i) {
@@ -54,6 +82,21 @@ void HydroBase_Zero (CCTK_ARGUMENTS)
CCTK_WARN (CCTK_WARN_ABORT,
"Too many active time levels for HydroBase variables");
}
+
+ if (CCTK_ActiveTimeLevels(cctkGH, "HydroBase::temperature") >= 3) {
+#pragma omp parallel for
+ for (int i=0; i<np; ++i) {
+ temperature_p_p[i ] = 0.0;
+ }
+ }
+
+ if (CCTK_ActiveTimeLevels(cctkGH, "HydroBase::entropy") >= 3) {
+#pragma omp parallel for
+ for (int i=0; i<np; ++i) {
+ entropy_p_p[i ] = 0.0;
+ }
+ }
+
}
else