aboutsummaryrefslogtreecommitdiff
path: root/src/GRHydro_MP5Reconstruct_drv.F90
diff options
context:
space:
mode:
authorrhaas <rhaas@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45>2013-11-15 17:09:36 +0000
committerrhaas <rhaas@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45>2013-11-15 17:09:36 +0000
commit8c1d0a643c702d37179ac930ef67218864cd7c03 (patch)
tree3b59d9c20436864cba936fcceb1b2838727febfd /src/GRHydro_MP5Reconstruct_drv.F90
parentcbb215c627efdce075b87cd4e620d46e9115f293 (diff)
GRHydro: work around Intel 11 failures when using Fortran pointers
this rewrites the Reconstruction driver routines since Intel 11 miscompiles the code using Fortran pointers and generates segfault errors at runtime. Nested subroutines (another solution to make intel 11 work) do not work with intel 13. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@587 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45
Diffstat (limited to 'src/GRHydro_MP5Reconstruct_drv.F90')
-rw-r--r--src/GRHydro_MP5Reconstruct_drv.F90334
1 files changed, 211 insertions, 123 deletions
diff --git a/src/GRHydro_MP5Reconstruct_drv.F90 b/src/GRHydro_MP5Reconstruct_drv.F90
index 83378d6..c3404d2 100644
--- a/src/GRHydro_MP5Reconstruct_drv.F90
+++ b/src/GRHydro_MP5Reconstruct_drv.F90
@@ -14,15 +14,9 @@
#include "SpaceMask.h"
-#define velx(i,j,k) vup(i,j,k,1)
-#define vely(i,j,k) vup(i,j,k,2)
-#define velz(i,j,k) vup(i,j,k,3)
#define sx(i,j,k) scon(i,j,k,1)
#define sy(i,j,k) scon(i,j,k,2)
#define sz(i,j,k) scon(i,j,k,3)
-#define Bvecx(i,j,k) Bprim(i,j,k,1)
-#define Bvecy(i,j,k) Bprim(i,j,k,2)
-#define Bvecz(i,j,k) Bprim(i,j,k,3)
#define Bconsx(i,j,k) Bcons(i,j,k,1)
#define Bconsy(i,j,k) Bcons(i,j,k,2)
#define Bconsz(i,j,k) Bcons(i,j,k,3)
@@ -54,6 +48,9 @@ subroutine GRHydro_MP5Reconstruct_drv(CCTK_ARGUMENTS)
DECLARE_CCTK_PARAMETERS
DECLARE_CCTK_FUNCTIONS
+ ! save memory when MP is not used
+ CCTK_INT :: GRHydro_UseGeneralCoordinates
+
integer :: nx, ny, nz, i, j, k, itracer
logical, dimension(:,:,:), allocatable :: trivial_rp
@@ -66,33 +63,7 @@ subroutine GRHydro_MP5Reconstruct_drv(CCTK_ARGUMENTS)
&dum, dump, dumm
CCTK_INT :: ierr
-
- ! save memory when MP is not used
- CCTK_INT :: GRHydro_UseGeneralCoordinates
- CCTK_REAL, DIMENSION(cctk_ash1,cctk_ash2,cctk_ash3) :: g11, g12, g13, g22, g23, g33
- pointer (pg11,g11), (pg12,g12), (pg13,g13), (pg22,g22), (pg23,g23), (pg33,g33)
- CCTK_REAL, DIMENSION(cctk_ash1,cctk_ash2,cctk_ash3,3) :: vup, Bprim
- pointer (pvup,vup), (pBprim,Bprim)
-
- if (GRHydro_UseGeneralCoordinates(cctkGH).ne.0) then
- pg11 = loc(gaa)
- pg12 = loc(gab)
- pg13 = loc(gac)
- pg22 = loc(gbb)
- pg23 = loc(gbc)
- pg33 = loc(gcc)
- pvup = loc(lvel)
- pBprim = loc(lBvec)
- else
- pg11 = loc(gxx)
- pg12 = loc(gxy)
- pg13 = loc(gxz)
- pg22 = loc(gyy)
- pg23 = loc(gyz)
- pg33 = loc(gzz)
- pvup = loc(vel)
- pBprim = loc(Bvec)
- end if
+
allocate(trivial_rp(cctk_lsh(1),cctk_lsh(2),cctk_lsh(3)),STAT=ierr)
if (ierr .ne. 0) then
@@ -161,28 +132,55 @@ subroutine GRHydro_MP5Reconstruct_drv(CCTK_ARGUMENTS)
rho(:,j,k),rhominus(:,j,k),rhoplus(:,j,k),&
trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
if (reconstruct_Wv.eq.0) then
- call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
- velx(:,j,k),velxminus(:,j,k),velxplus(:,j,k),&
- trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
- vely(:,j,k),velyminus(:,j,k),velyplus(:,j,k),&
- trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
- velz(:,j,k),velzminus(:,j,k),velzplus(:,j,k),&
- trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ if (GRHydro_UseGeneralCoordinates(cctkGH).eq.0) then
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ vel(:,j,k,1),velxminus(:,j,k),velxplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ vel(:,j,k,2),velyminus(:,j,k),velyplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ vel(:,j,k,3),velzminus(:,j,k),velzplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ else
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ lvel(:,j,k,1),velxminus(:,j,k),velxplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ lvel(:,j,k,2),velyminus(:,j,k),velyplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ lvel(:,j,k,3),velzminus(:,j,k),velzplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ end if
else
- call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
- w_lorentz(:,j,k)*velx(:,j,k),velxminus(:,j,k),velxplus(:,j,k),&
- trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
- w_lorentz(:,j,k)*vely(:,j,k),velyminus(:,j,k),velyplus(:,j,k),&
- trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
- w_lorentz(:,j,k)*velz(:,j,k),velzminus(:,j,k),velzplus(:,j,k),&
- trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
- call undo_Wv(nx, velxminus(:,j,k), velyminus(:,j,k), velzminus(:,j,k),&
- velxplus(:,j,k),velyplus(:,j,k),velzplus(:,j,k),&
- g11(:,j,k),g12(:,j,k),g13(:,j,k),g22(:,j,k),g23(:,j,k),g33(:,j,k))
+ if (GRHydro_UseGeneralCoordinates(cctkGH).eq.0) then
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ w_lorentz(:,j,k)*vel(:,j,k,1),velxminus(:,j,k),velxplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ w_lorentz(:,j,k)*vel(:,j,k,2),velyminus(:,j,k),velyplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ w_lorentz(:,j,k)*vel(:,j,k,3),velzminus(:,j,k),velzplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ call undo_Wv(nx, velxminus(:,j,k), velyminus(:,j,k), velzminus(:,j,k),&
+ velxplus(:,j,k),velyplus(:,j,k),velzplus(:,j,k),&
+ gxx(:,j,k),gxy(:,j,k),gxz(:,j,k),gyy(:,j,k),gyz(:,j,k),gzz(:,j,k))
+ else
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ lvel(:,j,k,1),velxminus(:,j,k),velxplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ lvel(:,j,k,2),velyminus(:,j,k),velyplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ lvel(:,j,k,3),velzminus(:,j,k),velzplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ call undo_Wv(nx, velxminus(:,j,k), velyminus(:,j,k), velzminus(:,j,k),&
+ velxplus(:,j,k),velyplus(:,j,k),velzplus(:,j,k),&
+ gaa(:,j,k),gab(:,j,k),gac(:,j,k),gbb(:,j,k),gbc(:,j,k),gcc(:,j,k))
+ end if
endif
call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
eps(:,j,k),epsminus(:,j,k),epsplus(:,j,k),&
@@ -198,15 +196,27 @@ subroutine GRHydro_MP5Reconstruct_drv(CCTK_ARGUMENTS)
trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
endif
if(evolve_mhd.ne.0) then
- call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
- Bvecx(:,j,k),Bvecxminus(:,j,k),Bvecxplus(:,j,k),&
- trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
- Bvecy(:,j,k),Bvecyminus(:,j,k),Bvecyplus(:,j,k),&
- trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
- Bvecz(:,j,k),Bveczminus(:,j,k),Bveczplus(:,j,k),&
- trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ if (GRHydro_UseGeneralCoordinates(cctkGH).eq.0) then
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ Bvec(:,j,k,1),Bvecxminus(:,j,k),Bvecxplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ Bvec(:,j,k,2),Bvecyminus(:,j,k),Bvecyplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ Bvec(:,j,k,3),Bveczminus(:,j,k),Bveczplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ else
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ lBvec(:,j,k,1),Bvecxminus(:,j,k),Bvecxplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ lBvec(:,j,k,2),Bvecyminus(:,j,k),Bvecyplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
+ lBvec(:,j,k,3),Bveczminus(:,j,k),Bveczplus(:,j,k),&
+ trivial_rp(:,j,k), hydro_excision_mask(:,j,k))
+ end if
endif
if (evolve_entropy .ne. 0) then
call GRHydro_MP5Reconstruct1d(cctk_lsh(1),&
@@ -278,28 +288,55 @@ subroutine GRHydro_MP5Reconstruct_drv(CCTK_ARGUMENTS)
rho(j,:,k),rhominus(j,:,k),rhoplus(j,:,k),&
trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
if (reconstruct_Wv.eq.0) then
- call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
- velx(j,:,k),velxminus(j,:,k),velxplus(j,:,k),&
- trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
- vely(j,:,k),velyminus(j,:,k),velyplus(j,:,k),&
- trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
- velz(j,:,k),velzminus(j,:,k),velzplus(j,:,k),&
- trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ if (GRHydro_UseGeneralCoordinates(cctkGH).eq.0) then
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ vel(j,:,k,1),velxminus(j,:,k),velxplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ vel(j,:,k,2),velyminus(j,:,k),velyplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ vel(j,:,k,3),velzminus(j,:,k),velzplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ else
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ lvel(j,:,k,1),velxminus(j,:,k),velxplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ lvel(j,:,k,2),velyminus(j,:,k),velyplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ lvel(j,:,k,3),velzminus(j,:,k),velzplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ end if
else
- call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
- w_lorentz(j,:,k)*velx(j,:,k),velxminus(j,:,k),velxplus(j,:,k),&
- trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
- w_lorentz(j,:,k)*vely(j,:,k),velyminus(j,:,k),velyplus(j,:,k),&
- trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
- w_lorentz(j,:,k)*velz(j,:,k),velzminus(j,:,k),velzplus(j,:,k),&
- trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
- call undo_Wv(ny, velyminus(j,:,k), velzminus(j,:,k), velxminus(j,:,k),&
- velyplus(j,:,k),velzplus(j,:,k),velxplus(j,:,k),&
- g22(j,:,k), g23(j,:,k), g12(j,:,k), g33(j,:,k), g13(j,:,k), g11(j,:,k))
+ if (GRHydro_UseGeneralCoordinates(cctkGH).eq.0) then
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ w_lorentz(j,:,k)*vel(j,:,k,1),velxminus(j,:,k),velxplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ w_lorentz(j,:,k)*vel(j,:,k,2),velyminus(j,:,k),velyplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ w_lorentz(j,:,k)*vel(j,:,k,3),velzminus(j,:,k),velzplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call undo_Wv(ny, velyminus(j,:,k), velzminus(j,:,k), velxminus(j,:,k),&
+ velyplus(j,:,k),velzplus(j,:,k),velxplus(j,:,k),&
+ gyy(j,:,k), gyz(j,:,k), gxy(j,:,k), gzz(j,:,k), gxz(j,:,k), gxx(j,:,k))
+ else
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ w_lorentz(j,:,k)*lvel(j,:,k,1),velxminus(j,:,k),velxplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ w_lorentz(j,:,k)*lvel(j,:,k,2),velyminus(j,:,k),velyplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ w_lorentz(j,:,k)*lvel(j,:,k,3),velzminus(j,:,k),velzplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call undo_Wv(ny, velyminus(j,:,k), velzminus(j,:,k), velxminus(j,:,k),&
+ velyplus(j,:,k),velzplus(j,:,k),velxplus(j,:,k),&
+ gbb(j,:,k), gbc(j,:,k), gab(j,:,k), gcc(j,:,k), gac(j,:,k), gaa(j,:,k))
+ end if
endif
call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
eps(j,:,k),epsminus(j,:,k),epsplus(j,:,k),&
@@ -315,15 +352,27 @@ subroutine GRHydro_MP5Reconstruct_drv(CCTK_ARGUMENTS)
trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
endif
if(evolve_mhd.ne.0) then
- call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
- Bvecx(j,:,k),Bvecxminus(j,:,k),Bvecxplus(j,:,k),&
- trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
- Bvecy(j,:,k),Bvecyminus(j,:,k),Bvecyplus(j,:,k),&
- trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
- Bvecz(j,:,k),Bveczminus(j,:,k),Bveczplus(j,:,k),&
- trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ if (GRHydro_UseGeneralCoordinates(cctkGH).eq.0) then
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ Bvec(j,:,k,1),Bvecxminus(j,:,k),Bvecxplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ Bvec(j,:,k,2),Bvecyminus(j,:,k),Bvecyplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ Bvec(j,:,k,3),Bveczminus(j,:,k),Bveczplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ else
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ lBvec(j,:,k,1),Bvecxminus(j,:,k),Bvecxplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ lBvec(j,:,k,2),Bvecyminus(j,:,k),Bvecyplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
+ lBvec(j,:,k,3),Bveczminus(j,:,k),Bveczplus(j,:,k),&
+ trivial_rp(j,:,k), hydro_excision_mask(j,:,k))
+ end if
endif
if (evolve_entropy .ne. 0) then
call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&
@@ -395,28 +444,55 @@ subroutine GRHydro_MP5Reconstruct_drv(CCTK_ARGUMENTS)
rho(j,k,:),rhominus(j,k,:),rhoplus(j,k,:),&
trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
if (reconstruct_Wv.eq.0) then
- call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
- velx(j,k,:),velxminus(j,k,:),velxplus(j,k,:),&
- trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
- vely(j,k,:),velyminus(j,k,:),velyplus(j,k,:),&
- trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
- velz(j,k,:),velzminus(j,k,:),velzplus(j,k,:),&
- trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ if (GRHydro_UseGeneralCoordinates(cctkGH).eq.0) then
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ vel(j,k,:,1),velxminus(j,k,:),velxplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ vel(j,k,:,2),velyminus(j,k,:),velyplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ vel(j,k,:,3),velzminus(j,k,:),velzplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ else
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ lvel(j,k,:,1),velxminus(j,k,:),velxplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ lvel(j,k,:,2),velyminus(j,k,:),velyplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ lvel(j,k,:,3),velzminus(j,k,:),velzplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ end if
else
- call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
- w_lorentz(j,k,:)*velx(j,k,:),velxminus(j,k,:),velxplus(j,k,:),&
- trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
- w_lorentz(j,k,:)*vely(j,k,:),velyminus(j,k,:),velyplus(j,k,:),&
- trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
- w_lorentz(j,k,:)*velz(j,k,:),velzminus(j,k,:),velzplus(j,k,:),&
- trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
- call undo_Wv(nz, velzminus(j,k,:), velxminus(j,k,:), velyminus(j,k,:),&
- velzplus(j,k,:),velxplus(j,k,:),velyplus(j,k,:),&
- g33(j,k,:), g13(j,k,:), g23(j,k,:), g11(j,k,:), g12(j,k,:),g22(j,k,:))
+ if (GRHydro_UseGeneralCoordinates(cctkGH).eq.0) then
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ w_lorentz(j,k,:)*vel(j,k,:,1),velxminus(j,k,:),velxplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ w_lorentz(j,k,:)*vel(j,k,:,2),velyminus(j,k,:),velyplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ w_lorentz(j,k,:)*vel(j,k,:,3),velzminus(j,k,:),velzplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ call undo_Wv(nz, velzminus(j,k,:), velxminus(j,k,:), velyminus(j,k,:),&
+ velzplus(j,k,:),velxplus(j,k,:),velyplus(j,k,:),&
+ gzz(j,k,:), gxz(j,k,:), gyz(j,k,:), gxx(j,k,:), gxy(j,k,:),gyy(j,k,:))
+ else
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ w_lorentz(j,k,:)*lvel(j,k,:,1),velxminus(j,k,:),velxplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ w_lorentz(j,k,:)*lvel(j,k,:,2),velyminus(j,k,:),velyplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ w_lorentz(j,k,:)*lvel(j,k,:,3),velzminus(j,k,:),velzplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ call undo_Wv(nz, velzminus(j,k,:), velxminus(j,k,:), velyminus(j,k,:),&
+ velzplus(j,k,:),velxplus(j,k,:),velyplus(j,k,:),&
+ gcc(j,k,:), gac(j,k,:), gbc(j,k,:), gaa(j,k,:), gab(j,k,:),gbb(j,k,:))
+ end if
endif
call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
eps(j,k,:),epsminus(j,k,:),epsplus(j,k,:),&
@@ -432,15 +508,27 @@ subroutine GRHydro_MP5Reconstruct_drv(CCTK_ARGUMENTS)
trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
endif
if(evolve_mhd.ne.0) then
- call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
- Bvecx(j,k,:),Bvecxminus(j,k,:),Bvecxplus(j,k,:),&
- trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
- Bvecy(j,k,:),Bvecyminus(j,k,:),Bvecyplus(j,k,:),&
- trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
- call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
- Bvecz(j,k,:),Bveczminus(j,k,:),Bveczplus(j,k,:),&
- trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ if (GRHydro_UseGeneralCoordinates(cctkGH).eq.0) then
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ Bvec(j,k,:,1),Bvecxminus(j,k,:),Bvecxplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ Bvec(j,k,:,2),Bvecyminus(j,k,:),Bvecyplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ Bvec(j,k,:,3),Bveczminus(j,k,:),Bveczplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ else
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ lBvec(j,k,:,1),Bvecxminus(j,k,:),Bvecxplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ lBvec(j,k,:,2),Bvecyminus(j,k,:),Bvecyplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ call GRHydro_MP5Reconstruct1d(cctk_lsh(3),&
+ lBvec(j,k,:,3),Bveczminus(j,k,:),Bveczplus(j,k,:),&
+ trivial_rp(j,k,:), hydro_excision_mask(j,k,:))
+ end if
endif
if (evolve_entropy .ne. 0) then
call GRHydro_MP5Reconstruct1d(cctk_lsh(2),&