User: rhaas Date: 2012/05/13 02:03 PM
Modified: /trunk/src/ GRHydro_Con2PrimM_pt.c
Log: Consistent atmosphere treatment.
patch by Philipp Moesta
File Changes:
Directory: /trunk/src/ ======================
File [modified]: GRHydro_Con2PrimM_pt.c Delta lines: +13 -2 =================================================================== --- trunk/src/GRHydro_Con2PrimM_pt.c 2012-05-13 19:01:37 UTC (rev 320) +++ trunk/src/GRHydro_Con2PrimM_pt.c 2012-05-13 19:03:31 UTC (rev 321) @@ -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 @@ 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,7 +398,15 @@ *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 ); fprintf(stdout,"epsilon = %26.16e \n",*epsilon );
commits@lists.einsteintoolkit.org