aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallen <allen@f80f6fb6-8356-4fd4-90bc-d84ad503c100>2001-01-17 15:30:18 +0000
committerallen <allen@f80f6fb6-8356-4fd4-90bc-d84ad503c100>2001-01-17 15:30:18 +0000
commit6dc7e7259e1283f9ccd52cd81953439a71398005 (patch)
tree597c10ad9a8c69b0fff45adc874d9ddbdde3073f
parentdf15ceb404a0222c1ed8935efcaf972c2e394ed8 (diff)
Making the call to do zero boundary conditions use new directional
boundary conditions, and new testsuite to test it. git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/WaveToyF90/trunk@55 f80f6fb6-8356-4fd4-90bc-d84ad503c100
-rw-r--r--param.ccl1
-rw-r--r--src/WaveToy.F21
-rw-r--r--test/test_wavef90_zero/phi.xl198
-rw-r--r--test/test_wavef90_zero/phi_max.tl12
-rw-r--r--test/test_wavef90_zero/phi_min.tl12
-rw-r--r--test/test_wavef90_zero/phi_nm1.tl12
-rw-r--r--test/test_wavef90_zero/phi_nm2.tl12
7 files changed, 263 insertions, 5 deletions
diff --git a/param.ccl b/param.ccl
index 14f9294..0c596d2 100644
--- a/param.ccl
+++ b/param.ccl
@@ -6,6 +6,7 @@ private:
KEYWORD bound "Type of boundary condition to use"
{
"none" :: "No boundary condition"
+ "zero" :: "Set boundary to zero"
"flat" :: "Flat boundary condition"
"radiation" :: "Radiation boundary condition"
} "none"
diff --git a/src/WaveToy.F b/src/WaveToy.F
index bd434d8..0ae3478 100644
--- a/src/WaveToy.F
+++ b/src/WaveToy.F
@@ -111,17 +111,28 @@
integer i
integer :: ierr=-1
integer,dimension(3):: sw=1
- CCTK_REAL,parameter :: zero = 0.0
- CCTK_REAL,parameter :: one = 1.0
-
+ 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
call CartSymGN(ierr,cctkGH,"wavetoy::scalarevolve")
if (CCTK_EQUALS(bound,"flat")) then
call BndFlatVN(ierr,cctkGH,sw,"wavetoy::phi")
else if (CCTK_EQUALS(bound,"zero")) then
- call BndScalarVN(ierr,cctkGH,zero,sw,"wavetoy::phi")
+# 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,zero,one,
+ call BndRadiativeVN(ierr,cctkGH,sw,rzero,rone,
& "wavetoy::phi","wavetoy::phi")
end if
diff --git a/test/test_wavef90_zero/phi.xl b/test/test_wavef90_zero/phi.xl
new file mode 100644
index 0000000..e98b912
--- /dev/null
+++ b/test/test_wavef90_zero/phi.xl
@@ -0,0 +1,198 @@
+
+
+"Time = 0.000000
+-0.300000 0.0772707537752
+0.300000 0.0772707537752
+0.900000 0.1292593546971
+1.500000 0.2208214420284
+2.100000 0.3529089299372
+2.700000 0.5192102694005
+3.300000 0.6998161919677
+3.900000 0.8624762718586
+4.500000 0.9710346043534
+5.100000 0.9982370567948
+5.700000 0.9367420144351
+6.300000 0.8022624770949
+6.900000 0.6270073768484
+7.500000 0.4471508970148
+8.100000 0.2909622162579
+
+
+"Time = 0.300000
+-0.300000 0.1393184064019
+0.300000 0.1393184064019
+0.900000 0.1975847110096
+1.500000 0.3062741452991
+2.100000 0.4554646524072
+2.700000 0.6299296619766
+3.300000 0.8021921868134
+3.900000 0.9366725320316
+4.500000 1.0007334088932
+5.100000 0.9771783117087
+5.700000 0.8714871457426
+6.300000 0.7095808925903
+6.900000 0.5273417858140
+7.500000 0.3576688235253
+8.100000 0.0000000000000
+
+
+"Time = 0.600000
+-0.300000 0.2450657874844
+0.300000 0.2450657874844
+0.900000 0.3063938562633
+1.500000 0.4275754994725
+2.100000 0.5875326742492
+2.700000 0.7594519468076
+3.300000 0.9090544974737
+3.900000 1.0007207893735
+4.500000 1.0095375644101
+5.100000 0.9313582488327
+5.700000 0.7847341927681
+6.300000 0.6033335286836
+6.900000 0.4230286782330
+7.500000 0.2150600415987
+8.100000 0.0000000000000
+
+
+"Time = 0.900000
+-0.300000 0.3968092201510
+0.300000 0.3968092201510
+0.900000 0.4612542907489
+1.500000 0.5868097261730
+2.100000 0.7462961828157
+2.700000 0.9011863559196
+3.300000 1.0121890493922
+3.900000 1.0475533118886
+4.500000 0.9938122606057
+5.100000 0.8613525959984
+5.700000 0.6803008397561
+6.300000 0.4885565892616
+6.900000 0.3045246703487
+7.500000 0.0664935828778
+8.100000 0.0000000000000
+
+
+"Time = 1.200000
+-0.300000 0.5968864557660
+0.300000 0.5968864557660
+0.900000 0.6634200568401
+1.500000 0.7832867114987
+2.100000 0.9262870132775
+2.700000 1.0464509311060
+3.300000 1.1026365452681
+3.900000 1.0708606286750
+4.500000 0.9516509078131
+5.100000 0.7695373165573
+5.700000 0.5631271680828
+6.300000 0.3670224598721
+6.900000 0.1663170623995
+7.500000 -0.0410290666581
+8.100000 0.0000000000000
+
+
+"Time = 1.500000
+-0.300000 0.8468638921866
+0.300000 0.8468638921866
+0.900000 0.9096824905158
+1.500000 1.0118902155622
+2.100000 1.1191797723429
+2.700000 1.1850521641052
+3.300000 1.1715777583589
+3.900000 1.0658428285460
+4.500000 0.8831617240967
+5.100000 0.6598679115944
+5.700000 0.4379095442727
+6.300000 0.2362346684669
+6.900000 0.0219784712293
+7.500000 -0.0865047825206
+8.100000 0.0000000000000
+
+
+"Time = 1.800000
+-0.300000 1.1439552773541
+0.300000 1.1439552773541
+0.900000 1.1928303039108
+1.500000 1.2623590177638
+2.100000 1.3137084038740
+2.700000 1.3061063451054
+3.300000 1.2112923140727
+3.900000 1.0298141343834
+4.500000 0.7905117480480
+5.100000 0.5372599590175
+5.700000 0.3071448987473
+6.300000 0.0953131749857
+6.900000 -0.0982722870300
+7.500000 -0.0825441039747
+8.100000 0.0000000000000
+
+
+"Time = 2.100000
+-0.300000 1.4777029324391
+0.300000 1.4777029324391
+0.900000 1.5007144586172
+1.500000 1.5197917554214
+2.100000 1.4960135325299
+2.700000 1.3989571738336
+3.300000 1.2160435134256
+3.900000 0.9625645974774
+4.500000 0.6776639588669
+5.100000 0.4063891714647
+5.700000 0.1709098688614
+6.300000 -0.0463782772060
+6.900000 -0.1666804619982
+7.500000 -0.0613695400451
+8.100000 0.0000000000000
+
+
+"Time = 2.400000
+-0.300000 1.8287092321577
+0.300000 1.8287092321577
+0.900000 1.8146817721101
+1.500000 1.7655652525217
+2.100000 1.6506551991273
+2.700000 1.4540918571554
+3.300000 1.1827266218174
+3.900000 0.8664024004552
+4.500000 0.5496984395460
+5.100000 0.2703960530188
+5.700000 0.0303469781870
+6.300000 -0.1671711009694
+6.900000 -0.1781538036360
+7.500000 -0.0512017671384
+8.100000 0.0000000000000
+
+
+"Time = 2.700000
+-0.300000 2.1691949368406
+0.300000 2.1691949368406
+0.900000 2.1093269062751
+1.500000 1.9782272412690
+2.100000 1.7620671001176
+2.700000 1.4640042823334
+3.300000 1.1111546893130
+3.900000 0.7458009973454
+4.500000 0.4117283405247
+5.100000 0.1308629446215
+5.700000 -0.1067546648427
+6.300000 -0.2428420827220
+6.900000 -0.1546186371945
+7.500000 -0.0603374850191
+8.100000 0.0000000000000
+
+
+"Time = 3.000000
+-0.300000 2.4647796185994
+0.300000 2.4647796185994
+0.900000 2.3541828216963
+1.500000 2.1347782118799
+2.100000 1.8160434930701
+2.700000 1.4238944539878
+3.300000 1.0039199329446
+3.900000 0.6065979264337
+4.500000 0.2678633102603
+5.100000 -0.0097971466919
+5.700000 -0.2236160304934
+6.300000 -0.2627963430451
+6.900000 -0.1296994709694
+7.500000 -0.0782979301769
+8.100000 0.0000000000000
diff --git a/test/test_wavef90_zero/phi_max.tl b/test/test_wavef90_zero/phi_max.tl
new file mode 100644
index 0000000..6ca871c
--- /dev/null
+++ b/test/test_wavef90_zero/phi_max.tl
@@ -0,0 +1,12 @@
+"phi maximum v time
+0.000000 0.9999198827161
+0.300000 1.0032036387356
+0.600000 1.0165679308821
+0.900000 1.0475533118886
+1.200000 1.1036047450756
+1.500000 1.1902041732567
+1.800000 1.3188502049547
+2.100000 1.5204576862657
+2.400000 1.8287092321577
+2.700000 2.1691949368406
+3.000000 2.4647796185994
diff --git a/test/test_wavef90_zero/phi_min.tl b/test/test_wavef90_zero/phi_min.tl
new file mode 100644
index 0000000..e775c9a
--- /dev/null
+++ b/test/test_wavef90_zero/phi_min.tl
@@ -0,0 +1,12 @@
+"phi minimum v time
+0.000000 0.0000304406955
+0.300000 0.0000000000000
+0.600000 0.0000000000000
+0.900000 -0.0034952304448
+1.200000 -0.0411412316017
+1.500000 -0.0865047825206
+1.800000 -0.1010058501545
+2.100000 -0.1666804619982
+2.400000 -0.1802317429085
+2.700000 -0.2439154012747
+3.000000 -0.2631246679902
diff --git a/test/test_wavef90_zero/phi_nm1.tl b/test/test_wavef90_zero/phi_nm1.tl
new file mode 100644
index 0000000..1512af4
--- /dev/null
+++ b/test/test_wavef90_zero/phi_nm1.tl
@@ -0,0 +1,12 @@
+"phi norm1 v time
+0.000000 0.3981503311756
+0.300000 0.3546903638543
+0.600000 0.3207642732125
+0.900000 0.2847416577668
+1.200000 0.2545704912307
+1.500000 0.2290298620313
+1.800000 0.2139837556966
+2.100000 0.2072672216243
+2.400000 0.2062721559625
+2.700000 0.2091439421784
+3.000000 0.2123742100543
diff --git a/test/test_wavef90_zero/phi_nm2.tl b/test/test_wavef90_zero/phi_nm2.tl
new file mode 100644
index 0000000..391775a
--- /dev/null
+++ b/test/test_wavef90_zero/phi_nm2.tl
@@ -0,0 +1,12 @@
+"phi norm2 v time
+0.000000 0.5254444636163
+0.300000 0.4987761991202
+0.600000 0.4742582856532
+0.900000 0.4527991440251
+1.200000 0.4365144790955
+1.500000 0.4265570932041
+1.800000 0.4233123733258
+2.100000 0.4258633078976
+2.400000 0.4318755948552
+2.700000 0.4381196332530
+3.000000 0.4408974191965