diff options
author | eschnett <eschnett@16f5cafb-89ad-4b9f-9d0b-9d7a0a37d03b> | 2013-01-14 17:53:39 +0000 |
---|---|---|
committer | eschnett <eschnett@16f5cafb-89ad-4b9f-9d0b-9d7a0a37d03b> | 2013-01-14 17:53:39 +0000 |
commit | c6132bd1923c1503df7bf6a7df80189999cbdcb8 (patch) | |
tree | 784d884498f888d7b889139b53e8c1eda3a5686f | |
parent | 616482d6cbe4dd472fd3eb48bba304ea206d9a5e (diff) |
Support array padding (take cctk_ash into account)
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/NewRad/trunk@19 16f5cafb-89ad-4b9f-9d0b-9d7a0a37d03b
-rw-r--r-- | src/extrap.cc | 10 | ||||
-rw-r--r-- | src/newrad.cc | 8 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/extrap.cc b/src/extrap.cc index 2691687..d1cda41 100644 --- a/src/extrap.cc +++ b/src/extrap.cc @@ -24,14 +24,18 @@ void extrap_kernel (cGH const* restrict const cctkGH, int const nj = cctkGH->cctk_lsh[1]; int const nk = cctkGH->cctk_lsh[2]; + int const ai = cctkGH->cctk_ash[0]; + int const aj = cctkGH->cctk_ash[1]; + int const ak = cctkGH->cctk_ash[2]; + int const si = -dir[0]; int const sj = -dir[1]; int const sk = -dir[2]; int const di = 1; - int const dj = ni; - int const dk = ni*nj; - int const np = ni*nj*nk; + int const dj = ai; + int const dk = ai*aj; + int const np = ai*aj*ak; int const dind = si*di + sj*dj + sk*dk; diff --git a/src/newrad.cc b/src/newrad.cc index a0a270b..1cd1632 100644 --- a/src/newrad.cc +++ b/src/newrad.cc @@ -32,13 +32,17 @@ void newrad_kernel (cGH const* restrict const cctkGH, int const nj = cctkGH->cctk_lsh[1]; int const nk = cctkGH->cctk_lsh[2]; + int const ai = cctkGH->cctk_ash[0]; + int const aj = cctkGH->cctk_ash[1]; + int const ak = cctkGH->cctk_ash[2]; + int const si = dir[0]; int const sj = dir[1]; int const sk = dir[2]; int const di = 1; - int const dj = ni; - int const dk = ni*nj; + int const dj = ai; + int const dk = ai*aj; CCTK_REAL const dx = cctkGH->cctk_delta_space[0] / cctkGH->cctk_levfac[0]; CCTK_REAL const dy = cctkGH->cctk_delta_space[1] / cctkGH->cctk_levfac[1]; |