aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--param.ccl3
-rw-r--r--src/WaveToy.cc27
2 files changed, 27 insertions, 3 deletions
diff --git a/param.ccl b/param.ccl
index 964d5ec..6a1fdf6 100644
--- a/param.ccl
+++ b/param.ccl
@@ -7,7 +7,10 @@ KEYWORD bound "Type of boundary condition to use"
{
"none" :: "No boundary condition"
"flat" :: "Flat boundary condition"
+ "static" :: "Static boundary condition"
"radiation" :: "Radiation boundary condition"
+ "robin" :: "Robin boundary condition"
+ "zero" :: "Zero boundary condition"
} "none"
diff --git a/src/WaveToy.cc b/src/WaveToy.cc
index 66e3be3..bd2237d 100644
--- a/src/WaveToy.cc
+++ b/src/WaveToy.cc
@@ -115,6 +115,10 @@ extern "C" void WaveToyCXX_Boundaries(CCTK_ARGUMENTS)
int ierr=-1;
int sw[3];
+ CCTK_REAL finf = 1.0;
+
+ int npow = 1;
+
/* Set the stencil width */
sw[0]=1;
sw[1]=1;
@@ -122,14 +126,31 @@ extern "C" void WaveToyCXX_Boundaries(CCTK_ARGUMENTS)
ierr = CartSymGN(cctkGH,"wavetoy::scalarevolve");
- if (CCTK_Equals(bound,"flat"))
+ if (CCTK_EQUALS(bound,"flat"))
{
ierr = BndFlatVN(cctkGH,sw,"wavetoy::phi");
}
+ else if (CCTK_Equals(bound,"static"))
+ {
+ ierr = BndStaticVN(cctkGH,sw,"wavetoy::phi");
+ }
else if (CCTK_Equals(bound,"radiation"))
{
- ierr = BndRadiativeVN(cctkGH,sw,0,1,"wavetoy::phi","wavetoy::phi");
- }
+ ierr = BndRadiativeVN(cctkGH,sw,0.0,1.0,"wavetoy::phi",
+ "wavetoy::phi");
+ }
+ else if (CCTK_Equals(bound,"robin"))
+ {
+ ierr = BndRobinVN(cctkGH,sw,finf,npow,"wavetoy::phi");
+ }
+ else if (CCTK_Equals(bound,"zero"))
+ {
+ ierr = BndScalarVN(cctkGH,sw,0.0,"wavetoy::phi");
+ }
+ else if (! CCTK_Equals(bound,"none"))
+ {
+ CCTK_WARN(0,"Boundary condition not recognized");
+ }
if (ierr < 0)
{