[Commits] [svn:einsteintoolkit] GRHydro/branches/divclean/src/ (Rev. 238)
bcmsma at astro.rit.edu
bcmsma at astro.rit.edu
Wed Apr 27 19:37:56 CDT 2011
User: bmundim
Date: 2011/04/27 07:37 PM
Modified:
/branches/divclean/src/
GRHydro_Con2PrimM.F90, GRHydro_Con2PrimM_polytype_pt.c, GRHydro_Con2PrimM_pt.c, GRHydro_InterfacesM.h
Log:
Change interface for Con2Prim routines to reflect the
new Bcons field.
File Changes:
Directory: /branches/divclean/src/
==================================
File [modified]: GRHydro_Con2PrimM.F90
Delta lines: +40 -47
===================================================================
--- branches/divclean/src/GRHydro_Con2PrimM.F90 2011-04-27 23:05:18 UTC (rev 237)
+++ branches/divclean/src/GRHydro_Con2PrimM.F90 2011-04-28 00:37:56 UTC (rev 238)
@@ -129,10 +129,6 @@
if(evolve_Y_e.ne.0) then
Y_e(i,j,k) = Y_e_con(i,j,k) / dens(i,j,k)
endif
-
- Bvec(i,j,k,1) = Bcons(i,j,k,1)/sqrt(det)
- Bvec(i,j,k,2) = Bcons(i,j,k,2)/sqrt(det)
- Bvec(i,j,k,3) = Bcons(i,j,k,3)/sqrt(det)
if ( dens(i,j,k) .le. sqrt(det)*GRHydro_rho_min*(1.d0+GRHydro_atmo_tolerance) ) then
@@ -166,11 +162,11 @@
if(evolve_temper.eq.0) then
call GRHydro_Con2PrimM_pt(GRHydro_eos_handle, local_gam, dens(i,j,k), &
scon(i,j,k,1),scon(i,j,k,2),scon(i,j,k,3), tau(i,j,k), &
- rho(i,j,k),&
- vel(i,j,k,1),vel(i,j,k,2),vel(i,j,k,3),eps(i,j,k),press(i,j,k),w_lorentz(i,j,k),&
+ Bcons(i,j,k,1), Bcons(i,j,k,2), Bcons(i,j,k,3), rho(i,j,k),&
+ vel(i,j,k,1),vel(i,j,k,2),vel(i,j,k,3),eps(i,j,k),press(i,j,k),&
+ Bvec(i,j,k,1), Bvec(i,j,k,2), Bvec(i,j,k,3),b2, w_lorentz(i,j,k),&
gxx(i,j,k),gxy(i,j,k),gxz(i,j,k),gyy(i,j,k),gyz(i,j,k),gzz(i,j,k), &
uxx,uxy,uxz,uyy,uyz,uzz,det, &
- Bvec(i,j,k,1), Bvec(i,j,k,2),Bvec(i,j,k,3),b2,&
epsnegative,GRHydro_C2P_failed(i,j,k))
else
stop "Please implement finite T con2prim routine in MHD part!"
@@ -242,13 +238,13 @@
call GRHydro_Con2PrimM_Polytype_pt(GRHydro_eos_handle, local_pgam, dens(i,j,k), &
scon(i,j,k,1),scon(i,j,k,2),scon(i,j,k,3), sc, &
- rho(i,j,k),&
- vel(i,j,k,1),vel(i,j,k,2),vel(i,j,k,3),eps(i,j,k),press(i,j,k),w_lorentz(i,j,k),&
+ Bcons(i,j,k,1), Bcons(i,j,k,2), Bcons(i,j,k,3), rho(i,j,k),&
+ vel(i,j,k,1),vel(i,j,k,2),vel(i,j,k,3),eps(i,j,k),press(i,j,k),&
+ Bvec(i,j,k,1), Bvec(i,j,k,2), Bvec(i,j,k,3),b2, w_lorentz(i,j,k),&
gxx(i,j,k),gxy(i,j,k),gxz(i,j,k),gyy(i,j,k),gyz(i,j,k),gzz(i,j,k), &
uxx,uxy,uxz,uyy,uyz,uzz,det, &
- Bvec(i,j,k,1), Bvec(i,j,k,2),Bvec(i,j,k,3),b2,&
epsnegative,GRHydro_C2P_failed(i,j,k))
-
+
#endif
end if
@@ -297,7 +293,7 @@
uxxr, uxyr, uxzr, uyyr, uyzr, uzzr, pmin, epsmin
CCTK_REAL :: gxxl,gxyl,gxzl,gyyl,gyzl,gzzl,avg_detl,&
gxxr,gxyr,gxzr,gyyr,gyzr,gzzr,avg_detr
- CCTK_REAL :: b2minus, b2plus, local_gam, local_pgam,local_K,sc
+ CCTK_REAL :: b2minus, b2plus, local_gam, local_pgam,local_K,scminus,scplus
CCTK_INT :: epsnegative
character(len=100) warnline
@@ -390,11 +386,11 @@
call GRHydro_Con2PrimM_pt(GRHydro_eos_handle, local_gam,densminus(i,j,k), &
sxminus(i,j,k),syminus(i,j,k),szminus(i,j,k), tauminus(i,j,k), &
- rhominus(i,j,k),&
- velxminus(i,j,k),velyminus(i,j,k),velzminus(i,j,k),epsminus(i,j,k),pressminus(i,j,k),w_lorentzminus(i,j,k),&
+ Bconsxminus(i,j,k), Bconsyminus(i,j,k), Bconszminus(i,j,k), rhominus(i,j,k),&
+ velxminus(i,j,k),velyminus(i,j,k),velzminus(i,j,k),epsminus(i,j,k),pressminus(i,j,k),&
+ Bvecxminus(i,j,k), Bvecyminus(i,j,k), Bveczminus(i,j,k),b2minus, w_lorentzminus(i,j,k),&
gxxl,gxyl,gxzl,gyyl,gyzl,gzzl, &
uxxl,uxyl,uxzl,uyyl,uyzl,uzzl,avg_detl, &
- Bvecxminus(i,j,k), Bvecyminus(i,j,k),Bveczminus(i,j,k),b2minus,&
epsnegative,GRHydro_C2P_failed(i,j,k))
if (epsnegative .ne. 0) then
@@ -410,16 +406,17 @@
call EOS_Omni_press(GRHydro_polytrope_handle,keytemp,GRHydro_eos_rf_prec,n,&
xrho,1.0d0,xtemp,xye,xpress,keyerr,anyerr)
local_pgam=log(xpress/local_K)/log(xrho)
- sc = local_K*densminus(i,j,k)
+ scminus = local_K*densminus(i,j,k)
call GRHydro_Con2PrimM_Polytype_pt(GRHydro_eos_handle, local_pgam, densminus(i,j,k), &
- sxminus(i,j,k),syminus(i,j,k),szminus(i,j,k), sc, &
- rhominus(i,j,k),&
- velxminus(i,j,k),velyminus(i,j,k),velzminus(i,j,k),epsminus(i,j,k),pressminus(i,j,k),w_lorentzminus(i,j,k),&
+ sxminus(i,j,k),syminus(i,j,k),szminus(i,j,k), scminus, &
+ Bconsxminus(i,j,k), Bconsyminus(i,j,k), Bconszminus(i,j,k), rhominus(i,j,k),&
+ velxminus(i,j,k),velyminus(i,j,k),velzminus(i,j,k),epsminus(i,j,k),pressminus(i,j,k),&
+ Bvecxminus(i,j,k), Bvecyminus(i,j,k), Bveczminus(i,j,k),b2minus, w_lorentzminus(i,j,k),&
gxxl,gxyl,gxzl,gyyl,gyzl,gzzl, &
uxxl,uxyl,uxzl,uyyl,uyzl,uzzl,avg_detl, &
- Bvecxminus(i,j,k), Bvecyminus(i,j,k),Bveczminus(i,j,k),b2minus,&
epsnegative,GRHydro_C2P_failed(i,j,k))
+
end if
if (epsminus(i,j,k) .lt. 0.0d0) then
@@ -446,13 +443,13 @@
epsnegative = 0
call GRHydro_Con2PrimM_pt(GRHydro_eos_handle, local_gam, densplus(i,j,k), &
sxplus(i,j,k),syplus(i,j,k),szplus(i,j,k), tauplus(i,j,k),&
- rhoplus(i,j,k),&
- velxplus(i,j,k),velyplus(i,j,k),velzplus(i,j,k),epsplus(i,j,k),pressplus(i,j,k),w_lorentzplus(i,j,k),&
+ Bconsxplus(i,j,k), Bconsyplus(i,j,k), Bconszplus(i,j,k), rhoplus(i,j,k),&
+ velxplus(i,j,k),velyplus(i,j,k),velzplus(i,j,k),epsplus(i,j,k),pressplus(i,j,k),&
+ Bvecxplus(i,j,k), Bvecyplus(i,j,k), Bveczplus(i,j,k),b2plus, w_lorentzplus(i,j,k),&
gxxr,gxyr,gxzr,gyyr,gyzr,gzzr, &
uxxr,uxyr,uxzr,uyyr,uyzr,uzzr,avg_detr, &
- Bvecxplus(i,j,k), Bvecyplus(i,j,k),Bveczplus(i,j,k),b2plus,&
epsnegative,GRHydro_C2P_failed(i,j,k))
-
+
if (epsnegative .ne. 0) then
!$OMP CRITICAL
call CCTK_WARN(GRHydro_NaN_verbose+2, 'Specific internal energy just went below 0, trying polytype!!')
@@ -466,15 +463,15 @@
call EOS_Omni_press(GRHydro_polytrope_handle,keytemp,GRHydro_eos_rf_prec,n,&
xrho,1.0d0,xtemp,xye,xpress,keyerr,anyerr)
local_pgam=log(xpress/local_K)/log(xrho)
- sc = local_K*densplus(i,j,k)
+ scplus = local_K*densplus(i,j,k)
call GRHydro_Con2PrimM_Polytype_pt(GRHydro_eos_handle, local_pgam, densplus(i,j,k), &
- sxplus(i,j,k),syplus(i,j,k),szplus(i,j,k), sc,&
- rhoplus(i,j,k),&
- velxplus(i,j,k),velyplus(i,j,k),velzplus(i,j,k),epsplus(i,j,k),pressplus(i,j,k),w_lorentzplus(i,j,k),&
+ sxplus(i,j,k),syplus(i,j,k),szplus(i,j,k), scplus,&
+ Bconsxplus(i,j,k), Bconsyplus(i,j,k), Bconszplus(i,j,k), rhoplus(i,j,k),&
+ velxplus(i,j,k),velyplus(i,j,k),velzplus(i,j,k),epsplus(i,j,k),pressplus(i,j,k),&
+ Bvecxplus(i,j,k), Bvecyplus(i,j,k), Bveczplus(i,j,k),b2plus, w_lorentzplus(i,j,k),&
gxxr,gxyr,gxzr,gyyr,gyzr,gzzr, &
uxxr,uxyr,uxzr,uyyr,uyzr,uzzr,avg_detr, &
- Bvecxplus(i,j,k), Bvecyplus(i,j,k),Bveczplus(i,j,k),b2plus,&
epsnegative,GRHydro_C2P_failed(i,j,k))
end if
@@ -602,10 +599,6 @@
Y_e(i,j,k) = Y_e_con(i,j,k) / dens(i,j,k)
endif
- Bvec(i,j,k,1) = Bcons(i,j,k,1)/sqrt(det)
- Bvec(i,j,k,2) = Bcons(i,j,k,2)/sqrt(det)
- Bvec(i,j,k,3) = Bcons(i,j,k,3)/sqrt(det)
-
xrho=10.0d0
call EOS_Omni_press(GRHydro_polytrope_handle,keytemp,GRHydro_eos_rf_prec,n,&
1.d0,1.0d0,xtemp,xye,xpress,keyerr,anyerr)
@@ -617,14 +610,14 @@
sc = local_K*dens(i,j,k)
call GRHydro_Con2PrimM_Polytype_pt(GRHydro_eos_handle, local_pgam, dens(i,j,k), &
- scon(i,j,k,1),scon(i,j,k,2),scon(i,j,k,3), sc,&
- rho(i,j,k),&
- vel(i,j,k,1),vel(i,j,k,2),vel(i,j,k,3),eps(i,j,k),press(i,j,k),w_lorentz(i,j,k),&
- gxx(i,j,k),gxy(i,j,k),gxz(i,j,k),gyy(i,j,k),gyz(i,j,k),gzz(i,j,k), &
- uxx,uxy,uxz,uyy,uyz,uzz,det, &
- Bvec(i,j,k,1), Bvec(i,j,k,2),Bvec(i,j,k,3),b2,&
- epsnegative,GRHydro_C2P_failed(i,j,k))
-
+ scon(i,j,k,1),scon(i,j,k,2),scon(i,j,k,3), sc, &
+ Bcons(i,j,k,1), Bcons(i,j,k,2), Bcons(i,j,k,3), rho(i,j,k),&
+ vel(i,j,k,1),vel(i,j,k,2),vel(i,j,k,3),eps(i,j,k),press(i,j,k),&
+ Bvec(i,j,k,1), Bvec(i,j,k,2), Bvec(i,j,k,3),b2, w_lorentz(i,j,k),&
+ gxx(i,j,k),gxy(i,j,k),gxz(i,j,k),gyy(i,j,k),gyz(i,j,k),gzz(i,j,k), &
+ uxx,uxy,uxz,uyy,uyz,uzz,det, &
+ epsnegative,GRHydro_C2P_failed(i,j,k))
+
end do
end do
end do
@@ -730,20 +723,20 @@
call GRHydro_Con2PrimM_Polytype_pt(GRHydro_eos_handle, local_pgam,densminus(i,j,k), &
sxminus(i,j,k),syminus(i,j,k),szminus(i,j,k), scminus,&
- rhominus(i,j,k),&
- velxminus(i,j,k),velyminus(i,j,k),velzminus(i,j,k),epsminus(i,j,k),pressminus(i,j,k),w_lorentzminus(i,j,k),&
+ Bconsxminus(i,j,k), Bconsyminus(i,j,k), Bconszminus(i,j,k), rhominus(i,j,k),&
+ velxminus(i,j,k),velyminus(i,j,k),velzminus(i,j,k),epsminus(i,j,k),pressminus(i,j,k),&
+ Bvecxminus(i,j,k), Bvecyminus(i,j,k), Bveczminus(i,j,k),b2minus, w_lorentzminus(i,j,k),&
gxxl,gxyl,gxzl,gyyl,gyzl,gzzl, &
uxxl,uxyl,uxzl,uyyl,uyzl,uzzl,avg_detl, &
- Bvecxminus(i,j,k), Bvecyminus(i,j,k),Bveczminus(i,j,k),b2minus,&
epsnegative,GRHydro_C2P_failed(i,j,k))
call GRHydro_Con2PrimM_Polytype_pt(GRHydro_eos_handle, local_pgam,densplus(i,j,k), &
sxplus(i,j,k),syplus(i,j,k),szplus(i,j,k), scplus,&
- rhoplus(i,j,k),&
- velxplus(i,j,k),velyplus(i,j,k),velzplus(i,j,k),epsplus(i,j,k),pressplus(i,j,k),w_lorentzplus(i,j,k),&
+ Bconsxplus(i,j,k), Bconsyplus(i,j,k), Bconszplus(i,j,k), rhoplus(i,j,k),&
+ velxplus(i,j,k),velyplus(i,j,k),velzplus(i,j,k),epsplus(i,j,k),pressplus(i,j,k),&
+ Bvecxplus(i,j,k), Bvecyplus(i,j,k),Bveczplus(i,j,k),b2plus,w_lorentzplus(i,j,k),&
gxxr,gxyr,gxzr,gyyr,gyzr,gzzr, &
uxxr,uxyr,uxzr,uyyr,uyzr,uzzr,avg_detr, &
- Bvecxplus(i,j,k), Bvecyplus(i,j,k),Bveczplus(i,j,k),b2plus,&
epsnegative,GRHydro_C2P_failed(i,j,k))
end do
end do
File [modified]: GRHydro_Con2PrimM_polytype_pt.c
Delta lines: +17 -8
===================================================================
--- branches/divclean/src/GRHydro_Con2PrimM_polytype_pt.c 2011-04-27 23:05:18 UTC (rev 237)
+++ branches/divclean/src/GRHydro_Con2PrimM_polytype_pt.c 2011-04-28 00:37:56 UTC (rev 238)
@@ -103,17 +103,18 @@
CCTK_REAL *dens_in,
CCTK_REAL *sx_in, CCTK_REAL *sy_in, CCTK_REAL *sz_in,
CCTK_REAL *sc_in,
+ CCTK_REAL *Bconsx_in, CCTK_REAL *Bconsy_in, CCTK_REAL *Bconsz_in,
CCTK_REAL *rho,
CCTK_REAL *velx, CCTK_REAL *vely, CCTK_REAL *velz,
CCTK_REAL *epsilon, CCTK_REAL *pressure,
+ CCTK_REAL *Bx, CCTK_REAL *By, CCTK_REAL *Bz,
+ CCTK_REAL *bsq,
CCTK_REAL *w_lorentz,
CCTK_REAL *gxx, CCTK_REAL *gxy, CCTK_REAL *gxz,
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 *Bx, CCTK_REAL *By, CCTK_REAL *Bz,
- CCTK_REAL *bsq,
CCTK_INT *epsnegative,
CCTK_REAL *retval);
@@ -184,17 +185,18 @@
CCTK_REAL *dens_in,
CCTK_REAL *sx_in, CCTK_REAL *sy_in, CCTK_REAL *sz_in,
CCTK_REAL *sc_in,
+ CCTK_REAL *Bconsx_in, CCTK_REAL *Bconsy_in, CCTK_REAL *Bconsz_in,
CCTK_REAL *rho,
CCTK_REAL *velx, CCTK_REAL *vely, CCTK_REAL *velz,
CCTK_REAL *epsilon, CCTK_REAL *pressure,
+ CCTK_REAL *Bx, CCTK_REAL *By, CCTK_REAL *Bz,
+ CCTK_REAL *bsq,
CCTK_REAL *w_lorentz,
CCTK_REAL *gxx, CCTK_REAL *gxy, CCTK_REAL *gxz,
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 *Bx, CCTK_REAL *By, CCTK_REAL *Bz,
- CCTK_REAL *bsq,
CCTK_INT *epsnegative,
CCTK_REAL *retval)
@@ -228,12 +230,19 @@
fprintf(stdout," *sy = %26.16e \n", *sy_in );
fprintf(stdout," *sz = %26.16e \n", *sz_in );
fprintf(stdout," *Sc = %26.16e \n", *sc_in );
+ fprintf(stdout," *Bconsx = %26.16e \n", *Bconsx_in );
+ fprintf(stdout," *Bconsy = %26.16e \n", *Bconsy_in );
+ fprintf(stdout," *Bconsz = %26.16e \n", *Bconsz_in );
fprintf(stdout," *rho = %26.16e \n", *rho );
fprintf(stdout," *velx = %26.16e \n", *velx );
fprintf(stdout," *vely = %26.16e \n", *vely );
fprintf(stdout," *velz = %26.16e \n", *velz );
fprintf(stdout," *epsilon = %26.16e \n", *epsilon );
fprintf(stdout," *pressure = %26.16e \n", *pressure );
+ fprintf(stdout," *Bx = %26.16e \n", *Bx );
+ fprintf(stdout," *By = %26.16e \n", *By );
+ fprintf(stdout," *Bz = %26.16e \n", *Bz );
+ fprintf(stdout," *bsq = %26.16e \n", *bsq );
fprintf(stdout," *w_lorentz = %26.16e \n", *w_lorentz );
fprintf(stdout," *gxx = %26.16e \n", *gxx );
fprintf(stdout," *gxy = %26.16e \n", *gxy );
@@ -248,10 +257,6 @@
fprintf(stdout," *uyz = %26.16e \n", *uyz );
fprintf(stdout," *uzz = %26.16e \n", *uzz );
fprintf(stdout," *det = %26.16e \n", *det );
- fprintf(stdout," *Bx = %26.16e \n", *Bx );
- fprintf(stdout," *By = %26.16e \n", *By );
- fprintf(stdout," *Bz = %26.16e \n", *Bz );
- fprintf(stdout," *bsq = %26.16e \n", *bsq );
fprintf(stdout," *epsnegative = %10d \n", *epsnegative );
fprintf(stdout," *retval = %26.16e \n", *retval );
fflush(stdout);
@@ -267,6 +272,10 @@
usy = (*uxy)*sx + (*uyy)*sy + (*uyz)*sz;
usz = (*uxz)*sx + (*uyz)*sy + (*uzz)*sz;
+ *Bx = (*Bconsx_in) * inv_sqrt_detg;
+ *By = (*Bconsy_in) * inv_sqrt_detg;
+ *Bz = (*Bconsz_in) * inv_sqrt_detg;
+
// Calculate various scalars (Q.B, Q^2, etc) from the conserved variables:
lg.Bsq =
File [modified]: GRHydro_Con2PrimM_pt.c
Delta lines: +17 -10
===================================================================
--- branches/divclean/src/GRHydro_Con2PrimM_pt.c 2011-04-27 23:05:18 UTC (rev 237)
+++ branches/divclean/src/GRHydro_Con2PrimM_pt.c 2011-04-28 00:37:56 UTC (rev 238)
@@ -108,18 +108,17 @@
CCTK_INT *handle, 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 *tau_in, CCTK_REAL *Bconsx_in, CCTK_REAL *Bconsy_in, CCTK_REAL *Bconsz_in,
CCTK_REAL *rho,
CCTK_REAL *velx, CCTK_REAL *vely, CCTK_REAL *velz,
CCTK_REAL *epsilon, CCTK_REAL *pressure,
+ CCTK_REAL *Bx, CCTK_REAL *By, CCTK_REAL *Bz, CCTK_REAL *bsq,
CCTK_REAL *w_lorentz,
CCTK_REAL *gxx, CCTK_REAL *gxy, CCTK_REAL *gxz,
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 *Bx, CCTK_REAL *By, CCTK_REAL *Bz,
- CCTK_REAL *bsq,
CCTK_INT *epsnegative,
CCTK_REAL *retval);
@@ -189,18 +188,19 @@
CCTK_INT *handle, 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 *tau_in,
+ CCTK_REAL *Bconsx_in, CCTK_REAL *Bconsy_in, CCTK_REAL *Bconsz_in,
CCTK_REAL *rho,
CCTK_REAL *velx, CCTK_REAL *vely, CCTK_REAL *velz,
CCTK_REAL *epsilon, CCTK_REAL *pressure,
+ CCTK_REAL *Bx, CCTK_REAL *By, CCTK_REAL *Bz,
+ CCTK_REAL *bsq,
CCTK_REAL *w_lorentz,
CCTK_REAL *gxx, CCTK_REAL *gxy, CCTK_REAL *gxz,
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 *Bx, CCTK_REAL *By, CCTK_REAL *Bz,
- CCTK_REAL *bsq,
CCTK_INT *epsnegative,
CCTK_REAL *retval)
@@ -231,12 +231,19 @@
fprintf(stdout," *sy = %26.16e \n", *sy_in );
fprintf(stdout," *sz = %26.16e \n", *sz_in );
fprintf(stdout," *tau = %26.16e \n", *tau_in );
+ fprintf(stdout," *Bconsx = %26.16e \n", *Bconsx_in );
+ fprintf(stdout," *Bconsy = %26.16e \n", *Bconsy_in );
+ fprintf(stdout," *Bconsz = %26.16e \n", *Bconsz_in );
fprintf(stdout," *rho = %26.16e \n", *rho );
fprintf(stdout," *velx = %26.16e \n", *velx );
fprintf(stdout," *vely = %26.16e \n", *vely );
fprintf(stdout," *velz = %26.16e \n", *velz );
fprintf(stdout," *epsilon = %26.16e \n", *epsilon );
fprintf(stdout," *pressure = %26.16e \n", *pressure );
+ fprintf(stdout," *Bx = %26.16e \n", *Bx );
+ fprintf(stdout," *By = %26.16e \n", *By );
+ fprintf(stdout," *Bz = %26.16e \n", *Bz );
+ fprintf(stdout," *bsq = %26.16e \n", *bsq );
fprintf(stdout," *w_lorentz = %26.16e \n", *w_lorentz );
fprintf(stdout," *gxx = %26.16e \n", *gxx );
fprintf(stdout," *gxy = %26.16e \n", *gxy );
@@ -251,10 +258,6 @@
fprintf(stdout," *uyz = %26.16e \n", *uyz );
fprintf(stdout," *uzz = %26.16e \n", *uzz );
fprintf(stdout," *det = %26.16e \n", *det );
- fprintf(stdout," *Bx = %26.16e \n", *Bx );
- fprintf(stdout," *By = %26.16e \n", *By );
- fprintf(stdout," *Bz = %26.16e \n", *Bz );
- fprintf(stdout," *bsq = %26.16e \n", *bsq );
fprintf(stdout," *epsnegative = %10d \n", *epsnegative );
fprintf(stdout," *retval = %26.16e \n", *retval );
fflush(stdout);
@@ -271,6 +274,10 @@
usy = (*uxy)*sx + (*uyy)*sy + (*uyz)*sz;
usz = (*uxz)*sx + (*uyz)*sy + (*uzz)*sz;
+ *Bx = (*Bconsx_in) * inv_sqrt_detg;
+ *By = (*Bconsy_in) * inv_sqrt_detg;
+ *Bz = (*Bconsz_in) * inv_sqrt_detg;
+
// Calculate various scalars (Q.B, Q^2, etc) from the conserved variables:
lg.Bsq =
File [modified]: GRHydro_InterfacesM.h
Delta lines: +12 -8
===================================================================
--- branches/divclean/src/GRHydro_InterfacesM.h 2011-04-27 23:05:18 UTC (rev 237)
+++ branches/divclean/src/GRHydro_InterfacesM.h 2011-04-28 00:37:56 UTC (rev 238)
@@ -7,17 +7,18 @@
local_gam, dens, &
sx, sy, sz, &
tau, &
+ Bconsx, Bconsy, Bconsz, &
rho, &
velx, vely, velz,&
epsilon, pressure,&
+ Bx, By, Bz, &
+ bsq,&
w_lorentz, &
gxx, gxy, gxz, &
gyy, gyz, gzz, &
uxx, uxy, uxz,&
uyy, uyz, uzz,&
det,&
- Bx, By, Bz, &
- bsq,&
epsnegative, &
retval)
@@ -27,17 +28,18 @@
CCTK_REAL dens
CCTK_REAL sx, sy, sz
CCTK_REAL tau
+ CCTK_REAL Bconsx, Bconsy, Bconsz
CCTK_REAL rho
CCTK_REAL velx, vely, velz
CCTK_REAL epsilon, pressure
+ CCTK_REAL Bx, By, Bz
+ CCTK_REAL bsq
CCTK_REAL w_lorentz
CCTK_REAL gxx, gxy, gxz
CCTK_REAL gyy, gyz, gzz
CCTK_REAL uxx, uxy, uxz
CCTK_REAL uyy, uyz, uzz
CCTK_REAL det
- CCTK_REAL Bx, By, Bz
- CCTK_REAL bsq
CCTK_INT epsnegative
CCTK_REAL retval
end subroutine GRHydro_Con2PrimM_pt
@@ -46,17 +48,18 @@
dens, &
sx, sy, sz, &
sc, &
+ Bconsx, Bconsy, Bconsz, &
rho, &
velx, vely, velz,&
epsilon, pressure,&
+ Bx, By, Bz, &
+ bsq,&
w_lorentz, &
gxx, gxy, gxz, &
gyy, gyz, gzz, &
uxx, uxy, uxz,&
uyy, uyz, uzz,&
det,&
- Bx, By, Bz, &
- bsq,&
epsnegative, &
retval)
@@ -66,17 +69,18 @@
CCTK_REAL dens
CCTK_REAL sx, sy, sz
CCTK_REAL sc
+ CCTK_REAL Bconsx, Bconsy, Bconsz
CCTK_REAL rho
CCTK_REAL velx, vely, velz
CCTK_REAL epsilon, pressure
+ CCTK_REAL Bx, By, Bz
+ CCTK_REAL bsq
CCTK_REAL w_lorentz
CCTK_REAL gxx, gxy, gxz
CCTK_REAL gyy, gyz, gzz
CCTK_REAL uxx, uxy, uxz
CCTK_REAL uyy, uyz, uzz
CCTK_REAL det
- CCTK_REAL Bx, By, Bz
- CCTK_REAL bsq
CCTK_INT epsnegative
CCTK_REAL retval
end subroutine GRHydro_Con2PrimM_Polytype_pt
More information about the Commits
mailing list