diff options
author | knarf <knarf@1bf05452-ddb3-4880-bfa1-00436340132b> | 2010-08-25 18:01:53 +0000 |
---|---|---|
committer | knarf <knarf@1bf05452-ddb3-4880-bfa1-00436340132b> | 2010-08-25 18:01:53 +0000 |
commit | ebccb57eaaa59f032c85af75f7c1c76989e616fe (patch) | |
tree | 54e0e39f0d923e11d05d73b8c7974dcb15d962b8 /src | |
parent | 0229bbe98155589701a9103932ab837cb73040c1 (diff) |
From Ian Hinder:
Before this patch, CactusNumerical/Periodic assumes that the symmetry
boundary widths are the same as the number of ghost zones. In newer
version of Carpet, the number of ghost zones can be different on
different refinement levels, and the number of ghost zones is no
longer available when the symmetry BCs are registered. This patch
makes the Periodic thorn get the boundary widths from CoordBase
instead, in the same way that the other symmetry thorns do already.
This introduces a new dependency on CoordBase.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Periodic/trunk@20 1bf05452-ddb3-4880-bfa1-00436340132b
Diffstat (limited to 'src')
-rw-r--r-- | src/periodic.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/periodic.c b/src/periodic.c index 33dbee0..1cfb274 100644 --- a/src/periodic.c +++ b/src/periodic.c @@ -271,15 +271,22 @@ Periodic_RegisterBC (cGH * restrict const cctkGH) CCTK_INT faces[6]; CCTK_INT width[6]; CCTK_INT ierr; - + CCTK_INT nboundaryzones[6]; + CCTK_INT is_internal[6]; + CCTK_INT is_staggered[6]; + CCTK_INT shiftout[6]; + faces[0] = faces[1] = periodic || periodic_x; faces[2] = faces[3] = periodic || periodic_y; faces[4] = faces[5] = periodic || periodic_z; - - for (f=0; f<6; ++f) { - width[f] = cctkGH->cctk_nghostzones[f/2]; + + ierr = GetBoundarySpecification + (6, width, is_internal, is_staggered, shiftout); + if (ierr < 0) + { + CCTK_WARN (0, "Could not get the boundary specification"); } - + handle = SymmetryRegister ("periodic"); if (handle < 0) { CCTK_WARN (0, "Could not register periodicity boundary condition"); |