aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/WaveToy.F31
1 files changed, 14 insertions, 17 deletions
diff --git a/src/WaveToy.F b/src/WaveToy.F
index fb73cca..c8e6ef1 100644
--- a/src/WaveToy.F
+++ b/src/WaveToy.F
@@ -5,6 +5,7 @@
@desc
Evolution routines for the wave equation solver
@enddesc
+ @version $Header$
@@*/
#include "cctk.h"
@@ -12,8 +13,6 @@
#include "cctk_Arguments.h"
#include "cctk_Functions.h"
-#define BOUNDARY_ERROR if (ierr < 0) call CCTK_WARN(0,"WaveToyF90_Boundaries: Error in boundary routines")
-
/*@@
@routine WaveToyF90_Evolution
@date
@@ -110,33 +109,31 @@
DECLARE_CCTK_PARAMETERS
DECLARE_CCTK_FUNCTIONS
- integer :: ierr
+c Local declarations
+ CCTK_INT :: ierr
+
+ CHARACTER (len=100) :: boundary
+ INTEGER :: length
+
ierr = 0
+c The "bound" parameter needs to be converted into a Fortran string.
+ call CCTK_FortranString(length,bound,boundary)
+
c Apply the outer boundary conditions
c -----------------------------------
c Note: In each of the following calls to Boundary_SelectVarForBC,
c default arguments are used, so an invalid table handle of -1 can
c be passed
- if (CCTK_EQUALS(bound,"flat")) then
+ if (CCTK_EQUALS(bound,"flat") .or. CCTK_EQUALS(bound,"static") .or.
+ $ CCTK_EQUALS(bound,"radiation") .or. CCTK_EQUALS(bound,"robin") .or.
+ $ CCTK_EQUALS(bound,"none") ) then
ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
- $ "wavetoy::phi", "Flat")
- else if (CCTK_EQUALS(bound,"static")) then
- ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
- $ "wavetoy::phi", "Static")
- else if (CCTK_EQUALS(bound,"radiation")) then
- ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
- $ "wavetoy::phi", "Radiation")
- else if (CCTK_EQUALS(bound,"robin")) then
- ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
- $ "wavetoy::phi", "Robin")
+ $ "wavetoy::phi", boundary)
else if (CCTK_EQUALS(bound,"zero")) then
ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
$ "wavetoy::phi", "Scalar")
- else if (.NOT. CCTK_EQUALS(bound,"none")) then
- ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, 1, -1,
- $ "wavetoy::phi", "None")
end if
if (ierr < 0) then