[Commits] [svn:einsteintoolkit] GRHydro/trunk/src/ (Rev. 275)

roland.haas at physics.gatech.edu roland.haas at physics.gatech.edu
Mon Sep 19 18:15:09 CDT 2011


User: rhaas
Date: 2011/09/19 06:15 PM

Modified:
 /trunk/src/
  GRHydro_ENOReconstruct_drv.F90

Log:
 fix non-multipatch velocities in ENO reconstruction

File Changes:

Directory: /trunk/src/
======================

File [modified]: GRHydro_ENOReconstruct_drv.F90
Delta lines: +14 -3
===================================================================
--- trunk/src/GRHydro_ENOReconstruct_drv.F90	2011-09-15 16:51:30 UTC (rev 274)
+++ trunk/src/GRHydro_ENOReconstruct_drv.F90	2011-09-19 23:15:08 UTC (rev 275)
@@ -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)
@@ -64,6 +64,17 @@
 
   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")



More information about the Commits mailing list