aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrhaas <rhaas@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45>2012-05-13 19:03:31 +0000
committerrhaas <rhaas@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45>2012-05-13 19:03:31 +0000
commitccebc7be6a5189a0dd2e45649c2405cec343b4e5 (patch)
tree7294c2ef8c1518f1246ed6e0653904edd32b0ec9 /src
parentca779df8b34bf54cf6141898d90380b2fabf794c (diff)
Consistent atmosphere treatment.
patch by Philipp Moesta git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@321 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45
Diffstat (limited to 'src')
-rw-r--r--src/GRHydro_Con2PrimM_pt.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/GRHydro_Con2PrimM_pt.c b/src/GRHydro_Con2PrimM_pt.c
index 2c3fa68..a26b52d 100644
--- a/src/GRHydro_Con2PrimM_pt.c
+++ b/src/GRHydro_Con2PrimM_pt.c
@@ -45,6 +45,7 @@
#include <complex.h>
#include "cctk.h"
+#include "cctk_Parameters.h"
/* Set this to be 1 if you want debug output */
#define DEBUG_CON2PRIMM (0)
@@ -215,8 +216,10 @@ void CCTK_FCALL CCTK_FNAME(GRHydro_Con2PrimM_pt) (
CCTK_REAL detg = (*det);
CCTK_REAL sqrt_detg = sqrt(detg);
CCTK_REAL inv_sqrt_detg = 1./sqrt_detg;
- CCTK_INT i,j, i_increase ;
-
+ CCTK_INT i,j, i_increase;
+
+ DECLARE_CCTK_PARAMETERS;
+
struct LocGlob lg;
gammaeos = *gamma_eos;
@@ -395,6 +398,14 @@ void CCTK_FCALL CCTK_FNAME(GRHydro_Con2PrimM_pt) (
*vely = g_o_WBsq * ( usy + QdB_o_W*(*By) ) ;
*velz = g_o_WBsq * ( usz + QdB_o_W*(*Bz) ) ;
+ if (*rho <= rho_abs_min*(1.0+GRHydro_atmo_tolerance) ) {
+ *rho = rho_abs_min;
+ *velx = 0.0;
+ *vely = 0.0;
+ *velz = 0.0;
+ *w_lorentz = 1.0;
+ }
+
#if(DEBUG_CON2PRIMM)
fprintf(stdout,"rho = %26.16e \n",*rho );