Skip to content

Commit

Permalink
Multipole: add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Jun 24, 2024
1 parent 5e8e984 commit 9242a5d
Show file tree
Hide file tree
Showing 26 changed files with 244 additions and 0 deletions.
119 changes: 119 additions & 0 deletions Multipole/test/q1.par
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# q1
$itlast = 4
$final_time = 1000
$xmin = -20.0
$xmax = +20.0
$nlevels = 1
$error_threshold = 0.9
$dtfac = 0.25
$out_every = 128

ActiveThorns = "
ADMBaseX
CarpetX
CoordinatesX
IOUtil
Multipole
ODESolvers
TmunuBaseX
TwoPuncturesX
WeylScal4
Z4c
"

Cactus::cctk_show_schedule = no

Cactus::presync_mode = "mixed-error"

Cactus::terminate = "any"
Cactus::cctk_itlast = $itlast
Cactus::cctk_final_time = $final_time
# Cactus::max_runtime = 30 # minutes
Cactus::max_runtime = 23*60+30 # minutes

#CarpetX::use_subcycling_wip = yes
#CarpetX::restrict_during_sync = no

CarpetX::verbose = no
CarpetX::poison_undefined_values = no

CarpetX::xmin = $xmin
CarpetX::ymin = $xmin
CarpetX::zmin = $xmin

CarpetX::xmax = $xmax
CarpetX::ymax = $xmax
CarpetX::zmax = $xmax

CarpetX::ncells_x = 48
CarpetX::ncells_y = 48
CarpetX::ncells_z = 24

CarpetX::max_tile_size_x = 1024000
CarpetX::max_tile_size_y = 4
CarpetX::max_tile_size_z = 4

#CarpetX::blocking_factor_x = 8
#CarpetX::blocking_factor_y = 8
#CarpetX::blocking_factor_z = 8

#CarpetX::max_grid_size_x = 64
#CarpetX::max_grid_size_y = 64
#CarpetX::max_grid_size_z = 32

CarpetX::boundary_x = "dirichlet"
CarpetX::boundary_y = "dirichlet"
CarpetX::boundary_z = "dirichlet"
CarpetX::boundary_upper_x = "dirichlet"
CarpetX::boundary_upper_y = "dirichlet"
CarpetX::boundary_upper_z = "dirichlet"

CarpetX::ghost_size = 3
CarpetX::interpolation_order = 3

CarpetX::max_num_levels = $nlevels
CarpetX::regrid_every = 128
CarpetX::regrid_error_threshold = $error_threshold

CarpetX::prolongation_type = "ddf"
CarpetX::prolongation_order = 5

ODESolvers::verbose = no
ODESolvers::method = "RK4"
CarpetX::dtfac = $dtfac

ADMBaseX::initial_data = "TwoPunctures"
ADMBaseX::initial_lapse = "TwoPunctures-averaged"

# Q1-setup
TwoPuncturesX::par_b = 4
TwoPuncturesX::par_m_plus = 0.4824
TwoPuncturesX::par_m_minus = 0.4824
TwoPuncturesX::par_P_plus [1] = +0.114
TwoPuncturesX::par_P_minus[1] = -0.114
TwoPuncturesX::grid_setup_method = "evaluation"
TwoPuncturesX::TP_epsilon = 1.0e-2
TwoPuncturesX::TP_Tiny = 1.0e-2
TwoPuncturesX::verbose = yes
TwoPuncturesX::npoints_A = 16
TwoPuncturesX::npoints_B = 16
TwoPuncturesX::npoints_phi = 8

Z4c::calc_ADM_vars = yes # for Weyl
Z4c::calc_ADMRHS_vars = no # for Weyl
Z4c::calc_constraints = no

Z4c::chi_floor = 1.0e-6
Z4c::alphaG_floor = 1.0e-8
Z4c::epsdiss = 0.32
Z4c::boundary_conditions = "NewRadX"

Multipole::radius[0] = 5.0
Multipole::variables = "WeylScal4::Psi4r{sw=-2 cmplx='WeylScal4::Psi4i' name='Psi4'}"
Multipole::l_max = 4
Multipole::verbose = "yes"
Multipole::interpolator_pars = "order=3"

IO::out_dir = $parfile
IO::out_every = 1
IO::parfile_write = no
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l0_m0_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 0 0
0.208333 0 0
0.416667 0 0
0.625000 0 0
0.833333 0 0
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l1_m-1_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 0 0
0.208333 0 0
0.416667 0 0
0.625000 0 0
0.833333 0 0
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l1_m0_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 0 0
0.208333 0 0
0.416667 0 0
0.625000 0 0
0.833333 0 0
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l1_m1_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 0 0
0.208333 0 0
0.416667 0 0
0.625000 0 0
0.833333 0 0
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l2_m-1_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 -0.0002368732253810762901 6.66640149401424958e-07
0.208333 -0.0001289804583592483989 2.102887779806169162e-06
0.416667 -6.991078837790169829e-05 1.819936142410103241e-06
0.625000 -2.960537296234958774e-05 1.286591250222693978e-06
0.833333 3.614609405487607014e-07 7.963076219730692405e-07
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l2_m-2_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 0.1633544727512866723 -0.0008959502916950186835
0.208333 0.05187578336551208064 -0.001506517711064941489
0.416667 0.02048616970823682187 -0.001699083222442760496
0.625000 0.00787589750424054838 -0.001807256296164953596
0.833333 0.001866969686462099627 -0.001892041637810729484
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l2_m0_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 0.2419469528117654811 -7.653091856789567834e-18
0.208333 0.09213873475329763252 -6.209156097904162584e-18
0.416667 0.04906195719024723095 -2.739600188581785847e-18
0.625000 0.03135073717385818831 -9.251215575300670591e-19
0.833333 0.02265701254343711196 -1.197071553117141142e-18
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l2_m1_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 -0.0002368732253810241128 -6.666401494140696776e-07
0.208333 -0.0001289804583592243567 -2.102887779815079949e-06
0.416667 -6.991078837790031593e-05 -1.819936142415978474e-06
0.625000 -2.960537296234690095e-05 -1.286591250227007917e-06
0.833333 3.614609405460671896e-07 -7.96307621976200086e-07
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l2_m2_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 0.1633544727512867556 0.0008959502916950189003
0.208333 0.05187578336551213615 0.001506517711064936718
0.416667 0.02048616970823682881 0.001699083222442752039
0.625000 0.007875897504240544911 0.001807256296164948609
0.833333 0.001866969686462094423 0.001892041637810728833
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l3_m-1_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 0.0002019370196407539633 3.338113721378048138e-06
0.208333 2.823313792881033301e-05 3.234123250438989583e-06
0.416667 3.666585586690724651e-06 2.670029814449096234e-06
0.625000 7.414180597118577747e-06 1.986381358230088539e-06
0.833333 1.765652989213829408e-05 1.321344871092187664e-06
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l3_m-2_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 0.1355126235035147009 -0.0009011010393264042928
0.208333 0.04915945010628205297 -0.001330691884631022247
0.416667 0.02460479679573490328 -0.001360660287516138583
0.625000 0.01465129887224197666 -0.0012910606949549314
0.833333 0.009855004435599798093 -0.001180749472969248436
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l3_m-3_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 -0.0005243570534002543054 -2.905545537781716203e-07
0.208333 -0.0002068051191469248121 3.385905686324209203e-06
0.416667 -9.569156714261667222e-05 3.075736288092153763e-06
0.625000 -3.821565312525715749e-05 2.189550715771247866e-06
0.833333 -2.539621871807125027e-06 1.368789124499731719e-06
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l3_m0_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 1.173183009079014078e-16 -0.00370894084569101893
0.208333 3.939737567408831905e-17 -0.002700718159688593467
0.416667 1.550471750196898174e-17 -0.002438028803451473391
0.625000 7.820335941533175774e-18 -0.002279997745618644704
0.833333 6.045278012134104043e-18 -0.002110063513069596053
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l3_m1_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 -0.0002019370196406217719 3.338113721355848252e-06
0.208333 -2.823313792876251969e-05 3.234123250438361509e-06
0.416667 -3.66658558666819654e-06 2.670029814447793497e-06
0.625000 -7.414180597105620684e-06 1.986381358223404602e-06
0.833333 -1.765652989213624426e-05 1.32134487109508854e-06
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l3_m2_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 -0.1355126235035146731 -0.0009011010393263926919
0.208333 -0.04915945010628207379 -0.001330691884631013573
0.416667 -0.02460479679573490328 -0.001360660287516133812
0.625000 -0.01465129887224198013 -0.001291060694954928364
0.833333 -0.009855004435599799828 -0.001180749472969241931
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l3_m3_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 0.0005243570534002217794 -2.905545537575415505e-07
0.208333 0.0002068051191469071667 3.385905686331339526e-06
0.416667 9.569156714261565578e-05 3.075736288090789617e-06
0.625000 3.821565312525599197e-05 2.189550715770053549e-06
0.833333 2.539621871807777666e-06 1.368789124497179397e-06
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l4_m-1_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 -0.0004808878783879487408 2.659573018956381169e-06
0.208333 -0.0001689614392290165448 8.598441985347362772e-07
0.416667 -8.510691382370067816e-05 5.279673216627985218e-07
0.625000 -5.377136140093592188e-05 4.026528715289788065e-07
0.833333 -3.994720882291986864e-05 2.818942420890523066e-07
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l4_m-2_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 -0.005055289978713481923 -0.003559185609643275832
0.208333 0.01088997123681781018 -0.002594951642873481734
0.416667 0.01356962724083608275 -0.002180261782918343615
0.625000 0.01376878581847622296 -0.001842375582547238792
0.833333 0.01329849635437613427 -0.001493716085388632764
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l4_m-3_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 -0.0001112179228977126544 3.297291987686077221e-06
0.208333 -9.445118528681497845e-05 7.098670170481397099e-06
0.416667 -5.225494859815860561e-05 6.024306606355527363e-06
0.625000 -1.436906558013599481e-05 4.287132427398287595e-06
0.833333 1.649016559895267155e-05 2.705601015459825769e-06
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l4_m-4_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 0.2019000457910152813 -0.001556901482513882874
0.208333 0.05813047699648101613 -0.0029910558402872333
0.416667 0.01896808683432301551 -0.003482971002313504059
0.625000 0.003841990636153330956 -0.003734804571373198743
0.833333 -0.002994287246773009569 -0.003878616972582474287
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l4_m0_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 0.2402589475282121412 -4.684142277767434093e-18
0.208333 0.07922662333297079973 -2.947735657996618253e-18
0.416667 0.032726122380756964 -1.997543069463446456e-18
0.625000 0.01334978628567526013 -1.963806293312221506e-18
0.833333 0.003648298221435339155 -3.68552200821729211e-19
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l4_m1_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 -0.0004808878783880828566 -2.659573018946902024e-06
0.208333 -0.0001689614392290786967 -8.598441985232072059e-07
0.416667 -8.510691382371801184e-05 -5.279673216706910689e-07
0.625000 -5.377136140094495464e-05 -4.026528715274898814e-07
0.833333 -3.994720882292478821e-05 -2.818942420731181874e-07
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l4_m2_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 -0.005055289978713602486 0.003559185609643276699
0.208333 0.01088997123681776681 0.002594951642873477831
0.416667 0.01356962724083607408 0.002180261782918351422
0.625000 0.01376878581847622296 0.001842375582547238792
0.833333 0.0132984963543761308 0.001493716085388634932
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l4_m3_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 -0.000111217922897776541 -3.297291987690220906e-06
0.208333 -9.445118528682644389e-05 -7.098670170484066946e-06
0.416667 -5.22549485981636607e-05 -6.024306606361849617e-06
0.625000 -1.43690655801385681e-05 -4.287132427398733982e-06
0.833333 1.649016559894858546e-05 -2.705601015458839399e-06
5 changes: 5 additions & 0 deletions Multipole/test/q1/mp_Psi4_l4_m4_r5.00.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.000000 0.2019000457910155311 0.001556901482513865743
0.208333 0.05813047699648105082 0.002991055840287245443
0.416667 0.01896808683432299122 0.003482971002313501457
0.625000 0.003841990636153320982 0.003734804571373201779
0.833333 -0.002994287246773018243 0.003878616972582477757

0 comments on commit 9242a5d

Please sign in to comment.