From 9565258e85778f68e55cf346399ba52a63687022 Mon Sep 17 00:00:00 2001 From: knarf Date: Mon, 8 Mar 2010 16:12:49 +0000 Subject: patch from Christian: add entropy and temperature git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinBase/HydroBase/trunk@23 57fe0bb3-ccba-405f-9b23-de0201f165b7 --- interface.ccl | 4 +++- param.ccl | 15 +++++++++++++++ schedule.ccl | 24 ++++++++++++++++++++++++ src/Initialisation.c | 45 ++++++++++++++++++++++++++++++++++++++++++++- 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= 1) { +#pragma omp parallel for + for (int i=0; i= 2) { +#pragma omp parallel for + for (int i=0; i= 2) { +#pragma omp parallel for + for (int i=0; i= 3) { #pragma omp parallel for for (int i=0; i= 3) { +#pragma omp parallel for + for (int i=0; i= 3) { +#pragma omp parallel for + for (int i=0; i