aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorallen <allen@50555cc7-fb31-491a-85db-9a2874240742>2003-07-18 17:11:09 +0000
committerallen <allen@50555cc7-fb31-491a-85db-9a2874240742>2003-07-18 17:11:09 +0000
commitd8e0960b453e6038484f3e1f9c9acd6294c9b3e9 (patch)
tree6c09530418023dfb9e9970d0ad22c1b48bd0d8bc /src
parentc5674a63df4ad1855ef4177ea34b949e28848403 (diff)
Changes to use of new boundary infrastructure
git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/WaveToyCXX/trunk@61 50555cc7-fb31-491a-85db-9a2874240742
Diffstat (limited to 'src')
-rw-r--r--src/WaveToy.cc55
1 files changed, 7 insertions, 48 deletions
diff --git a/src/WaveToy.cc b/src/WaveToy.cc
index 8acf599..5f076d6 100644
--- a/src/WaveToy.cc
+++ b/src/WaveToy.cc
@@ -113,63 +113,22 @@ extern "C" void WaveToyCXX_Boundaries(CCTK_ARGUMENTS)
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
- int ierr=-1;
- int sw[3];
-
- /* Default arguments for Robin boundary condition
- * CCTK_REAL finf = 1.0;
- * int npow = 1;
- */
-
- /* Set the stencil width */
- sw[0]=1;
- sw[1]=1;
- sw[2]=1;
+ int ierr=-0;
ierr = CartSymGN(cctkGH,"wavetoy::scalarevolve");
- if (CCTK_EQUALS(bound,"flat"))
- {
- /* Uses all default arguments, so invalid table handle -1 can be passed */
- ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "wavetoy::phi",
- "Flat");
- }
- else if (CCTK_Equals(bound,"static"))
- {
- /* Uses all default arguments, so invalid table handle -1 can be passed */
- ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "wavetoy::phi",
- "Static");
- }
- else if (CCTK_Equals(bound,"radiation"))
- {
- /* Uses all default arguments, so invalid table handle -1 can be passed */
- ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "wavetoy::phi",
- "Radiation");
- }
- else if (CCTK_Equals(bound,"robin"))
- {
- /* Uses all default arguments, so invalid table handle -1 can be passed */
- ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "wavetoy::phi",
- "Robin");
- }
- else if (CCTK_Equals(bound,"zero"))
+ if (CCTK_EQUALS(bound,"flat") || CCTK_EQUALS(bound,"static") ||
+ CCTK_EQUALS(bound,"radiation") || CCTK_EQUALS(bound,"robin") ||
+ CCTK_EQUALS(bound,"zero") || CCTK_EQUALS(bound,"none"))
{
/* Uses all default arguments, so invalid table handle -1 can be passed */
- ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1, "wavetoy::phi",
- "Scalar");
- }
- else if (CCTK_Equals(bound,"none"))
- {
- /* Do nothing */
- }
- else
- {
- CCTK_WARN(0,"Boundary condition not recognized");
+ ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
+ "wavetoy::phi", bound);
}
if (ierr < 0)
{
- CCTK_WARN(0,"Boundary conditions not applied - giving up!");
+ CCTK_WARN(0,"WaveToyCXX_Boundaries: Error selecting boundary condition");
}
return;