From 264b81611ca90f58067e261b02065fc236e139a7 Mon Sep 17 00:00:00 2001 From: allen Date: Fri, 31 May 2002 10:04:57 +0000 Subject: Standardizing all boundary conditions across wavetoy thorns git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/WaveToyF90/trunk@71 f80f6fb6-8356-4fd4-90bc-d84ad503c100 --- param.ccl | 5 ++++- src/WaveToy.F | 23 ++++++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/param.ccl b/param.ccl index 0c596d2..41e348c 100644 --- a/param.ccl +++ b/param.ccl @@ -6,9 +6,12 @@ private: KEYWORD bound "Type of boundary condition to use" { "none" :: "No boundary condition" - "zero" :: "Set boundary to zero" "flat" :: "Flat boundary condition" + "static" :: "Static boundary condition" "radiation" :: "Radiation boundary condition" + "robin" :: "Robin boundary condition" + "zero" :: "Zero boundary condition" } "none" + \ No newline at end of file diff --git a/src/WaveToy.F b/src/WaveToy.F index 87bc3fe..a03de93 100644 --- a/src/WaveToy.F +++ b/src/WaveToy.F @@ -114,30 +114,43 @@ CCTK_REAL,parameter :: sval = 0.0 CCTK_REAL,parameter :: rzero = 0.0 CCTK_REAL,parameter :: rone = 1.0 + integer,parameter :: swdir = 1 integer,parameter :: ione = 1,mione=-1 integer,parameter :: itwo = 2,mitwo=-2 integer,parameter :: ithree = 3,mithree=-3 integer,parameter :: ifour = 4,izero = 0 + + CCTK_REAL finf + integer npow + + finf = 1.0d0 + npow = 1 + call CartSymGN(ierr,cctkGH,"wavetoy::scalarevolve") if (CCTK_EQUALS(bound,"flat")) then call BndFlatVN(ierr,cctkGH,sw,"wavetoy::phi") + else if (CCTK_EQUALS(bound,"static")) then + call BndStaticVN(ierr,cctkGH,sw,"wavetoy::phi") + else if (CCTK_EQUALS(bound,"radiation")) then + call BndRadiativeVN(ierr,cctkGH,sw,rzero,rone,"wavetoy::phi", + & "wavetoy::phi") + else if (CCTK_EQUALS(bound,"robin")) then + call BndRobinVN(ierr,cctkGH, sw, finf, npow,"wavetoy::phi") else if (CCTK_EQUALS(bound,"zero")) then -c call BndScalarVN(ierr,cctkGH,sw,sval,"wavetoy::phi") call BndScalarDirVN(ierr,cctkGH,swdir,mione ,sval,"wavetoy::phi") call BndScalarDirVN(ierr,cctkGH,swdir,ione ,sval,"wavetoy::phi") call BndScalarDirVN(ierr,cctkGH,swdir,mitwo ,sval,"wavetoy::phi") call BndScalarDirVN(ierr,cctkGH,swdir,itwo ,sval,"wavetoy::phi") call BndScalarDirVN(ierr,cctkGH,swdir,mithree,sval,"wavetoy::phi") call BndScalarDirVN(ierr,cctkGH,swdir,ithree ,sval,"wavetoy::phi") - else if (CCTK_EQUALS(bound,"radiation")) then - call BndRadiativeVN(ierr,cctkGH,sw,rzero,rone, - & "wavetoy::phi","wavetoy::phi") + else if (.NOT. CCTK_EQUALS(bound,"none")) then + call CCTK_WARN(0,"Unrecognized boundary condition") end if if (ierr < 0) then - call CCTK_WARN(0,"WaveToyF90_Boundaries: Error in boundary routines - giving up!") + call CCTK_WARN(0,"WaveToyF90_Boundaries: Error in boundary routines") end if end subroutine WaveToyF90_Boundaries -- cgit v1.2.3