From 12fb1d67fe0e63e450e5e4e66f42f2074a39ff97 Mon Sep 17 00:00:00 2001 From: rideout Date: Fri, 14 Feb 2003 14:31:50 +0000 Subject: Modify to use the new boundary interface. Added some useful comments. Commented out face specific calls, as these are not yet possible under the new interface. git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/WaveToyF90/trunk@75 f80f6fb6-8356-4fd4-90bc-d84ad503c100 --- interface.ccl | 1 - schedule.ccl | 7 +++++-- src/WaveToy.F | 62 +++++++++++++++++++++++++++++++---------------------------- 3 files changed, 38 insertions(+), 32 deletions(-) diff --git a/interface.ccl b/interface.ccl index 4fcfa29..1e724d9 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 4552608..1831615 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -1,4 +1,4 @@ -# Schedule definitions for thorn WaveToy90 +# Schedule definitions for thorn WaveToyF90 # $Header$ STORAGE: scalarevolve[3] @@ -23,4 +23,7 @@ schedule WaveToyF90_Boundaries as WaveToy_Boundaries at EVOL AFTER WaveToy_Evolu { LANG: Fortran } "Boundaries of 3D wave equation" - + +schedule GROUP ApplyBCs at EVOL after WaveToy_Evolution +{ +} "Apply boundary conditions" diff --git a/src/WaveToy.F b/src/WaveToy.F index 48189c7..05d847e 100644 --- a/src/WaveToy.F +++ b/src/WaveToy.F @@ -1,5 +1,5 @@ /*@@ - @file WaveToyF90.F + @file WaveToy.F @date @author Tom Goodale @desc @@ -7,7 +7,8 @@ @enddesc @@*/ -#include "cctk.h" +#include "cctk.h" +#include "cctk_Faces.h" #include "cctk_Parameters.h" #include "cctk_Arguments.h" @@ -128,30 +129,43 @@ finf = 1.0d0 npow = 1 +c Apply the symmetry boundary conditions on any coordinate axes +c ------------------------------------------------------------- call CartSymGN(ierr,cctkGH,"wavetoy::scalarevolve") +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 - 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,rzero,rone,"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 BndScalarDirVN(ierr,cctkGH,swdir,mione ,sval,"wavetoy::phi") - BOUNDARY_ERROR - call BndScalarDirVN(ierr,cctkGH,swdir,ione ,sval,"wavetoy::phi") - BOUNDARY_ERROR - call BndScalarDirVN(ierr,cctkGH,swdir,mitwo ,sval,"wavetoy::phi") - BOUNDARY_ERROR - call BndScalarDirVN(ierr,cctkGH,swdir,itwo ,sval,"wavetoy::phi") - BOUNDARY_ERROR - call BndScalarDirVN(ierr,cctkGH,swdir,mithree,sval,"wavetoy::phi") - BOUNDARY_ERROR - call BndScalarDirVN(ierr,cctkGH,swdir,ithree ,sval,"wavetoy::phi") - BOUNDARY_ERROR +c Face specific calls are not working yet with the new boundary interface: +c call BndScalarDirVN(ierr,cctkGH,swdir,mione ,sval,"wavetoy::phi") +c BOUNDARY_ERROR +c call BndScalarDirVN(ierr,cctkGH,swdir,ione ,sval,"wavetoy::phi") +c BOUNDARY_ERROR +c call BndScalarDirVN(ierr,cctkGH,swdir,mitwo ,sval,"wavetoy::phi") +c BOUNDARY_ERROR +c call BndScalarDirVN(ierr,cctkGH,swdir,itwo ,sval,"wavetoy::phi") +c BOUNDARY_ERROR +c call BndScalarDirVN(ierr,cctkGH,swdir,mithree,sval,"wavetoy::phi") +c BOUNDARY_ERROR +c call BndScalarDirVN(ierr,cctkGH,swdir,ithree ,sval,"wavetoy::phi") +c BOUNDARY_ERROR + call Boundary_SelectVarForBC(ierr, cctkGH, CCTK_ALL_FACES, -1, + $ "wavetoy::phi", "Scalar"); else if (.NOT. CCTK_EQUALS(bound,"none")) then call CCTK_WARN(0,"Unrecognized boundary condition") end if @@ -161,13 +175,3 @@ end if end subroutine WaveToyF90_Boundaries - - - - - - - - - - -- cgit v1.2.3