aboutsummaryrefslogtreecommitdiff
path: root/src/dissipation.c
diff options
context:
space:
mode:
authorschnetter <schnetter@f69c4107-0314-4c4f-9ad4-17e986b73f4a>2006-07-05 19:05:46 +0000
committerschnetter <schnetter@f69c4107-0314-4c4f-9ad4-17e986b73f4a>2006-07-05 19:05:46 +0000
commit52a24adeead81157f5d205c6a94a3d4a8731c453 (patch)
treeec844495b86668525a75f4142cc3245c2d144dff /src/dissipation.c
parent7409bb1a94ba40a8ff24896cc8a2e5ef3a096d96 (diff)
Introduce a function SBP_determine_onesided_stencil which determines
which faces should use one-sided stencils, depending on which boundaries are inter-processor boundaries, symmetry boundaries, and multi-patch boundaries. Use this function everywhere. Remove the previous mechinisms; some were not in all cases correct. git-svn-id: https://svn.cct.lsu.edu/repos/numrel/LSUThorns/SummationByParts/trunk@75 f69c4107-0314-4c4f-9ad4-17e986b73f4a
Diffstat (limited to 'src/dissipation.c')
-rw-r--r--src/dissipation.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/src/dissipation.c b/src/dissipation.c
index 8f85d32..bf6fc29 100644
--- a/src/dissipation.c
+++ b/src/dissipation.c
@@ -11,6 +11,8 @@
#include "util_ErrorCodes.h"
#include "util_Table.h"
+#include "stencil.h"
+
void CCTK_FCALL CCTK_FNAME(dissipation_4_3_opt) (const CCTK_REAL *var,
const CCTK_INT *lsh,
const CCTK_INT *gsh,
@@ -155,13 +157,12 @@ apply (int const varindex, char const * const optstring, void * const arg)
cGroup vardata, rhsdata;
CCTK_REAL const * varptr;
CCTK_REAL * rhsptr;
- CCTK_INT ni, nj, nk, bbox[6], gsize[3];
+ CCTK_INT gsize[3];
CCTK_REAL dx[3];
- int n;
int d;
int ierr;
- CCTK_INT symtable, pen_sym_handle;
- CCTK_INT symbnd[6];
+ CCTK_INT bbox[6];
+ int onesided[6];
CCTK_INT npatches, patch;
assert (varindex >= 0);
@@ -171,24 +172,9 @@ apply (int const varindex, char const * const optstring, void * const arg)
gsize[d] = cctk_nghostzones[d];
}
- symtable = SymmetryTableHandleForGrid (cctkGH);
- if (symtable<0) {
- CCTK_WARN(0,"symtable is out of bounds");
- }
-
- ierr = Util_TableGetIntArray (symtable, 6, symbnd, "symmetry_handle");
- if (ierr!=6) {
- CCTK_WARN(0,"Util_TableGetIntArray returned error");
- }
-
- pen_sym_handle = SymmetryHandleOfName ( "multipatch" );
-
+ SBP_determine_onesided_stencil (cctkGH, onesided);
for (d=0; d<6; ++d) {
- if ( symbnd[d] == pen_sym_handle && cctk_bbox[d] == 1 ) {
- bbox[d] = 1;
- } else {
- bbox[d] = 0;
- }
+ bbox[d] = onesided[d];
}
rhsindex = MoLQueryEvolvedRHS (varindex);