[Commits] [svn:einsteintoolkit] GRHydro/trunk/src/ (Rev. 427)
rhaas at tapir.caltech.edu
rhaas at tapir.caltech.edu
Thu Oct 25 11:37:02 CDT 2012
User: rhaas
Date: 2012/10/25 11:37 AM
Modified:
/trunk/src/
GRHydro_Con2PrimM_pt.c, GRHydro_Con2PrimM_pt_EOSOmni.c, make.code.defn
Log:
GRHydro: Unify function interface for GRHydro_Con2PrimM_pt.c and GRHydro_Con2PrimM_pt_EOSOmni.c
* Interestingly Cactus doesn't complain about the function interface in
interface.ccl. It has the old set of arguments for that function and declare it
as written in Fortran instead of C.
* Cylindrical explosion works again with GRHydro_Con2PrimM_pt.c routine. You
can just swap both routines in make.code.defn
From: Bruno Coutinho Mundim <bcmsma at astro.rit.edu>
File Changes:
Directory: /trunk/src/
======================
File [modified]: GRHydro_Con2PrimM_pt.c
Delta lines: +7 -3
===================================================================
--- trunk/src/GRHydro_Con2PrimM_pt.c 2012-10-25 16:37:00 UTC (rev 426)
+++ trunk/src/GRHydro_Con2PrimM_pt.c 2012-10-25 16:37:02 UTC (rev 427)
@@ -104,12 +104,13 @@
return((gammaeos-1.)*(w - rho0)/gammaeos) ;
}
-
void CCTK_FCALL CCTK_FNAME(GRHydro_Con2PrimM_pt) (
- CCTK_INT *handle, CCTK_REAL *gamma_eos,
+ CCTK_INT *handle, CCTK_INT *keytemp, CCTK_REAL *prec,
+ CCTK_REAL *gamma_eos,
CCTK_REAL *dens_in,
CCTK_REAL *sx_in, CCTK_REAL *sy_in, CCTK_REAL *sz_in,
CCTK_REAL *tau_in, CCTK_REAL *Bconsx_in, CCTK_REAL *Bconsy_in, CCTK_REAL *Bconsz_in,
+ CCTK_REAL *y_e_in, CCTK_REAL *temp_in,
CCTK_REAL *rho,
CCTK_REAL *velx, CCTK_REAL *vely, CCTK_REAL *velz,
CCTK_REAL *epsilon, CCTK_REAL *pressure,
@@ -185,12 +186,15 @@
( used to be 5 -> failure: rho,uu <= 0 but now sets epsnegative to non-zero )
**********************************************************************************/
+
void CCTK_FCALL CCTK_FNAME(GRHydro_Con2PrimM_pt) (
- CCTK_INT *handle, CCTK_REAL *gamma_eos,
+ CCTK_INT *handle, CCTK_INT *keytemp, CCTK_REAL *prec,
+ CCTK_REAL *gamma_eos,
CCTK_REAL *dens_in,
CCTK_REAL *sx_in, CCTK_REAL *sy_in, CCTK_REAL *sz_in,
CCTK_REAL *tau_in,
CCTK_REAL *Bconsx_in, CCTK_REAL *Bconsy_in, CCTK_REAL *Bconsz_in,
+ CCTK_REAL *y_e_in, CCTK_REAL* temp_in,
CCTK_REAL *rho,
CCTK_REAL *velx, CCTK_REAL *vely, CCTK_REAL *velz,
CCTK_REAL *epsilon, CCTK_REAL *pressure,
File [modified]: GRHydro_Con2PrimM_pt_EOSOmni.c
Delta lines: +9 -1
===================================================================
--- trunk/src/GRHydro_Con2PrimM_pt_EOSOmni.c 2012-10-25 16:37:00 UTC (rev 426)
+++ trunk/src/GRHydro_Con2PrimM_pt_EOSOmni.c 2012-10-25 16:37:02 UTC (rev 427)
@@ -369,7 +369,12 @@
CCTK_REAL dum1,dum2;
p = pressure_rho0_eps_eosomni(rho0,*epsilon,&dum1,&dum2,&eosvars) ; // EOSOMNI
- // p = pressure_rho0_u(rho0,u,gammaeos) ; // EOS
+ CCTK_REAL p2 = pressure_rho0_u(rho0,u,gammaeos) ; // EOS
+
+ if (fabs(p-p2) > 1.0e-8){
+ printf("p = %20.16g, p2 = %20.16g, delta pressure = %20.16g \n",p, p2, p-p2);
+ }
+
w = rho0 + u + p ;
W_last = w*gammasq ;
@@ -406,6 +411,9 @@
if( ((*retval) != 0.) || (W == FAIL_VAL) ) {
*retval = *retval*100.+1.;
fprintf(stdout," *retval = %26.16e \n", *retval );
+ fprintf(stdout," x_3d[%d] = %26.16e \n", 0, x_3d[0] );
+ fprintf(stdout," x_3d[%d] = %26.16e \n", 1, x_3d[1] );
+ fprintf(stdout," x_3d[%d] = %26.16e \n", 2, x_3d[2] );
return;
}
else{
File [modified]: make.code.defn
Delta lines: +1 -1
===================================================================
--- trunk/src/make.code.defn 2012-10-25 16:37:00 UTC (rev 426)
+++ trunk/src/make.code.defn 2012-10-25 16:37:02 UTC (rev 427)
@@ -45,7 +45,7 @@
GRHydro_EoSChangeGamma.F90 \
GRHydro_Tmunu.F90 \
GRHydro_Con2PrimM.F90 \
- GRHydro_Con2PrimM_pt_EOSOmni.c \
+ GRHydro_Con2PrimM_pt.c \
GRHydro_Con2PrimM_polytype_pt.c \
GRHydro_EigenproblemM.F90 \
GRHydro_FluxM.F90 \
More information about the Commits
mailing list