aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interface.ccl8
-rw-r--r--src/periodic.c17
2 files changed, 20 insertions, 5 deletions
diff --git a/interface.ccl b/interface.ccl
index d056243..cc228db 100644
--- a/interface.ccl
+++ b/interface.ccl
@@ -27,3 +27,11 @@ CCTK_INT FUNCTION Boundary_SelectedGVs(CCTK_POINTER_TO_CONST IN GH, \
CCTK_INT ARRAY OUT faces, CCTK_INT ARRAY OUT boundary_widths, \
CCTK_INT ARRAY OUT table_handles, CCTK_STRING IN bc_name)
REQUIRES FUNCTION Boundary_SelectedGVs
+
+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/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");