From 988f9ce1ac4fc24ad3680535a1327b551e39d724 Mon Sep 17 00:00:00 2001 From: schnetter Date: Sun, 14 Feb 2010 18:25:13 +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/RotatingSymmetry90/trunk@49 c3c03602-0f4f-0410-b3fa-d2c81c8a7dc5 --- interface.ccl | 10 ++++++++++ src/registersymmetry.c | 17 +++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/interface.ccl b/interface.ccl index 59fc741..c6eb99f 100644 --- a/interface.ccl +++ b/interface.ccl @@ -76,3 +76,13 @@ CCTK_INT FUNCTION \ GetLocalComponents \ (CCTK_POINTER_TO_CONST IN cctkGH) USES FUNCTION GetLocalComponents + + + +CCTK_INT FUNCTION GetBoundarySpecification \ + (CCTK_INT IN size, \ + CCTK_INT OUT ARRAY nboundaryzones, \ + CCTK_INT OUT ARRAY is_internal, \ + CCTK_INT OUT ARRAY is_staggered, \ + CCTK_INT OUT ARRAY shiftout) +REQUIRES FUNCTION GetBoundarySpecification diff --git a/src/registersymmetry.c b/src/registersymmetry.c index 326e737..b12627e 100644 --- a/src/registersymmetry.c +++ b/src/registersymmetry.c @@ -10,21 +10,34 @@ void Rot90_RegisterSymmetry (CCTK_ARGUMENTS) DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; + CCTK_INT nboundaryzones[6]; + CCTK_INT is_internal[6]; + CCTK_INT is_staggered[6]; + CCTK_INT shiftout[6]; + int f; CCTK_INT handle; CCTK_INT faces[6]; CCTK_INT width[6]; CCTK_INT ierr; + /* 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) { faces[f] = 0; width[f] = 0; } faces[0] = 1; - width[0] = cctk_nghostzones[0]; + width[0] = nboundaryzones[0]; faces[2] = 1; - width[2] = cctk_nghostzones[1]; + width[2] = nboundaryzones[2]; handle = SymmetryRegister ("rotating_symmetry_90"); if (handle < 0) { -- cgit v1.2.3