aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkorobkin <korobkin@f69c4107-0314-4c4f-9ad4-17e986b73f4a>2008-05-02 11:52:02 +0000
committerkorobkin <korobkin@f69c4107-0314-4c4f-9ad4-17e986b73f4a>2008-05-02 11:52:02 +0000
commit543c242c8f699b9a7cbb196b8f2787ff945b4cd6 (patch)
treee7bbb33f7b89d89b3e5c90fd7ba6d72097b96174
parentfdd9ad33d5f72c64203ceca064dcd9dbd4a0019d (diff)
(+) implemented poisoning: added three parameters
- poison_derivatives - poison_dissipation - poison_value The first two set values of derivative GF and RHS respectively to poison_value in boundary_shiftout zone, which is specified by CoordBase shiftout parameters. git-svn-id: https://svn.cct.lsu.edu/repos/numrel/LSUThorns/SummationByParts/trunk@111 f69c4107-0314-4c4f-9ad4-17e986b73f4a
-rw-r--r--param.ccl15
-rw-r--r--src/call_derivs.c12
-rw-r--r--src/dissipation.c13
-rw-r--r--src/make.code.defn1
4 files changed, 40 insertions, 1 deletions
diff --git a/param.ccl b/param.ccl
index 7d69ca3..2ffd8d2 100644
--- a/param.ccl
+++ b/param.ccl
@@ -34,10 +34,23 @@ BOOLEAN use_dissipation "Should we add dissipation"
{
} "no"
-BOOLEAN use_shiftout "Should we use the boundary_shift_out parameters from CoordBase to shift the dissipation stencils"
+BOOLEAN use_shiftout "Should we use the boundary_shift_out parameters from CoordBase to shift the stencils of derivatives and dissipation"
{
} "no"
+BOOLEAN poison_derivatives "Should we poison Dvar at boundary_shiftout perimeter when taking derivatives" STEERABLE=always
+{
+} "no"
+
+BOOLEAN poison_dissipation "Should we poison rhs at boundary_shiftout perimeter when applying dissipation" STEERABLE=always
+{
+} "no"
+
+REAL poison_value "Degree of intoxication" STEERABLE=always
+{
+ *:* :: "Anything you want"
+} 666.0
+
# Note: scaling the dissipation operators with h reduces the order by one.
BOOLEAN scale_with_h "Should we scale the dissipation with the grid spacing h"
{
diff --git a/src/call_derivs.c b/src/call_derivs.c
index 8b764fb..56b41e4 100644
--- a/src/call_derivs.c
+++ b/src/call_derivs.c
@@ -128,6 +128,14 @@ void DiffGv ( const CCTK_POINTER_TO_CONST cctkGH_, const CCTK_INT dir,
void get_grid_offsets (CCTK_INT *offset);
+ void CCTK_FCALL CCTK_FNAME(SBP_Poisoning) (
+ const CCTK_INT *ni,
+ const CCTK_INT *nj,
+ const CCTK_INT *nk,
+ const CCTK_INT *bb,
+ const CCTK_INT *offset,
+ CCTK_REAL *dvar);
+
ni = cctk_lsh[0]; nj = cctk_lsh[1]; nk = cctk_lsh[2];
if ( table_handle >=0 ) {
@@ -297,4 +305,8 @@ void DiffGv ( const CCTK_POINTER_TO_CONST cctkGH_, const CCTK_INT dir,
}
}
}
+
+ if (poison_derivatives) {
+ CCTK_FNAME(SBP_Poisoning)(&ni,&nj,&nk,bb,offset,dvar);
+ }
}
diff --git a/src/dissipation.c b/src/dissipation.c
index a3b2bb6..4dbacbf 100644
--- a/src/dissipation.c
+++ b/src/dissipation.c
@@ -147,6 +147,14 @@ void CCTK_FCALL CCTK_FNAME(dissipation_8_4_alt) (const CCTK_REAL *var,
CCTK_REAL *rhs);
void get_grid_offsets (CCTK_INT *offset);
+void CCTK_FCALL CCTK_FNAME(SBP_Poisoning) ( const CCTK_INT *ni,
+ const CCTK_INT *nj,
+ const CCTK_INT *nk,
+ const CCTK_INT *bb,
+ const CCTK_INT *offset,
+ CCTK_REAL *dvar);
+
+
static void
apply (int const varindex, char const * const optstring, void * const arg);
@@ -330,4 +338,9 @@ apply (int const varindex, char const * const optstring, void * const arg)
assert(0);
}
}
+
+ if (poison_dissipation) {
+ CCTK_FNAME(SBP_Poisoning)(&cctk_lsh[0], &cctk_lsh[1], &cctk_lsh[2],
+ bbox, offset, rhsptr);
+ }
}
diff --git a/src/make.code.defn b/src/make.code.defn
index 4cecbe8..150ab07 100644
--- a/src/make.code.defn
+++ b/src/make.code.defn
@@ -63,6 +63,7 @@ SRCS = call_derivs.c \
Coefficients_4_3_min_err_coeff.F90 \
Coefficients_6_5.F90 \
Coefficients_6_5_min_err_coeff.F90 \
+ Poisoning.F90 \
get_offset.c \
stencil.c