aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreschnett <eschnett@d576a68a-b34a-40ae-82fc-004fa1a9d16f>2012-05-11 23:15:39 +0000
committereschnett <eschnett@d576a68a-b34a-40ae-82fc-004fa1a9d16f>2012-05-11 23:15:39 +0000
commit5ee1256b73147cdbcb6b97ecc4053d5d7ed90142 (patch)
tree6ded5a6a9e66cef7adfb7800b8979a4f157ce2e7 /src
parent7f67d3a31ffd5dc3b9e03c7a3e83b9b902edab69 (diff)
Allow different boundary conditions in ADMBase
Introduce a parameter ADMBase::admbase_boundary_condition selection which boundary condition ADMBase applies. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinBase/ADMBase/trunk@66 d576a68a-b34a-40ae-82fc-004fa1a9d16f
Diffstat (limited to 'src')
-rw-r--r--src/InitSymBound.c32
1 files changed, 22 insertions, 10 deletions
diff --git a/src/InitSymBound.c b/src/InitSymBound.c
index cf20057..46c589a 100644
--- a/src/InitSymBound.c
+++ b/src/InitSymBound.c
@@ -123,9 +123,22 @@ void Einstein_InitSymBound(CCTK_ARGUMENTS)
}
/* A macro for selecting boundary conditions and checking for errors */
-#define ADMBASE_BC(NAME, STENCIL) \
- {if (Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, STENCIL, -1, NAME, "flat") < 0) \
- CCTK_WARN(0, "Failed to register BC for "NAME"!");}
+static void select_bc(cGH const* const cctkGH, char const* const groupname)
+{
+ DECLARE_CCTK_PARAMETERS;
+
+ int const ierr =
+ Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ groupname, admbase_boundary_condition);
+ if (ierr < 0)
+ {
+ CCTK_VWarn (CCTK_WARN_ABORT,
+ __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Failed to select boundary conditions for group %s",
+ groupname);
+ }
+}
+
/* Select boundary conditions on ADMBase variables */
void ADMBase_Boundaries(CCTK_ARGUMENTS)
{
@@ -153,23 +166,22 @@ void ADMBase_Boundaries(CCTK_ARGUMENTS)
if (CCTK_EQUALS(evolution_method, "none" ) ||
CCTK_EQUALS(evolution_method, "static"))
{
- ADMBASE_BC("ADMBase::metric", stencil);
- ADMBASE_BC("ADMBase::curv", stencil);
+ select_bc(cctkGH, "ADMBase::metric");
+ select_bc(cctkGH, "ADMBase::curv");
}
if (CCTK_EQUALS(lapse_evolution_method, "static"))
- ADMBASE_BC("ADMBase::lapse", stencil);
+ select_bc(cctkGH, "ADMBase::lapse");
if (!CCTK_EQUALS(initial_dtlapse, "none") &&
CCTK_EQUALS(dtlapse_evolution_method, "static"))
- ADMBASE_BC("ADMBase::dtlapse", stencil);
+ select_bc(cctkGH, "ADMBase::dtlapse");
if (!CCTK_EQUALS(initial_shift, "none") &&
CCTK_EQUALS(shift_evolution_method, "static"))
- ADMBASE_BC("ADMBase::shift", stencil);
+ select_bc(cctkGH, "ADMBase::shift");
if (!CCTK_EQUALS(initial_dtshift, "none") &&
CCTK_EQUALS(dtshift_evolution_method, "static"))
- ADMBASE_BC("ADMBase::dtshift", stencil);
+ select_bc(cctkGH, "ADMBase::dtshift");
}
-#undef ADMBase_BC