diff options
author | rhaas <rhaas@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45> | 2013-07-06 18:11:12 +0000 |
---|---|---|
committer | rhaas <rhaas@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45> | 2013-07-06 18:11:12 +0000 |
commit | 669d5b37c19d16380ba6c63a7195cbcea8d08f35 (patch) | |
tree | 43c35e9b941be21d80ba34711d3bbfe7825b3b6d /src/GRHydro_Con2PrimM_ptee.c | |
parent | fcbaf698714e9594ef35fbba18530a4a1ab164ba (diff) |
GRHydro: add grid function for sqrt(detg)
* add new 1 tl grid function sdetg that stores the sqrt of the determinent
of the 3-metric.
* replace lots of re-computation of det by use of this grid function
From: Christian Ott <cott@bethe.tapir.caltech.edu>
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@555 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45
Diffstat (limited to 'src/GRHydro_Con2PrimM_ptee.c')
-rw-r--r-- | src/GRHydro_Con2PrimM_ptee.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/GRHydro_Con2PrimM_ptee.c b/src/GRHydro_Con2PrimM_ptee.c index fcf639a..59ce313 100644 --- a/src/GRHydro_Con2PrimM_ptee.c +++ b/src/GRHydro_Con2PrimM_ptee.c @@ -99,7 +99,7 @@ void CCTK_FCALL CCTK_FNAME(GRHydro_Con2PrimM_ptee) ( CCTK_REAL *gyy, CCTK_REAL *gyz, CCTK_REAL *gzz, CCTK_REAL *uxx, CCTK_REAL *uxy, CCTK_REAL *uxz, CCTK_REAL *uyy, CCTK_REAL *uyz, CCTK_REAL *uzz, - CCTK_REAL *det, + CCTK_REAL *sdet, CCTK_INT *epsnegative, CCTK_REAL *retval) ; @@ -195,7 +195,7 @@ void CCTK_FCALL CCTK_FNAME(GRHydro_Con2PrimM_ptee) ( CCTK_REAL *gyy, CCTK_REAL *gyz, CCTK_REAL *gzz, CCTK_REAL *uxx, CCTK_REAL *uxy, CCTK_REAL *uxz, CCTK_REAL *uyy, CCTK_REAL *uyz, CCTK_REAL *uzz, - CCTK_REAL *det, + CCTK_REAL *sdet, CCTK_INT *epsnegative, CCTK_REAL *retval) @@ -207,8 +207,7 @@ void CCTK_FCALL CCTK_FNAME(GRHydro_Con2PrimM_ptee) ( CCTK_REAL QdotB; CCTK_REAL rho0,u,p,w,gammasq,gamma,W,vsq; CCTK_REAL g_o_WBsq, QdB_o_W; - CCTK_REAL detg = (*det); - CCTK_REAL sqrt_detg = sqrt(detg); + CCTK_REAL sqrt_detg = *sdet; CCTK_REAL inv_sqrt_detg = 1./sqrt_detg; CCTK_REAL rho_gm1; CCTK_REAL utsq; @@ -257,7 +256,7 @@ void CCTK_FCALL CCTK_FNAME(GRHydro_Con2PrimM_ptee) ( fprintf(stdout," *uyy = %26.16e \n", *uyy ); fprintf(stdout," *uyz = %26.16e \n", *uyz ); fprintf(stdout," *uzz = %26.16e \n", *uzz ); - fprintf(stdout," *det = %26.16e \n", *det ); + fprintf(stdout," *sdet = %26.16e \n", *sdet ); fprintf(stdout," *epsnegative = %10d \n", *epsnegative ); fprintf(stdout," *retval = %26.16e \n", *retval ); fflush(stdout); |