diff options
Diffstat (limited to 'src/InitSymBound.c')
-rw-r--r-- | src/InitSymBound.c | 32 |
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 |