From 5c23ffb1a75da6e028444879c0089b85b05942da Mon Sep 17 00:00:00 2001 From: allen Date: Fri, 31 May 2002 10:04:52 +0000 Subject: Standardizing all boundary conditions across wavetoy thorns git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/WaveToyC/trunk@73 90eea020-d82d-4da5-bf6e-4ee79ff7632f --- param.ccl | 2 ++ src/WaveToy.c | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/param.ccl b/param.ccl index ffb6720..3c75f93 100644 --- a/param.ccl +++ b/param.ccl @@ -9,6 +9,8 @@ KEYWORD bound "Type of boundary condition to use" "flat" :: "Flat boundary condition" "static" :: "Static boundary condition" "radiation" :: "Radiation boundary condition" + "robin" :: "Robin boundary condition" + "zero" :: "Zero boundary condition" } "none" diff --git a/src/WaveToy.c b/src/WaveToy.c index e959cea..94ebae7 100644 --- a/src/WaveToy.c +++ b/src/WaveToy.c @@ -120,8 +120,13 @@ void WaveToyC_Boundaries(CCTK_ARGUMENTS) DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS + CCTK_REAL finf; int ierr=-1; int sw[3]; + int npow; + + finf = 1.0; + npow = 1; /* Set the stencil width */ sw[0]=1; @@ -143,6 +148,18 @@ void WaveToyC_Boundaries(CCTK_ARGUMENTS) ierr = BndRadiativeVN(cctkGH,sw,0.0,1.0,"wavetoy::phi", "wavetoy::phi"); } + else if (CCTK_Equals(bound,"robin")) + { + ierr = BndRobinVN(cctkGH,sw,finf,npow,"wavetoy::phi"); + } + else if (CCTK_Equals(bound,"zero")) + { + ierr = BndScalarVN(cctkGH,sw, 0.0,"wavetoy::phi"); + } + else if (! CCTK_Equals(bound,"none")) + { + CCTK_WARN(0,"Boundary condition not recognized"); + } if (ierr < 0) { -- cgit v1.2.3