aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@082bdb00-0f4f-0410-b49e-b1835e5f2039>2010-02-14 18:22:56 +0000
committerschnetter <schnetter@082bdb00-0f4f-0410-b49e-b1835e5f2039>2010-02-14 18:22:56 +0000
commitdc098c3d0f3cc246852d30955e72669bba055ada (patch)
tree4aebc5aefd5893c152d8c752079ac4875d3e7348
parent425191b465b7a81753d0933855150374e888eb79 (diff)
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
-rw-r--r--interface.ccl2
-rw-r--r--src/register.c16
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
{