aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallen <allen@41e88fdd-2190-4c69-9c84-4659c8cf322e>2002-01-04 09:43:58 +0000
committerallen <allen@41e88fdd-2190-4c69-9c84-4659c8cf322e>2002-01-04 09:43:58 +0000
commit6c00bc667a18f9d1bc07d1e0fde05558ab05dd39 (patch)
treea089ac1963c06919474c1d9594bb63c0594e2992
parent9e8432f1b5efd74eacf43f2d21d070db09bfb3ce (diff)
Update and testsuite for multi and single processors
git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/IDScalarWaveElliptic/trunk@42 41e88fdd-2190-4c69-9c84-4659c8cf322e
-rw-r--r--interface.ccl3
-rw-r--r--par/source_petsc.par (renamed from par/charge.par)19
-rw-r--r--param.ccl5
-rw-r--r--src/SourceData.F7726
-rw-r--r--test/test_waveell.par (renamed from par/test_waveell.par)7
-rw-r--r--test/test_waveell/phi.dl138
-rw-r--r--test/test_waveell/phi.xl138
-rw-r--r--test/test_waveell/phi_exact.dl23
-rw-r--r--test/test_waveell/phi_exact.xl23
-rw-r--r--test/test_waveell/phi_max.tl7
-rw-r--r--test/test_waveell/phi_min.tl7
-rw-r--r--test/test_waveell/phi_nm1.tl7
-rw-r--r--test/test_waveell/phi_nm2.tl7
13 files changed, 387 insertions, 23 deletions
diff --git a/interface.ccl b/interface.ccl
index 7ef8fcc..16c050d 100644
--- a/interface.ccl
+++ b/interface.ccl
@@ -3,7 +3,8 @@
implements: idscalarwaveelliptic
inherits:grid wavetoy ellbase
-
+
+USES INCLUDE HEADER: EllBase.h
private:
cctk_real ellcoeffs type = GF
diff --git a/par/charge.par b/par/source_petsc.par
index b4c1f7e..bc260d6 100644
--- a/par/charge.par
+++ b/par/source_petsc.par
@@ -1,4 +1,4 @@
-# wavetoyf77_rad.par - wavetoy evolution with radiation boundaries
+# test_waveell.par
# $Id$
#
# /*@@
@@ -10,27 +10,27 @@
# @enddesc
# @@*/
-ActiveThorns = "boundary pughslab ellsor ellbase idscalarwaveelliptic idscalarwave time wavetoyf90 pugh pughreduce cartgrid3d ioutil ioascii iobasic"
+ActiveThorns = "boundary pughslab ellpetsc ellbase idscalarwaveelliptic idscalarwave time wavetoyf90 pugh pughreduce cartgrid3d ioutil ioascii iobasic"
time::dtfac = 0.5
idscalarwave::initial_data = "charge"
+
idscalarwaveelliptic::output_tmp = "yes"
idscalarwaveelliptic::radius = 5.5
idscalarwaveelliptic::charge = 1
-idscalarwaveelliptic::solver = "sor"
+idscalarwaveelliptic::solver = "petsc"
wavetoyf90::bound = "radiation"
grid::type = "BySpacing"
-grid::domain = "octant"
-grid::dxyz = 0.6
+grid::domain = "full"
+grid::dxyz = 0.3
-driver::global_nsize = 50
+driver::global_nsize = 20
ellbase::elliptic_verbose="yes"
-ellsor::maxit = 1000
-cactus::cctk_itlast = 120
+cactus::cctk_itlast = 10
IOBasic::outScalar_every = 2
IOBasic::outScalar_vars = "wavetoy::phi"
@@ -43,5 +43,6 @@ IOASCII::out1D_vars = "wavetoy::phi "
IOBasic::outInfo_every = 10
IOBasic::outInfo_vars = "wavetoy::phi"
-IO::outdir = "charge"
+IO::outdir = "test_waveell"
+IO::out_fileinfo = "none"
diff --git a/param.ccl b/param.ccl
index 84192c9..c71b759 100644
--- a/param.ccl
+++ b/param.ccl
@@ -30,4 +30,7 @@ STRING solver "Name of elliptic solver"
.* :: "Anything"
} "sor"
-
+INT sor_maxit "Maximum number of iterations for SOR solve"
+{
+ 1:* :: "Positive"
+} 100
diff --git a/src/SourceData.F77 b/src/SourceData.F77
index cde3fb8..1ff3db7 100644
--- a/src/SourceData.F77
+++ b/src/SourceData.F77
@@ -11,7 +11,7 @@
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
-#include "CactusElliptic/EllBase/src/EllBase.h"
+#include "EllBase.h"
subroutine UniformCharge(CCTK_ARGUMENTS)
@@ -25,6 +25,7 @@ c where Q is the total charge and R is the sphere radius
DECLARE_CCTK_ARGUMENTS
DECLARE_CCTK_PARAMETERS
+ DECLARE_CCTK_FUNCTIONS
CCTK_REAL pi
CCTK_REAL AbsTol(3), RelTol(3)
@@ -92,19 +93,23 @@ c Set tolerance for stopping elliptic solve
c Set any options needed for the elliptic solve
- call Ell_SetStringKey(ierr, "yes", "EllLinFlat::Bnd::Robin")
+ call Ell_SetStrKey(ierr, "yes","EllLinFlat::Bnd::Robin")
call Ell_SetRealKey(ierr, 0d0, "EllLinFlat::Bnd::Robin::inf")
- call Ell_SetIntKey (ierr, 1, "EllLinFlat::Bnd::Robin::falloff")
-
-
-c Call elliptic solver to fill out phi
+ call Ell_SetIntKey (ierr, 1, "EllLinFlat::Bnd::Robin::falloff")
+c Set parameters for specific solvers
+ if (CCTK_EQUALS(solver,"sor")) then
+ call Ell_SetIntKey(ierr, sor_maxit,"Ell::SORmaxit")
+ end if
+
c Fill a fortran string with the name of the solver
call CCTK_FortranString(length,solver,fsolver)
write(infoline,'(A27,A)') 'Going into elliptic solver ',
& fsolver(1:length)
call CCTK_INFO(infoline)
-
+
+c Call elliptic solver to fill out phi
+
call Ell_LinFlatSolver(
& ierr,
& cctkGH,
@@ -120,10 +125,13 @@ c Fill a fortran string with the name of the solver
else if (ierr .eq. ELL_NOSOLVER) then
call CCTK_INFO("Elliptic solver not found")
else
- call CCTK_INFO("Leaving elliptic solver: solve failed")
+ write(infoline,'(A45,I3,A)')
+ & "Leaving elliptic solver: solve failed (Error ",ierr,")"
+ call CCTK_INFO(infoline)
+ print *,ierr
end if
-c Set up last timestep ... assume time symmetry
+c Set up last timestep ... assume (first order) time symmetry
do k=1, cctk_lsh(3)
do j=1, cctk_lsh(2)
diff --git a/par/test_waveell.par b/test/test_waveell.par
index 3736fe8..40b2d4f 100644
--- a/par/test_waveell.par
+++ b/test/test_waveell.par
@@ -15,21 +15,22 @@ ActiveThorns = "boundary pughslab ellsor ellbase idscalarwaveelliptic idscalarwa
time::dtfac = 0.5
idscalarwave::initial_data = "charge"
+
idscalarwaveelliptic::output_tmp = "yes"
idscalarwaveelliptic::radius = 5.5
idscalarwaveelliptic::charge = 1
idscalarwaveelliptic::solver = "sor"
+idscalarwaveelliptic::sor_maxit = 2000
wavetoyf90::bound = "radiation"
grid::type = "BySpacing"
grid::domain = "octant"
-grid::dxyz = 0.6
+grid::dxyz = 0.3
driver::global_nsize = 20
ellbase::elliptic_verbose="yes"
-ellsor::maxit = 1000
cactus::cctk_itlast = 10
IOBasic::outScalar_every = 2
@@ -45,4 +46,4 @@ IOBasic::outInfo_vars = "wavetoy::phi"
IO::outdir = "test_waveell"
IO::out_fileinfo = "none"
-
+IO::parfile_write = "no"
diff --git a/test/test_waveell/phi.dl b/test/test_waveell/phi.dl
new file mode 100644
index 0000000..2ef6cab
--- /dev/null
+++ b/test/test_waveell/phi.dl
@@ -0,0 +1,138 @@
+
+
+"Time = 0.0000000000000
+-0.2598076211353 0.2721470814147
+0.2598076211353 0.2721470814147
+0.7794228634060 0.2705265994881
+1.2990381056767 0.2672828235533
+1.8186533479473 0.2624180052781
+2.3382685902180 0.2559306208309
+2.8578838324886 0.2478227423050
+3.3774990747593 0.2380923632512
+3.8971143170300 0.2267400495243
+4.4167295593006 0.2137622631106
+4.9363448015713 0.1991720446603
+5.4559600438420 0.1830684306873
+5.9755752861126 0.1670091056695
+6.4951905283833 0.1536175650453
+7.0148057706540 0.1422306407146
+7.5344210129246 0.1324171342895
+8.0540362551953 0.1238716831561
+8.5736514974659 0.1163621907437
+9.0932667397366 0.1097119479831
+9.6128819820073 0.1037815724164
+
+
+"Time = 0.3000000000000
+-0.2598076211353 0.2709316945279
+0.2598076211353 0.2709316945279
+0.7794228634060 0.2693097079970
+1.2990381056767 0.2660659279599
+1.8186533479473 0.2612011024975
+2.3382685902180 0.2547137126726
+2.8578838324886 0.2466058260054
+3.3774990747593 0.2368754406951
+3.8971143170300 0.2255231183296
+4.4167295593006 0.2125453252460
+4.9363448015713 0.1979550981372
+5.4559600438420 0.1821557600295
+5.9755752861126 0.1670092742305
+6.4951905283833 0.1536177273774
+7.0148057706540 0.1422307954536
+7.5344210129246 0.1324172834038
+8.0540362551953 0.1238718254515
+8.5736514974659 0.1163624299114
+9.0932667397366 0.1097128235104
+9.6128819820073 0.1037827000951
+
+
+"Time = 0.6000000000000
+-0.2598076211353 0.2680935679140
+0.2598076211353 0.2680935679140
+0.7794228634060 0.2664704879364
+1.2990381056767 0.2632274255349
+1.8186533479473 0.2583609641337
+2.3382685902180 0.2518749373088
+2.8578838324886 0.2437656976629
+3.3774990747593 0.2340365877939
+3.8971143170300 0.2226830010285
+4.4167295593006 0.2097063899023
+4.9363448015713 0.1951340098546
+5.4559600438420 0.1804958370216
+5.9755752861126 0.1668570080325
+6.4951905283833 0.1536186015998
+7.0148057706540 0.1422306807487
+7.5344210129246 0.1324180931028
+8.0540362551953 0.1238717974497
+8.5736514974659 0.1163639110590
+9.0932667397366 0.1097141437212
+9.6128819820073 0.1037834154498
+
+
+"Time = 0.9000000000000
+-0.2598076211353 0.2636332439763
+0.2598076211353 0.2636332439763
+0.7794228634060 0.2620113364634
+1.2990381056767 0.2587652870729
+1.8186533479473 0.2538998285854
+2.3382685902180 0.2474122724554
+2.8578838324886 0.2393043294173
+3.3774990747593 0.2295738968297
+3.8971143170300 0.2182215322863
+4.4167295593006 0.2052436901589
+4.9363448015713 0.1913760909608
+5.4559600438420 0.1786694510598
+5.9755752861126 0.1659036966976
+6.4951905283833 0.1536186951276
+7.0148057706540 0.1422317313053
+7.5344210129246 0.1324183074522
+8.0540362551953 0.1238736955893
+8.5736514974659 0.1163655023578
+9.0932667397366 0.1097155355674
+9.6128819820073 0.1037847506873
+
+
+"Time = 1.2000000000000
+-0.2598076211353 0.2575501677794
+0.2598076211353 0.2575501677794
+0.7794228634060 0.2559272179858
+1.2990381056767 0.2526826519865
+1.8186533479473 0.2478161677206
+2.3382685902180 0.2413278649810
+2.8578838324886 0.2332197563015
+3.3774990747593 0.2234892775649
+3.8971143170300 0.2121368687242
+4.4167295593006 0.1993385469554
+4.9363448015713 0.1873272062633
+5.4559600438420 0.1757936108934
+5.9755752861126 0.1646850263600
+6.4951905283833 0.1533648565824
+7.0148057706540 0.1422326638070
+7.5344210129246 0.1324198270963
+8.0540362551953 0.1238758950255
+8.5736514974659 0.1163671785700
+9.0932667397366 0.1097169387701
+9.6128819820073 0.1037860255446
+
+
+"Time = 1.5000000000000
+-0.2598076211353 0.2498446342509
+0.2598076211353 0.2498446342509
+0.7794228634060 0.2482223308673
+1.2990381056767 0.2449780395900
+1.8186533479473 0.2401095447098
+2.3382685902180 0.2336221482063
+2.8578838324886 0.2255121358988
+3.3774990747593 0.2157827372858
+3.8971143170300 0.2044469986711
+4.4167295593006 0.1928348395892
+4.9363448015713 0.1822989541726
+5.4559600438420 0.1722446772280
+5.9755752861126 0.1624212947446
+6.4951905283833 0.1524343493249
+7.0148057706540 0.1422195746766
+7.5344210129246 0.1324229884999
+8.0540362551953 0.1238774982955
+8.5736514974659 0.1163686680775
+9.0932667397366 0.1097183156328
+9.6128819820073 0.1037872546828
diff --git a/test/test_waveell/phi.xl b/test/test_waveell/phi.xl
new file mode 100644
index 0000000..9b052d5
--- /dev/null
+++ b/test/test_waveell/phi.xl
@@ -0,0 +1,138 @@
+
+
+"Time = 0.0000000000000
+-0.1500000000000 0.2721470814147
+0.1500000000000 0.2721470814147
+0.4500000000000 0.2716072413903
+0.7500000000000 0.2705255378706
+1.0500000000000 0.2689038806959
+1.3500000000000 0.2667402076155
+1.6500000000000 0.2640363176225
+1.9500000000000 0.2607900941082
+2.2500000000000 0.2570031640782
+2.5500000000000 0.2526732689595
+2.8500000000000 0.2478016799842
+3.1500000000000 0.2423857052227
+3.4500000000000 0.2364257224181
+3.7500000000000 0.2299176751193
+4.0500000000000 0.2228592697307
+4.3500000000000 0.2152416195291
+4.6500000000000 0.2070526124298
+4.9500000000000 0.1982637836087
+5.2500000000000 0.1888237607405
+5.5500000000000 0.1786323851348
+
+
+"Time = 0.3000000000000
+-0.1500000000000 0.2709316945279
+0.1500000000000 0.2709316945279
+0.4500000000000 0.2703906016574
+0.7500000000000 0.2693097582507
+1.0500000000000 0.2676872330086
+1.3500000000000 0.2655244027427
+1.6500000000000 0.2628196596687
+1.9500000000000 0.2595742573900
+2.2500000000000 0.2557864934027
+2.5500000000000 0.2514573933042
+2.8500000000000 0.2465849939148
+3.1500000000000 0.2411697828283
+3.4500000000000 0.2352090179858
+3.7500000000000 0.2287016972372
+4.0500000000000 0.2216425435770
+4.3500000000000 0.2140255761731
+4.6500000000000 0.2058358606850
+4.9500000000000 0.1970477049172
+5.2500000000000 0.1877404354596
+5.5500000000000 0.1786324236725
+
+
+"Time = 0.6000000000000
+-0.1500000000000 0.2680935679140
+0.1500000000000 0.2680935679140
+0.4500000000000 0.2675529089155
+0.7500000000000 0.2664711571958
+1.0500000000000 0.2648491433612
+1.3500000000000 0.2626857378968
+1.6500000000000 0.2599815299533
+1.9500000000000 0.2567355611569
+2.2500000000000 0.2529483140292
+2.5500000000000 0.2486186586910
+2.8500000000000 0.2437467544448
+3.1500000000000 0.2383310021411
+3.4500000000000 0.2323707068211
+3.7500000000000 0.2258628618483
+4.0500000000000 0.2188041475937
+4.3500000000000 0.2111866788419
+4.6500000000000 0.2030057266749
+4.9500000000000 0.1943847834623
+5.2500000000000 0.1859030830842
+5.5500000000000 0.1775853757575
+
+
+"Time = 0.9000000000000
+-0.1500000000000 0.2636332439763
+0.1500000000000 0.2636332439763
+0.4500000000000 0.2630923006540
+0.7500000000000 0.2620105944590
+1.0500000000000 0.2603880933189
+1.3500000000000 0.2582248647340
+1.6500000000000 0.2555203890651
+1.9500000000000 0.2522746380150
+2.2500000000000 0.2484871280412
+2.5500000000000 0.2441576785836
+2.8500000000000 0.2392855138693
+3.1500000000000 0.2338699536376
+3.4500000000000 0.2279094011150
+3.7500000000000 0.2214017322898
+4.0500000000000 0.2143432887484
+4.3500000000000 0.2067427234247
+4.6500000000000 0.1987419816942
+4.9500000000000 0.1908582152947
+5.2500000000000 0.1833554492005
+5.5500000000000 0.1758772249250
+
+
+"Time = 1.2000000000000
+-0.1500000000000 0.2575501677794
+0.1500000000000 0.2575501677794
+0.4500000000000 0.2570093552528
+0.7500000000000 0.2559275657697
+1.0500000000000 0.2543048246708
+1.3500000000000 0.2521413251184
+1.6500000000000 0.2494368285464
+1.9500000000000 0.2461909920796
+2.2500000000000 0.2424035048994
+2.5500000000000 0.2380739717880
+2.8500000000000 0.2332018224561
+3.1500000000000 0.2277861740976
+3.4500000000000 0.2218256610572
+3.7500000000000 0.2153193382874
+4.0500000000000 0.2082849236358
+4.3500000000000 0.2008722846002
+4.6500000000000 0.1935578699310
+4.9500000000000 0.1867121270108
+5.2500000000000 0.1799982408157
+5.5500000000000 0.1734492046645
+
+
+"Time = 1.5000000000000
+-0.1500000000000 0.2498446342509
+0.1500000000000 0.2498446342509
+0.4500000000000 0.2493037498719
+0.7500000000000 0.2482220746969
+1.0500000000000 0.2465992733915
+1.3500000000000 0.2444355026656
+1.6500000000000 0.2417307687342
+1.9500000000000 0.2384848727545
+2.2500000000000 0.2346973206804
+2.5500000000000 0.2303677726518
+2.8500000000000 0.2254955618773
+3.1500000000000 0.2200800055824
+3.4500000000000 0.2141220155478
+3.7500000000000 0.2076459947492
+4.0500000000000 0.2008052286469
+4.3500000000000 0.1940491065395
+4.6500000000000 0.1878137020539
+4.9500000000000 0.1818580002553
+5.2500000000000 0.1760221043312
+5.5500000000000 0.1702711507075
diff --git a/test/test_waveell/phi_exact.dl b/test/test_waveell/phi_exact.dl
new file mode 100644
index 0000000..bf0d9e6
--- /dev/null
+++ b/test/test_waveell/phi_exact.dl
@@ -0,0 +1,23 @@
+
+
+"Time = 0.0000000000000
+-0.2598076211353 0.2725244177310
+0.2598076211353 0.2725244177310
+0.7794228634060 0.2709015777611
+1.2990381056767 0.2676558978212
+1.8186533479473 0.2627873779113
+2.3382685902180 0.2562960180316
+2.8578838324886 0.2481818181818
+3.3774990747593 0.2384447783621
+3.8971143170300 0.2270848985725
+4.4167295593006 0.2141021788129
+4.9363448015713 0.1994966190834
+5.4559600438420 0.1832682193839
+5.9755752861126 0.1673479041129
+6.4951905283833 0.1539600717839
+7.0148057706540 0.1425556220221
+7.5344210129246 0.1327241998137
+8.0540362551953 0.1241613482128
+8.5736514974659 0.1166364180181
+9.0932667397366 0.1099714798456
+9.6128819820073 0.1040270755297
diff --git a/test/test_waveell/phi_exact.xl b/test/test_waveell/phi_exact.xl
new file mode 100644
index 0000000..bab1ffe
--- /dev/null
+++ b/test/test_waveell/phi_exact.xl
@@ -0,0 +1,23 @@
+
+
+"Time = 0.0000000000000
+-0.1500000000000 0.2725244177310
+0.1500000000000 0.2725244177310
+0.4500000000000 0.2719834710744
+0.7500000000000 0.2709015777611
+1.0500000000000 0.2692787377911
+1.3500000000000 0.2671149511645
+1.6500000000000 0.2644102178813
+1.9500000000000 0.2611645379414
+2.2500000000000 0.2573779113449
+2.5500000000000 0.2530503380917
+2.8500000000000 0.2481818181818
+3.1500000000000 0.2427723516153
+3.4500000000000 0.2368219383922
+3.7500000000000 0.2303305785124
+4.0500000000000 0.2232982719760
+4.3500000000000 0.2157250187829
+4.6500000000000 0.2076108189331
+4.9500000000000 0.1989556724267
+5.2500000000000 0.1897595792637
+5.5500000000000 0.1800487097649
diff --git a/test/test_waveell/phi_max.tl b/test/test_waveell/phi_max.tl
new file mode 100644
index 0000000..d99d1dd
--- /dev/null
+++ b/test/test_waveell/phi_max.tl
@@ -0,0 +1,7 @@
+"phi v time
+0.0000000000000 0.2721470814147
+0.3000000000000 0.2709316945279
+0.6000000000000 0.2680935679140
+0.9000000000000 0.2636332439763
+1.2000000000000 0.2575501677794
+1.5000000000000 0.2498446342509
diff --git a/test/test_waveell/phi_min.tl b/test/test_waveell/phi_min.tl
new file mode 100644
index 0000000..023dd89
--- /dev/null
+++ b/test/test_waveell/phi_min.tl
@@ -0,0 +1,7 @@
+"phi v time
+0.0000000000000 0.1037815724164
+0.3000000000000 0.1037827000951
+0.6000000000000 0.1037834154498
+0.9000000000000 0.1037847506873
+1.2000000000000 0.1037860255446
+1.5000000000000 0.1037872546828
diff --git a/test/test_waveell/phi_nm1.tl b/test/test_waveell/phi_nm1.tl
new file mode 100644
index 0000000..0f6b0e9
--- /dev/null
+++ b/test/test_waveell/phi_nm1.tl
@@ -0,0 +1,7 @@
+"phi v time
+0.0000000000000 0.1867765534911
+0.3000000000000 0.1861610730267
+0.6000000000000 0.1847231649143
+0.9000000000000 0.1824788873623
+1.2000000000000 0.1794519586826
+1.5000000000000 0.1756765663076
diff --git a/test/test_waveell/phi_nm2.tl b/test/test_waveell/phi_nm2.tl
new file mode 100644
index 0000000..e8a0e46
--- /dev/null
+++ b/test/test_waveell/phi_nm2.tl
@@ -0,0 +1,7 @@
+"phi v time
+0.0000000000000 0.1910204828174
+0.3000000000000 0.1903119929423
+0.6000000000000 0.1886654256939
+0.9000000000000 0.1861125412578
+1.2000000000000 0.1826974689693
+1.5000000000000 0.1784773130890