[Commits] [svn:einsteintoolkit] GRHydro/trunk/ (Rev. 564)
rhaas at tapir.caltech.edu
rhaas at tapir.caltech.edu
Tue Aug 13 09:56:01 CDT 2013
User: rhaas
Date: 2013/08/13 09:56 AM
Modified:
/trunk/
schedule.ccl
/trunk/src/
Utils.F90
Log:
GRHydro: fix metric GF used for sqrtdetg in multipatch runs
fix some scheduling
From: Roland Haas <rhaas at tapir.caltech.edu>
File Changes:
Directory: /trunk/src/
======================
File [modified]: Utils.F90
Delta lines: +32 -5
===================================================================
--- trunk/src/Utils.F90 2013-08-13 14:55:54 UTC (rev 563)
+++ trunk/src/Utils.F90 2013-08-13 14:56:00 UTC (rev 564)
@@ -74,10 +74,37 @@
subroutine GRHydro_SqrtSpatialDeterminant(CCTK_ARGUMENTS)
implicit none
+
+ ! save memory when MP is not used
+ ! TARGET as to be before DECLARE_CCTK_ARGUMENTS for gcc 4.1
+ TARGET gaa, gab, gac, gbb, gbc, gcc
+ TARGET gxx, gxy, gxz, gyy, gyz, gzz
+
DECLARE_CCTK_ARGUMENTS
integer i,j,k
integer nx, ny, nz
+ ! save memory when MP is not used
+ CCTK_INT :: GRHydro_UseGeneralCoordinates
+ CCTK_REAL, DIMENSION(:,:,:), POINTER :: g11, g12, g13, g22, g23, g33
+
+ ! save memory when MP is not used
+ if (GRHydro_UseGeneralCoordinates(cctkGH).ne.0) then
+ g11 => gaa
+ g12 => gab
+ g13 => gac
+ g22 => gbb
+ g23 => gbc
+ g33 => gcc
+ else
+ g11 => gxx
+ g12 => gxy
+ g13 => gxz
+ g22 => gyy
+ g23 => gyz
+ g33 => gzz
+ end if
+
nx = cctk_lsh(1)
ny = cctk_lsh(2)
nz = cctk_lsh(3)
@@ -86,11 +113,11 @@
do k=1,nz
do j=1,ny
do i=1,nx
- sdetg(i,j,k) = -(gxz(i,j,k)**2)*gyy(i,j,k) + &
- 2.0d0*gxy(i,j,k)*gxz(i,j,k)*gyz(i,j,k) - &
- gxx(i,j,k)*(gyz(i,j,k)**2) - &
- (gxy(i,j,k)**2)*gzz(i,j,k) + &
- (gxx(i,j,k)*gyy(i,j,k))*gzz(i,j,k)
+ sdetg(i,j,k) = -(g13(i,j,k)**2)*g22(i,j,k) + &
+ 2.0d0*g12(i,j,k)*g13(i,j,k)*g23(i,j,k) - &
+ g11(i,j,k)*(g23(i,j,k)**2) - &
+ (g12(i,j,k)**2)*g33(i,j,k) + &
+ (g11(i,j,k)*g22(i,j,k))*g33(i,j,k)
sdetg(i,j,k) = sqrt(sdetg(i,j,k))
enddo
enddo
Directory: /trunk/
==================
File [modified]: schedule.ccl
Delta lines: +1 -1
===================================================================
--- trunk/schedule.ccl 2013-08-13 14:55:54 UTC (rev 563)
+++ trunk/schedule.ccl 2013-08-13 14:56:00 UTC (rev 564)
@@ -605,7 +605,7 @@
# Early atmosphere reset. This will not capture relative atmosphere settings (rho_rel_min) which
# is scheduled later. However, this will ensure that all time and refinement levels are handled
# correctly for rho_abs_min set.
-schedule GRHydro_InitialAtmosphereReset AT CCTK_Initial AFTER HydroBase_Initial BEFORE HydroBase_Prim2ConInitial
+schedule GRHydro_InitialAtmosphereReset AT CCTK_Initial AFTER HydroBase_Initial BEFORE HydroBase_Prim2ConInitial AFTER GRHydro_SqrtSpatialDeterminant
{
LANG: Fortran
} "Use mask to enforce atmosphere at initial time"
More information about the Commits
mailing list