From 959291633ec89448f4123c5ecbf16db876f29429 Mon Sep 17 00:00:00 2001 From: hinder Date: Mon, 13 Sep 2010 11:18:30 +0000 Subject: Update automatically generated code git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/WeylScal4/trunk@61 4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843 --- interface.ccl | 2 +- param.ccl | 140 +++-------------------------------- schedule.ccl | 143 +++++++++++++++++++++++------------- src/Boundaries.c | 208 ---------------------------------------------------- src/psis_calc_2nd.c | 15 ++++ src/psis_calc_4th.c | 15 ++++ 6 files changed, 134 insertions(+), 389 deletions(-) diff --git a/interface.ccl b/interface.ccl index 1ee4544..7572541 100644 --- a/interface.ccl +++ b/interface.ccl @@ -2,7 +2,7 @@ implements: WeylScal4 -inherits: admbase Grid GenericFD Boundary +inherits: admbase methodoflines Grid GenericFD Boundary diff --git a/param.ccl b/param.ccl index 8a95473..daa36fa 100644 --- a/param.ccl +++ b/param.ccl @@ -51,6 +51,12 @@ KEYWORD fd_order "fd_order" "4th" :: "4th" } "2nd" +restricted: +CCTK_INT WeylScal4_MaxNumEvolvedVars "Number of evolved variables used by this thorn" ACCUMULATOR-BASE=MethodofLines::MoL_Num_Evolved_Vars +{ + 0:0 :: "Number of evolved variables used by this thorn" +} 0 + restricted: CCTK_INT timelevels "Number of active timelevels" { @@ -58,19 +64,19 @@ CCTK_INT timelevels "Number of active timelevels" } 3 restricted: -CCTK_INT psis_calc_2nd_calc_every "psis_calc_2nd_calc_every" +CCTK_INT rhs_timelevels "Number of active RHS timelevels" { - *:* :: "" + 0:3 :: "" } 1 restricted: -CCTK_INT psis_calc_4th_calc_every "psis_calc_4th_calc_every" +CCTK_INT psis_calc_2nd_calc_every "psis_calc_2nd_calc_every" { *:* :: "" } 1 restricted: -CCTK_INT dummycalc_calc_every "dummycalc_calc_every" +CCTK_INT psis_calc_4th_calc_every "psis_calc_4th_calc_every" { *:* :: "" } 1 @@ -87,129 +93,3 @@ CCTK_INT psis_calc_4th_calc_offset "psis_calc_4th_calc_offset" *:* :: "" } 0 -restricted: -CCTK_INT dummycalc_calc_offset "dummycalc_calc_offset" -{ - *:* :: "" -} 0 - -private: -KEYWORD Psi4i_bound "Boundary condition to implement" -{ - "flat" :: "Flat boundary condition" - "none" :: "No boundary condition" - "static" :: "Boundaries held fixed" - "radiative" :: "Radiation boundary condition" - "scalar" :: "Dirichlet boundary condition" - "newrad" :: "Improved radiative boundary condition" - "skip" :: "skip boundary condition code" -} "skip" - -private: -KEYWORD Psi4r_bound "Boundary condition to implement" -{ - "flat" :: "Flat boundary condition" - "none" :: "No boundary condition" - "static" :: "Boundaries held fixed" - "radiative" :: "Radiation boundary condition" - "scalar" :: "Dirichlet boundary condition" - "newrad" :: "Improved radiative boundary condition" - "skip" :: "skip boundary condition code" -} "skip" - -private: -KEYWORD Psi4i_group_bound "Boundary condition to implement" -{ - "flat" :: "Flat boundary condition" - "none" :: "No boundary condition" - "static" :: "Boundaries held fixed" - "radiative" :: "Radiation boundary condition" - "scalar" :: "Dirichlet boundary condition" - "newrad" :: "Improved radiative boundary condition" - "skip" :: "skip boundary condition code" -} "skip" - -private: -KEYWORD Psi4r_group_bound "Boundary condition to implement" -{ - "flat" :: "Flat boundary condition" - "none" :: "No boundary condition" - "static" :: "Boundaries held fixed" - "radiative" :: "Radiation boundary condition" - "scalar" :: "Dirichlet boundary condition" - "newrad" :: "Improved radiative boundary condition" - "skip" :: "skip boundary condition code" -} "skip" - -private: -CCTK_REAL Psi4i_bound_speed "characteristic speed at boundary" -{ - "0:*" :: "outgoing characteristic speed > 0" -} 1. - -private: -CCTK_REAL Psi4r_bound_speed "characteristic speed at boundary" -{ - "0:*" :: "outgoing characteristic speed > 0" -} 1. - -private: -CCTK_REAL Psi4i_group_bound_speed "characteristic speed at boundary" -{ - "0:*" :: "outgoing characteristic speed > 0" -} 1. - -private: -CCTK_REAL Psi4r_group_bound_speed "characteristic speed at boundary" -{ - "0:*" :: "outgoing characteristic speed > 0" -} 1. - -private: -CCTK_REAL Psi4i_bound_limit "limit value for r -> infinity" -{ - "*:*" :: "value of limit value is unrestricted" -} 0. - -private: -CCTK_REAL Psi4r_bound_limit "limit value for r -> infinity" -{ - "*:*" :: "value of limit value is unrestricted" -} 0. - -private: -CCTK_REAL Psi4i_group_bound_limit "limit value for r -> infinity" -{ - "*:*" :: "value of limit value is unrestricted" -} 0. - -private: -CCTK_REAL Psi4r_group_bound_limit "limit value for r -> infinity" -{ - "*:*" :: "value of limit value is unrestricted" -} 0. - -private: -CCTK_REAL Psi4i_bound_scalar "Dirichlet boundary value" -{ - "*:*" :: "unrestricted" -} 0. - -private: -CCTK_REAL Psi4r_bound_scalar "Dirichlet boundary value" -{ - "*:*" :: "unrestricted" -} 0. - -private: -CCTK_REAL Psi4i_group_bound_scalar "Dirichlet boundary value" -{ - "*:*" :: "unrestricted" -} 0. - -private: -CCTK_REAL Psi4r_group_bound_scalar "Dirichlet boundary value" -{ - "*:*" :: "unrestricted" -} 0. - diff --git a/schedule.ccl b/schedule.ccl index 5d79431..80d42d8 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -1,31 +1,9 @@ # File produced by Kranc -if (timelevels == 1) -{ - STORAGE: Psi4i_group[1] -} -if (timelevels == 2) -{ - STORAGE: Psi4i_group[2] -} -if (timelevels == 3) -{ - STORAGE: Psi4i_group[3] -} +STORAGE: Psi4i_group[3] -if (timelevels == 1) -{ - STORAGE: Psi4r_group[1] -} -if (timelevels == 2) -{ - STORAGE: Psi4r_group[2] -} -if (timelevels == 3) -{ - STORAGE: Psi4r_group[3] -} +STORAGE: Psi4r_group[3] schedule WeylScal4_Startup at STARTUP { @@ -46,61 +24,126 @@ schedule WeylScal4_RegisterSymmetries in SymmetryRegister } "register symmetries" -schedule group WeylScal4_Calculate in MoL_PseudoEvolution +if (CCTK_EQUALS(fd_order, "2nd")) +{ + schedule group psis_calc_2nd_group in MoL_PseudoEvolution + { + # no language specified + } "psis_calc_2nd" +} + +schedule psis_calc_2nd in psis_calc_2nd_group +{ + LANG: C +} "psis_calc_2nd" + +schedule psis_calc_2nd_SelectBCs in psis_calc_2nd_bc_group +{ + LANG: C + OPTIONS: level + SYNC: Psi4i_group + SYNC: Psi4r_group +} "psis_calc_2nd_SelectBCs" + +schedule group ApplyBCs as psis_calc_2nd_ApplyBCs in psis_calc_2nd_bc_group after psis_calc_2nd_SelectBCs +{ + # no language specified +} "Apply BCs for groups set in psis_calc_2nd" + + +if (CCTK_EQUALS(fd_order, "2nd")) { -} "Calculate the Newman-Penrose quantities" + schedule group psis_calc_2nd_bc_group in psis_calc_2nd_group after psis_calc_2nd + { + # no language specified + } "psis_calc_2nd" +} + + +if (CCTK_EQUALS(fd_order, "2nd")) +{ + schedule group psis_calc_2nd_bc_group at CCTK_POSTRESTRICT + { + # no language specified + } "psis_calc_2nd" +} + if (CCTK_EQUALS(fd_order, "2nd")) { - schedule psis_calc_2nd in WeylScal4_Calculate as calc_np + schedule group psis_calc_2nd_bc_group at CCTK_POSTRESTRICTINITIAL { - LANG: C - SYNC: Psi4i_group - SYNC: Psi4r_group + # no language specified } "psis_calc_2nd" } if (CCTK_EQUALS(fd_order, "4th")) { - schedule psis_calc_4th in WeylScal4_Calculate as calc_np + schedule group psis_calc_4th_group in MoL_PseudoEvolution { - LANG: C - SYNC: Psi4i_group - SYNC: Psi4r_group + # no language specified } "psis_calc_4th" } -schedule WeylScal4_SelectBoundConds in WeylScal4_Boundaries +schedule psis_calc_4th in psis_calc_4th_group +{ + LANG: C +} "psis_calc_4th" + +schedule psis_calc_4th_SelectBCs in psis_calc_4th_bc_group { LANG: C OPTIONS: level SYNC: Psi4i_group SYNC: Psi4r_group -} "select boundary conditions" +} "psis_calc_4th_SelectBCs" -schedule WeylScal4_CheckBoundaries at BASEGRID +schedule group ApplyBCs as psis_calc_4th_ApplyBCs in psis_calc_4th_bc_group after psis_calc_4th_SelectBCs { - LANG: C - OPTIONS: meta -} "check boundaries treatment" + # no language specified +} "Apply BCs for groups set in psis_calc_4th" + -schedule group ApplyBCs as WeylScal4_ApplyBCs in WeylScal4_Boundaries after WeylScal4_SelectBoundConds +if (CCTK_EQUALS(fd_order, "4th")) { - # no language specified -} "Apply boundary conditions controlled by thorn Boundary" + schedule group psis_calc_4th_bc_group in psis_calc_4th_group after psis_calc_4th + { + # no language specified + } "psis_calc_4th" +} + -schedule group WeylScal4_Boundaries in WeylScal4_Calculate after calc_np +if (CCTK_EQUALS(fd_order, "4th")) { - # no language specified -} "Apply boundary conditions controlled by thorn Boundary" + schedule group psis_calc_4th_bc_group at CCTK_POSTRESTRICT + { + # no language specified + } "psis_calc_4th" +} -schedule group WeylScal4_Boundaries in CCTK_POSTRESTRICTINITIAL + +if (CCTK_EQUALS(fd_order, "4th")) { - # no language specified -} "Apply boundary conditions controlled by thorn Boundary" + schedule group psis_calc_4th_bc_group at CCTK_POSTRESTRICTINITIAL + { + # no language specified + } "psis_calc_4th" +} + +schedule WeylScal4_SelectBoundConds in MoL_PostStep +{ + LANG: C + OPTIONS: level +} "select boundary conditions" + +schedule WeylScal4_CheckBoundaries at BASEGRID +{ + LANG: C + OPTIONS: meta +} "check boundaries treatment" -schedule group WeylScal4_Boundaries in CCTK_POSTRESTRICT +schedule group ApplyBCs as WeylScal4_ApplyBCs in MoL_PostStep after WeylScal4_SelectBoundConds { # no language specified } "Apply boundary conditions controlled by thorn Boundary" diff --git a/src/Boundaries.c b/src/Boundaries.c index b6e6cd0..ef1a009 100644 --- a/src/Boundaries.c +++ b/src/Boundaries.c @@ -31,219 +31,11 @@ void WeylScal4_SelectBoundConds(CCTK_ARGUMENTS) DECLARE_CCTK_PARAMETERS; CCTK_INT ierr = 0; - - if (CCTK_EQUALS(Psi4i_group_bound, "none" ) || - CCTK_EQUALS(Psi4i_group_bound, "static") || - CCTK_EQUALS(Psi4i_group_bound, "flat" ) || - CCTK_EQUALS(Psi4i_group_bound, "zero" ) ) - { - ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, - "WeylScal4::Psi4i_group", Psi4i_group_bound); - if (ierr < 0) - CCTK_WARN(0, "Failed to register Psi4i_group_bound BC for WeylScal4::Psi4i_group!"); - } - - if (CCTK_EQUALS(Psi4r_group_bound, "none" ) || - CCTK_EQUALS(Psi4r_group_bound, "static") || - CCTK_EQUALS(Psi4r_group_bound, "flat" ) || - CCTK_EQUALS(Psi4r_group_bound, "zero" ) ) - { - ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, - "WeylScal4::Psi4r_group", Psi4r_group_bound); - if (ierr < 0) - CCTK_WARN(0, "Failed to register Psi4r_group_bound BC for WeylScal4::Psi4r_group!"); - } - - if (CCTK_EQUALS(Psi4i_bound, "none" ) || - CCTK_EQUALS(Psi4i_bound, "static") || - CCTK_EQUALS(Psi4i_bound, "flat" ) || - CCTK_EQUALS(Psi4i_bound, "zero" ) ) - { - ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, - "WeylScal4::Psi4i", Psi4i_bound); - if (ierr < 0) - CCTK_WARN(0, "Failed to register Psi4i_bound BC for WeylScal4::Psi4i!"); - } - - if (CCTK_EQUALS(Psi4r_bound, "none" ) || - CCTK_EQUALS(Psi4r_bound, "static") || - CCTK_EQUALS(Psi4r_bound, "flat" ) || - CCTK_EQUALS(Psi4r_bound, "zero" ) ) - { - ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, - "WeylScal4::Psi4r", Psi4r_bound); - if (ierr < 0) - CCTK_WARN(0, "Failed to register Psi4r_bound BC for WeylScal4::Psi4r!"); - } - - if (CCTK_EQUALS(Psi4i_group_bound, "radiative")) - { - /* select radiation boundary condition */ - static CCTK_INT handle_Psi4i_group_bound = -1; - if (handle_Psi4i_group_bound < 0) handle_Psi4i_group_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_Psi4i_group_bound < 0) CCTK_WARN(0, "could not create table!"); - if (Util_TableSetReal(handle_Psi4i_group_bound , Psi4i_group_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); - if (Util_TableSetReal(handle_Psi4i_group_bound ,Psi4i_group_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); - - ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Psi4i_group_bound, - "WeylScal4::Psi4i_group", "Radiation"); - - if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for WeylScal4::Psi4i_group!"); - - } - - if (CCTK_EQUALS(Psi4r_group_bound, "radiative")) - { - /* select radiation boundary condition */ - static CCTK_INT handle_Psi4r_group_bound = -1; - if (handle_Psi4r_group_bound < 0) handle_Psi4r_group_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_Psi4r_group_bound < 0) CCTK_WARN(0, "could not create table!"); - if (Util_TableSetReal(handle_Psi4r_group_bound , Psi4r_group_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); - if (Util_TableSetReal(handle_Psi4r_group_bound ,Psi4r_group_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); - - ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Psi4r_group_bound, - "WeylScal4::Psi4r_group", "Radiation"); - - if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for WeylScal4::Psi4r_group!"); - - } - - if (CCTK_EQUALS(Psi4i_bound, "radiative")) - { - /* select radiation boundary condition */ - static CCTK_INT handle_Psi4i_bound = -1; - if (handle_Psi4i_bound < 0) handle_Psi4i_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_Psi4i_bound < 0) CCTK_WARN(0, "could not create table!"); - if (Util_TableSetReal(handle_Psi4i_bound , Psi4i_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); - if (Util_TableSetReal(handle_Psi4i_bound ,Psi4i_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); - - ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Psi4i_bound, - "WeylScal4::Psi4i", "Radiation"); - - if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for WeylScal4::Psi4i!"); - - } - - if (CCTK_EQUALS(Psi4r_bound, "radiative")) - { - /* select radiation boundary condition */ - static CCTK_INT handle_Psi4r_bound = -1; - if (handle_Psi4r_bound < 0) handle_Psi4r_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_Psi4r_bound < 0) CCTK_WARN(0, "could not create table!"); - if (Util_TableSetReal(handle_Psi4r_bound , Psi4r_bound_limit, "LIMIT") < 0) - CCTK_WARN(0, "could not set LIMIT value in table!"); - if (Util_TableSetReal(handle_Psi4r_bound ,Psi4r_bound_speed, "SPEED") < 0) - CCTK_WARN(0, "could not set SPEED value in table!"); - - ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Psi4r_bound, - "WeylScal4::Psi4r", "Radiation"); - - if (ierr < 0) - CCTK_WARN(0, "Failed to register Radiation BC for WeylScal4::Psi4r!"); - - } - - if (CCTK_EQUALS(Psi4i_group_bound, "scalar")) - { - /* select scalar boundary condition */ - static CCTK_INT handle_Psi4i_group_bound = -1; - if (handle_Psi4i_group_bound < 0) handle_Psi4i_group_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_Psi4i_group_bound < 0) CCTK_WARN(0, "could not create table!"); - if (Util_TableSetReal(handle_Psi4i_group_bound ,Psi4i_group_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); - - ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Psi4i_group_bound, - "WeylScal4::Psi4i_group", "scalar"); - - if (ierr < 0) - CCTK_WARN(0, "Failed to register Scalar BC for WeylScal4::Psi4i_group!"); - - } - - if (CCTK_EQUALS(Psi4r_group_bound, "scalar")) - { - /* select scalar boundary condition */ - static CCTK_INT handle_Psi4r_group_bound = -1; - if (handle_Psi4r_group_bound < 0) handle_Psi4r_group_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_Psi4r_group_bound < 0) CCTK_WARN(0, "could not create table!"); - if (Util_TableSetReal(handle_Psi4r_group_bound ,Psi4r_group_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); - - ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Psi4r_group_bound, - "WeylScal4::Psi4r_group", "scalar"); - - if (ierr < 0) - CCTK_WARN(0, "Failed to register Scalar BC for WeylScal4::Psi4r_group!"); - - } - - if (CCTK_EQUALS(Psi4i_bound, "scalar")) - { - /* select scalar boundary condition */ - static CCTK_INT handle_Psi4i_bound = -1; - if (handle_Psi4i_bound < 0) handle_Psi4i_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_Psi4i_bound < 0) CCTK_WARN(0, "could not create table!"); - if (Util_TableSetReal(handle_Psi4i_bound ,Psi4i_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); - - ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Psi4i_bound, - "WeylScal4::Psi4i", "scalar"); - - if (ierr < 0) - CCTK_WARN(0, "Error in registering Scalar BC for WeylScal4::Psi4i!"); - - } - - if (CCTK_EQUALS(Psi4r_bound, "scalar")) - { - /* select scalar boundary condition */ - static CCTK_INT handle_Psi4r_bound = -1; - if (handle_Psi4r_bound < 0) handle_Psi4r_bound = Util_TableCreate(UTIL_TABLE_FLAGS_CASE_INSENSITIVE); - if (handle_Psi4r_bound < 0) CCTK_WARN(0, "could not create table!"); - if (Util_TableSetReal(handle_Psi4r_bound ,Psi4r_bound_scalar, "SCALAR") < 0) - CCTK_WARN(0, "could not set SCALAR value in table!"); - - ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, handle_Psi4r_bound, - "WeylScal4::Psi4r", "scalar"); - - if (ierr < 0) - CCTK_WARN(0, "Error in registering Scalar BC for WeylScal4::Psi4r!"); - - } return; } /* template for entries in parameter file: -#$bound$#WeylScal4::Psi4i_group_bound = "skip" -#$bound$#WeylScal4::Psi4i_group_bound_speed = 1.0 -#$bound$#WeylScal4::Psi4i_group_bound_limit = 0.0 -#$bound$#WeylScal4::Psi4i_group_bound_scalar = 0.0 - -#$bound$#WeylScal4::Psi4r_group_bound = "skip" -#$bound$#WeylScal4::Psi4r_group_bound_speed = 1.0 -#$bound$#WeylScal4::Psi4r_group_bound_limit = 0.0 -#$bound$#WeylScal4::Psi4r_group_bound_scalar = 0.0 - -#$bound$#WeylScal4::Psi4i_bound = "skip" -#$bound$#WeylScal4::Psi4i_bound_speed = 1.0 -#$bound$#WeylScal4::Psi4i_bound_limit = 0.0 -#$bound$#WeylScal4::Psi4i_bound_scalar = 0.0 - -#$bound$#WeylScal4::Psi4r_bound = "skip" -#$bound$#WeylScal4::Psi4r_bound_speed = 1.0 -#$bound$#WeylScal4::Psi4r_bound_limit = 0.0 -#$bound$#WeylScal4::Psi4r_bound_scalar = 0.0 - */ diff --git a/src/psis_calc_2nd.c b/src/psis_calc_2nd.c index 193c552..ecdc0e0 100644 --- a/src/psis_calc_2nd.c +++ b/src/psis_calc_2nd.c @@ -19,6 +19,21 @@ #define CUB(x) ((x) * (x) * (x)) #define QAD(x) ((x) * (x) * (x) * (x)) +void psis_calc_2nd_SelectBCs(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + CCTK_INT ierr = 0; + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "WeylScal4::Psi4i_group","flat"); + if (ierr < 0) + CCTK_WARN(1, "Failed to register flat BC for WeylScal4::Psi4i_group."); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "WeylScal4::Psi4r_group","flat"); + if (ierr < 0) + CCTK_WARN(1, "Failed to register flat BC for WeylScal4::Psi4r_group."); + return; +} + void psis_calc_2nd_Body(cGH const * restrict const cctkGH, int const dir, int const face, CCTK_REAL const normal[3], CCTK_REAL const tangentA[3], CCTK_REAL const tangentB[3], int const min[3], int const max[3], int const n_subblock_gfs, CCTK_REAL * restrict const subblock_gfs[]) { DECLARE_CCTK_ARGUMENTS; diff --git a/src/psis_calc_4th.c b/src/psis_calc_4th.c index 32fd7c2..ca493ac 100644 --- a/src/psis_calc_4th.c +++ b/src/psis_calc_4th.c @@ -19,6 +19,21 @@ #define CUB(x) ((x) * (x) * (x)) #define QAD(x) ((x) * (x) * (x) * (x)) +void psis_calc_4th_SelectBCs(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + CCTK_INT ierr = 0; + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "WeylScal4::Psi4i_group","flat"); + if (ierr < 0) + CCTK_WARN(1, "Failed to register flat BC for WeylScal4::Psi4i_group."); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "WeylScal4::Psi4r_group","flat"); + if (ierr < 0) + CCTK_WARN(1, "Failed to register flat BC for WeylScal4::Psi4r_group."); + return; +} + void psis_calc_4th_Body(cGH const * restrict const cctkGH, int const dir, int const face, CCTK_REAL const normal[3], CCTK_REAL const tangentA[3], CCTK_REAL const tangentB[3], int const min[3], int const max[3], int const n_subblock_gfs, CCTK_REAL * restrict const subblock_gfs[]) { DECLARE_CCTK_ARGUMENTS; -- cgit v1.2.3