aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@f69c4107-0314-4c4f-9ad4-17e986b73f4a>2008-04-17 04:47:15 +0000
committerschnetter <schnetter@f69c4107-0314-4c4f-9ad4-17e986b73f4a>2008-04-17 04:47:15 +0000
commit361c9543072446a1e6b1e766a7fe00522b7d7421 (patch)
tree77b3ca7bb5c2efe4cdd9fe9f0cae5e614bcc30ef
parentda2a60d82ab4b52ee5e909d593dedf7426411824 (diff)
Determine correctly which boundaries are outer boundaries when
off-centring the stencil, if multi-patch is used git-svn-id: https://svn.cct.lsu.edu/repos/numrel/LSUThorns/SummationByParts/trunk@102 f69c4107-0314-4c4f-9ad4-17e986b73f4a
-rw-r--r--src/stencil.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/stencil.c b/src/stencil.c
index ca837c6..0f83615 100644
--- a/src/stencil.c
+++ b/src/stencil.c
@@ -20,6 +20,7 @@ void SBP_determine_onesided_stencil (const cGH * cctkGH, int * onesided)
int symtable;
int mp_sym_handle;
CCTK_INT symbnd[6];
+ CCTK_INT bbox[6];
int ierr;
int d;
@@ -32,17 +33,28 @@ void SBP_determine_onesided_stencil (const cGH * cctkGH, int * onesided)
if (ierr!=6) {
CCTK_WARN(0,"Cannot get symmetry handles");
}
-
+
mp_sym_handle = SymmetryHandleOfName ( "multipatch" );
+ if (mp_sym_handle >= 0) {
+ /* We are using a multi-patch system */
+ ierr = MultiPatch_GetBbox (cctkGH, 6, bbox);
+ if (ierr) {
+ CCTK_WARN(0,"Cannot get multi-patch bbox information");
+ }
+ }
+
for (d=0; d<6; ++d) {
if (! cctkGH->cctk_bbox[d]) {
/* This is an inter-processor boundary */
onesided[d] = 0;
} else {
- /* On an outer boundary (which is not a symmetry boundary),
- symbnd < 0 */
- if (symbnd[d] < 0) {
+ /* On an outer boundary (which is not a symmetry boundary), it
+ is either symbnd < 0, or it is a boundary claimed by the MP
+ infrastructure and bbox != 0 */
+ if (symbnd[d] < 0 ||
+ (mp_sym_handle >= 0 && symbnd[d] == mp_sym_handle && bbox[d]))
+ {
/* Use one-sided stencils near outer boundaries if the user
wants it so */
onesided[d] = onesided_outer_boundaries;