diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-07-15 12:02:45 -0500 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-07-15 13:30:23 -0500 |
commit | 03b2c7edac82dedbba779c42e26e852070a50436 (patch) | |
tree | ce19dd4a7985daf53895647571c609769e96ef37 /Carpet/CarpetReduce | |
parent | af56a6c9a331bb15ab320bc261ca169031a8fead (diff) |
CarpetReduce: Handle multi-patch boundaries correctly
Use MultiPatch_GetBoundarySpecification to determine the boundary
specifications if it is available; otherwise, use GetBoundarySpecification.
Diffstat (limited to 'Carpet/CarpetReduce')
-rw-r--r-- | Carpet/CarpetReduce/interface.ccl | 28 | ||||
-rw-r--r-- | Carpet/CarpetReduce/src/mask_coords.c | 11 |
2 files changed, 31 insertions, 8 deletions
diff --git a/Carpet/CarpetReduce/interface.ccl b/Carpet/CarpetReduce/interface.ccl index 71b96c3a6..e19087aa9 100644 --- a/Carpet/CarpetReduce/interface.ccl +++ b/Carpet/CarpetReduce/interface.ccl @@ -14,12 +14,28 @@ CCTK_INT FUNCTION \ SymmetryTableHandleForGrid (CCTK_POINTER_TO_CONST IN cctkGH) REQUIRES FUNCTION SymmetryTableHandleForGrid -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) +CCTK_INT FUNCTION \ + MultiPatch_GetMap \ + (CCTK_POINTER_TO_CONST IN cctkGH) +USES FUNCTION MultiPatch_GetMap + +CCTK_INT FUNCTION \ + MultiPatch_GetBoundarySpecification \ + (CCTK_INT IN map, \ + 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) +USES FUNCTION MultiPatch_GetBoundarySpecification + +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/Carpet/CarpetReduce/src/mask_coords.c b/Carpet/CarpetReduce/src/mask_coords.c index 2b7d706bd..6ea6d52ea 100644 --- a/Carpet/CarpetReduce/src/mask_coords.c +++ b/Carpet/CarpetReduce/src/mask_coords.c @@ -24,8 +24,15 @@ CoordBase_SetupMask (CCTK_ARGUMENTS) - ierr = GetBoundarySpecification - (6, nboundaryzones, is_internal, is_staggered, shiftout); + if (CCTK_IsFunctionAliased ("MultiPatch_GetBoundarySpecification")) { + int const m = MultiPatch_GetMap (cctkGH); + assert (m >= 0); + ierr = MultiPatch_GetBoundarySpecification + (m, 6, nboundaryzones, is_internal, is_staggered, shiftout); + } else { + ierr = GetBoundarySpecification + (6, nboundaryzones, is_internal, is_staggered, shiftout); + } if (ierr != 0) { CCTK_WARN (0, "Could not get boundary specification"); } |