diff options
Diffstat (limited to 'src/GRHydro_TVDReconstruct_drv.F90')
-rw-r--r-- | src/GRHydro_TVDReconstruct_drv.F90 | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/GRHydro_TVDReconstruct_drv.F90 b/src/GRHydro_TVDReconstruct_drv.F90 index 96a71db..97db410 100644 --- a/src/GRHydro_TVDReconstruct_drv.F90 +++ b/src/GRHydro_TVDReconstruct_drv.F90 @@ -14,9 +14,9 @@ #include "SpaceMask.h" -#define velx(i,j,k) lvel(i,j,k,1) -#define vely(i,j,k) lvel(i,j,k,2) -#define velz(i,j,k) lvel(i,j,k,3) +#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) @@ -62,6 +62,17 @@ subroutine GRHydro_TVDReconstruct_drv(CCTK_ARGUMENTS) CCTK_INT :: ierr + ! save memory when MP is not used + CCTK_INT :: GRHydro_UseGeneralCoordinates + TARGET vel, lvel + CCTK_REAL, DIMENSION(:,:,:,:), POINTER :: vup + + if (GRHydro_UseGeneralCoordinates(cctkGH).ne.0) then + vup => lvel + else + vup => vel + end if + allocate(trivial_rp(cctk_lsh(1),cctk_lsh(2),cctk_lsh(3)),STAT=ierr) if (ierr .ne. 0) then call CCTK_WARN(0, "Allocation problems with trivial_rp") @@ -155,11 +166,11 @@ subroutine GRHydro_TVDReconstruct_drv(CCTK_ARGUMENTS) rho, rhoplus, rhominus, trivial_rp, hydro_excision_mask) call tvdreconstruct(nx, ny, nz, xoffset, yoffset, zoffset, & - lvel(:,:,:,1), velxplus, velxminus, trivial_rp, hydro_excision_mask) + vup(:,:,:,1), velxplus, velxminus, trivial_rp, hydro_excision_mask) call tvdreconstruct(nx, ny, nz, xoffset, yoffset, zoffset, & - lvel(:,:,:,2), velyplus, velyminus, trivial_rp, hydro_excision_mask) + vup(:,:,:,2), velyplus, velyminus, trivial_rp, hydro_excision_mask) call tvdreconstruct(nx, ny, nz, xoffset, yoffset, zoffset, & - lvel(:,:,:,3), velzplus, velzminus, trivial_rp, hydro_excision_mask) + vup(:,:,:,3), velzplus, velzminus, trivial_rp, hydro_excision_mask) call tvdreconstruct(nx, ny, nz, xoffset, yoffset, zoffset, & eps, epsplus, epsminus, trivial_rp, hydro_excision_mask) if(evolve_mhd.ne.0) then |