diff options
author | allen <allen@50555cc7-fb31-491a-85db-9a2874240742> | 2002-05-31 10:04:54 +0000 |
---|---|---|
committer | allen <allen@50555cc7-fb31-491a-85db-9a2874240742> | 2002-05-31 10:04:54 +0000 |
commit | 8c047753ebe0a30e79770fe9944d94a05600b05d (patch) | |
tree | ce132b3b84f38653bf880d3fb60dd5ab999df856 | |
parent | 19fd4f84c2ea7b95e3afb7c31e65252a522767d4 (diff) |
Standardizing all boundary conditions across wavetoy thorns
git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/WaveToyCXX/trunk@49 50555cc7-fb31-491a-85db-9a2874240742
-rw-r--r-- | param.ccl | 3 | ||||
-rw-r--r-- | src/WaveToy.cc | 27 |
2 files changed, 27 insertions, 3 deletions
@@ -7,7 +7,10 @@ KEYWORD bound "Type of boundary condition to use" { "none" :: "No boundary condition" "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.cc b/src/WaveToy.cc index 66e3be3..bd2237d 100644 --- a/src/WaveToy.cc +++ b/src/WaveToy.cc @@ -115,6 +115,10 @@ extern "C" void WaveToyCXX_Boundaries(CCTK_ARGUMENTS) int ierr=-1; int sw[3]; + CCTK_REAL finf = 1.0; + + int npow = 1; + /* Set the stencil width */ sw[0]=1; sw[1]=1; @@ -122,14 +126,31 @@ extern "C" void WaveToyCXX_Boundaries(CCTK_ARGUMENTS) ierr = CartSymGN(cctkGH,"wavetoy::scalarevolve"); - if (CCTK_Equals(bound,"flat")) + if (CCTK_EQUALS(bound,"flat")) { ierr = BndFlatVN(cctkGH,sw,"wavetoy::phi"); } + else if (CCTK_Equals(bound,"static")) + { + ierr = BndStaticVN(cctkGH,sw,"wavetoy::phi"); + } else if (CCTK_Equals(bound,"radiation")) { - ierr = BndRadiativeVN(cctkGH,sw,0,1,"wavetoy::phi","wavetoy::phi"); - } + 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) { |