aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrideout <rideout@daab82bb-f315-4ad1-b6d0-9353ff8b6e27>2003-02-14 14:37:43 +0000
committerrideout <rideout@daab82bb-f315-4ad1-b6d0-9353ff8b6e27>2003-02-14 14:37:43 +0000
commitf6e304c79074b9da4b0b1a4491e8f1b31c402d6d (patch)
tree877ce11acd7edc6b4e7f59fa37d6b5df42f31ca0
parente3324cdc54a80d7edec34f68b8ee24fc721bd62d (diff)
Use new boundary interface.
Added some useful comments. git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/WaveToyFreeF90/trunk@47 daab82bb-f315-4ad1-b6d0-9353ff8b6e27
-rw-r--r--interface.ccl1
-rw-r--r--schedule.ccl4
-rw-r--r--src/WaveToy.F9038
3 files changed, 31 insertions, 12 deletions
diff --git a/interface.ccl b/interface.ccl
index 705e98a..95db442 100644
--- a/interface.ccl
+++ b/interface.ccl
@@ -4,7 +4,6 @@
implements: wavetoy
inherits: Grid Boundary
-USES INCLUDE: Boundary.h
USES INCLUDE: Symmetry.h
public:
diff --git a/schedule.ccl b/schedule.ccl
index 5b54e83..5d81f7a 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -23,3 +23,7 @@ schedule WaveToyFreeF90_Boundaries as WaveToy_Boundaries at EVOL AFTER WaveToy_E
{
LANG: Fortran
} "Boundaries of 3D wave equation"
+
+schedule GROUP ApplyBCs at EVOL after WaveToy_Evolution
+{
+} "Apply boundary conditions"
diff --git a/src/WaveToy.F90 b/src/WaveToy.F90
index f82aed7..9b0d9b2 100644
--- a/src/WaveToy.F90
+++ b/src/WaveToy.F90
@@ -1,5 +1,5 @@
/*@@
- @file WaveToyFortran.F90
+ @file WaveToy.F90
@date
@author Tom Goodale
@desc
@@ -7,13 +7,14 @@
@enddesc
@@*/
-#include "cctk.h"
+#include "cctk.h"
+#include "cctk_Faces.h"
#include "cctk_Parameters.h"
#include "cctk_Arguments.h"
/*@@
- @routine WaveToyFortran_Evolution
+ @routine WaveToyFreeF90_Evolution
@date
@author Tom Goodale
@desc
@@ -122,21 +123,36 @@ subroutine WaveToyFreeF90_Boundaries(CCTK_ARGUMENTS)
finf = 1.0d0
npow = 1
+! Apply the symmetry boundary conditions on any coordinate axes
+! -------------------------------------------------------------
call CartSymGN(ierr,cctkGH,"wavetoy::scalarevolve")
+! Apply the outer boundary conditions
+! -----------------------------------
+! Note: In each of the following calls to Boundary_SelectVarForBC,
+! default arguments are used, so an invalid table handle of -1 can
+! be passed
+
if (CCTK_EQUALS(bound,"flat")) then
- call BndFlatVN(ierr,cctkGH,sw,"wavetoy::phi")
+ call Boundary_SelectVarForBC(ierr, cctkGH, CCTK_ALL_FACES, -1, &
+ "wavetoy::phi", "Flat");
else if (CCTK_EQUALS(bound,"static")) then
- call BndStaticVN(ierr,cctkGH,sw,"wavetoy::phi")
+ call Boundary_SelectVarForBC(ierr, cctkGH, CCTK_ALL_FACES, -1, &
+ "wavetoy::phi", "Static");
else if (CCTK_EQUALS(bound,"radiation")) then
- call BndRadiativeVN(ierr,cctkGH,sw,zero,one,"wavetoy::phi", &
- "wavetoy::phi")
+ call Boundary_SelectVarForBC(ierr, cctkGH, CCTK_ALL_FACES, -1, &
+ "wavetoy::phi", "Radiative");
else if (CCTK_EQUALS(bound,"robin")) then
- call BndRobinVN(ierr,cctkGH, sw, finf, npow,"wavetoy::phi")
+ call Boundary_SelectVarForBC(ierr, cctkGH, CCTK_ALL_FACES, -1, &
+ "wavetoy::phi", "Robin");
else if (CCTK_EQUALS(bound,"zero")) then
- call BndScalarVN(ierr,cctkGH,zero,sw,"wavetoy::phi")
- else if (.NOT. CCTK_EQUALS(bound,"none")) then
- call CCTK_WARN(0,"Unrecognized boundary condition")
+ call Boundary_SelectVarForBC(ierr, cctkGH, CCTK_ALL_FACES, -1, &
+ "wavetoy::phi", "Scalar");
+ else if (CCTK_EQUALS(bound,"none")) then
+ call Boundary_SelectVarForBC(ierr, cctkGH, CCTK_ALL_FACES, -1, &
+ "wavetoy::phi", "None");
+ else
+ call CCTK_WARN(0,"Unrecognized boundary condition")
end if
if (ierr < 0) then