aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcott <cott@1bdb13ef-5d69-4035-bb54-08abeb3aa7f1>2011-05-18 02:53:28 +0000
committercott <cott@1bdb13ef-5d69-4035-bb54-08abeb3aa7f1>2011-05-18 02:53:28 +0000
commit9ff88a06cc593f10ddaaf706df80d1070fd425e6 (patch)
tree48202110fac02958bf0b35a02c1c8e809dbf8fd4
parent20d2923bf34e88f28bf882017d525689a9f3bda0 (diff)
* set up consistent values of press and eps in
the atmosphere. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/TOVSolver/trunk@128 1bdb13ef-5d69-4035-bb54-08abeb3aa7f1
-rw-r--r--src/tov.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/tov.c b/src/tov.c
index 68e3171..5ec6f1b 100644
--- a/src/tov.c
+++ b/src/tov.c
@@ -773,11 +773,14 @@ void TOV_C_Exact(CCTK_ARGUMENTS)
my_psi4);
rho[i3D] = max_rho;
- /* Set atmosphere according to chosen star */
- if(rho[i3D] <= TOV_Atmosphere[star])
- rho[i3D] = TOV_Atmosphere[star];
eps[i3D] = eps_point[star];
press[i3D] = press_point[star];
+ /* Set atmosphere according to chosen star */
+ if(rho[i3D] <= TOV_Atmosphere[star]) {
+ rho[i3D] = TOV_Atmosphere[star];
+ press[i3D] = TOV_K[star] * pow(rho[i3D],TOV_Gamma[star]);
+ eps[i3D] = press[i3D]/(TOV_Gamma[star]-1.0)/rho[i3D];
+ }
}
else if (CCTK_EQUALS(TOV_Combine_Method, "average"))
@@ -823,8 +826,11 @@ void TOV_C_Exact(CCTK_ARGUMENTS)
}
/* Reset atmosphere according to chosen star */
- if(rho[i3D] <= TOV_Atmosphere[star_i])
+ if(rho[i3D] <= TOV_Atmosphere[star_i]) {
rho[i3D] = TOV_Atmosphere[star_i];
+ press[i3D] = TOV_K[star_i] * pow(rho[i3D],TOV_Gamma[star_i]);
+ eps[i3D] = press[i3D]/(TOV_Gamma[star_i]-1.0)/rho[i3D];
+ }
}
if (TOV_Conformal_Flat_Three_Metric)