diff options
author | schnetter <schnetter@f69c4107-0314-4c4f-9ad4-17e986b73f4a> | 2006-07-05 19:05:46 +0000 |
---|---|---|
committer | schnetter <schnetter@f69c4107-0314-4c4f-9ad4-17e986b73f4a> | 2006-07-05 19:05:46 +0000 |
commit | 52a24adeead81157f5d205c6a94a3d4a8731c453 (patch) | |
tree | ec844495b86668525a75f4142cc3245c2d144dff /src/call_derivs_name.c | |
parent | 7409bb1a94ba40a8ff24896cc8a2e5ef3a096d96 (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/call_derivs_name.c')
-rw-r--r-- | src/call_derivs_name.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/call_derivs_name.c b/src/call_derivs_name.c index f7804b0..89e4b39 100644 --- a/src/call_derivs_name.c +++ b/src/call_derivs_name.c @@ -1,8 +1,12 @@ +#include <assert.h> + #include "cctk.h" #include "cctk_Parameters.h" #include "cctk_Arguments.h" -#include <assert.h> +#include "stencil.h" + + void DiffGf ( const CCTK_POINTER_TO_CONST cctkGH_, const CCTK_INT dir, const char *var_name, const char *dvar_name ) @@ -12,10 +16,10 @@ void DiffGf ( const CCTK_POINTER_TO_CONST cctkGH_, const CCTK_INT dir, DECLARE_CCTK_ARGUMENTS CCTK_REAL *var, *dvar; - CCTK_INT ni, nj, nk, gsize, ic; + CCTK_INT ni, nj, nk, gsize; CCTK_REAL delta; - CCTK_INT ierr; - CCTK_INT lsh[3], bbox[6], bb[2], nghostzones[3]; + CCTK_INT bb[2]; + int onesided[6]; void CCTK_FCALL CCTK_FNAME(deriv_gf_2_1)(const CCTK_REAL *var, const CCTK_INT *ni, const CCTK_INT *nj, @@ -65,22 +69,24 @@ void DiffGf ( const CCTK_POINTER_TO_CONST cctkGH_, const CCTK_INT dir, ni = cctk_lsh[0]; nj = cctk_lsh[1]; nk = cctk_lsh[2]; + SBP_determine_onesided_stencil (cctkGH, onesided); + switch(dir) { case 0: { delta = CCTK_DELTA_SPACE(0); - bb[0] = cctk_bbox[0]; bb[1] = cctk_bbox[1]; + bb[0] = onesided[0]; bb[1] = onesided[1]; gsize = cctk_nghostzones[0]; break; } case 1: { delta = CCTK_DELTA_SPACE(1); - bb[0] = cctk_bbox[2]; bb[1] = cctk_bbox[3]; + bb[0] = onesided[2]; bb[1] = onesided[3]; gsize = cctk_nghostzones[1]; break; } case 2: { delta = CCTK_DELTA_SPACE(2); - bb[0] = cctk_bbox[4]; bb[1] = cctk_bbox[5]; + bb[0] = onesided[4]; bb[1] = onesided[5]; gsize = cctk_nghostzones[2]; break; } |