aboutsummaryrefslogtreecommitdiff
path: root/src/Register.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Register.c')
-rw-r--r--src/Register.c92
1 files changed, 75 insertions, 17 deletions
diff --git a/src/Register.c b/src/Register.c
index c060b72..0bd0252 100644
--- a/src/Register.c
+++ b/src/Register.c
@@ -10,6 +10,7 @@
#include "cctk.h"
#include "cctk_Arguments.h"
+#include "cctk_Parameters.h"
#include "util_Table.h"
#include "Boundary.h"
@@ -28,7 +29,7 @@ CCTK_FILEVERSION(CactusBase_Boundary_Register_c);
void Boundary_RegisterBCs(CCTK_ARGUMENTS);
/********************************************************************
- ***************** Aliased Routine Prototypes *********************
+ ***************** Aliased Routine Prototypes ***********************
********************************************************************/
/********************************************************************
@@ -44,11 +45,11 @@ void Boundary_RegisterBCs(CCTK_ARGUMENTS);
********************************************************************/
/********************************************************************
- ********************* Aliased Routines **********************
+ ********************* Aliased Routines ***********************
********************************************************************/
/********************************************************************
- ********************* Scheduled Routines **********************
+ ********************* Scheduled Routines *********************
********************************************************************/
/*@@
@@ -70,22 +71,79 @@ void Boundary_RegisterBCs(CCTK_ARGUMENTS);
@@*/
void Boundary_RegisterBCs(CCTK_ARGUMENTS) {
- int err;
-
- err = Boundary_RegisterPhysicalBC(cctkGH, (CCTK_FPOINTER) &BndRadiative,
- "Radiative");
- if (err) {
- CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "Boundary_RegisterPhysicalBC(cctkGH, &BndRadiative, "
- "\"Radiative\") returned %d", err);
+ DECLARE_CCTK_PARAMETERS;
+ int err;
+
+ if (register_scalar)
+ {
+ err = Boundary_RegisterPhysicalBC(cctkGH, (CCTK_FPOINTER) &BndScalar,
+ "Scalar");
+ if (err)
+ {
+ CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Error %d when registering routine to handle \"Scalar\" "
+ "boundary condition", err);
+ }
}
- err = Boundary_RegisterPhysicalBC(cctkGH, (CCTK_FPOINTER) &BndNone,
- "None");
- if (err) {
- CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "Boundary_RegisterPhysicalBC(cctkGH, &BndNone, "
- "\"None\") returned %d", err);
+ if (register_radiation)
+ {
+ err = Boundary_RegisterPhysicalBC(cctkGH, (CCTK_FPOINTER) &BndRadiative,
+ "Radiative");
+ if (err)
+ {
+ CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Error %d when registering routine to handle \"Radiative\" "
+ "boundary condition", err);
+ }
+ }
+
+ if (register_copy)
+ {
+ err = Boundary_RegisterPhysicalBC(cctkGH, (CCTK_FPOINTER) &BndCopy,
+ "Copy");
+ if (err)
+ {
+ CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Error %d when registering routine to handle \"Copy\" "
+ "boundary condition", err);
+ }
+ }
+
+ if (register_robin)
+ {
+ err = Boundary_RegisterPhysicalBC(cctkGH, (CCTK_FPOINTER) &BndRobin,
+ "Robin");
+ if (err)
+ {
+ CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Error %d when registering routine to handle \"Robin\" "
+ "boundary condition", err);
+ }
+ }
+
+ if (register_static)
+ {
+ err = Boundary_RegisterPhysicalBC(cctkGH, (CCTK_FPOINTER) &BndStatic,
+ "Static");
+ if (err)
+ {
+ CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Error %d when registering routine to handle \"Static\" "
+ "boundary condition", err);
+ }
+ }
+
+ if (register_none)
+ {
+ err = Boundary_RegisterPhysicalBC(cctkGH, (CCTK_FPOINTER) &BndNone,
+ "None");
+ if (err)
+ {
+ CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Error %d when registering routine to handle \"None\" "
+ "boundary condition", err);
+ }
}
}