From dc098c3d0f3cc246852d30955e72669bba055ada Mon Sep 17 00:00:00 2001 From: schnetter Date: Sun, 14 Feb 2010 18:22:56 +0000 Subject: Determine the symmetry boundary width from the registered boundary width in CoordBase, not from the number of ghost zones git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/ReflectionSymmetry/trunk@31 082bdb00-0f4f-0410-b49e-b1835e5f2039 --- interface.ccl | 2 +- src/register.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/interface.ccl b/interface.ccl index 698d073..878e864 100644 --- a/interface.ccl +++ b/interface.ccl @@ -76,4 +76,4 @@ CCTK_INT FUNCTION GetBoundarySpecification \ CCTK_INT OUT ARRAY is_internal, \ CCTK_INT OUT ARRAY is_staggered, \ CCTK_INT OUT ARRAY shiftout) -USES FUNCTION GetBoundarySpecification +REQUIRES FUNCTION GetBoundarySpecification diff --git a/src/register.c b/src/register.c index 5a538e0..a1e3c5d 100644 --- a/src/register.c +++ b/src/register.c @@ -13,6 +13,12 @@ ReflectionSymmetry_Register (CCTK_ARGUMENTS) DECLARE_CCTK_PARAMETERS; int do_reflection[6]; + + CCTK_INT nboundaryzones[6]; + CCTK_INT is_internal[6]; + CCTK_INT is_staggered[6]; + CCTK_INT shiftout[6]; + CCTK_INT handle; CCTK_INT faces[6]; CCTK_INT width[6]; @@ -26,12 +32,20 @@ ReflectionSymmetry_Register (CCTK_ARGUMENTS) do_reflection[4] = reflection_z; do_reflection[5] = reflection_upper_z; + /* Get the boundary specification */ + ierr = GetBoundarySpecification + (6, nboundaryzones, is_internal, is_staggered, shiftout); + if (ierr < 0) + { + CCTK_WARN (0, "Could not get the boundary specification"); + } + for (f=0; f<6; ++f) { if (do_reflection[f]) { faces[f] = 1; - width[f] = cctk_nghostzones[f/2]; + width[f] = nboundaryzones[f/2]; } else { -- cgit v1.2.3