Skip to content

Commit

Permalink
TestRKAB: Fixed bug in RHS of evolution code
Browse files Browse the repository at this point in the history
  • Loading branch information
lucass-carneiro committed Oct 8, 2024
1 parent 024da8f commit 26a5930
Show file tree
Hide file tree
Showing 6 changed files with 200 additions and 118 deletions.
2 changes: 0 additions & 2 deletions TestRKAB/interface.ccl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

IMPLEMENTS: TestRKAB

INHERITS: CarpetX

USES INCLUDE HEADER: loop_device.hxx
USES INCLUDE HEADER: vect.hxx

Expand Down
62 changes: 21 additions & 41 deletions TestRKAB/par/gaussian.par
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
ActiveThorns = "
BoxInBox
CarpetX
IOUtil
ODESolvers
TestRKAB
"

$out_every = 16
$nlevels = 3
$ncells = 64
$ncells = 80
$cfl = 0.25

$itlast = 1
$out_every = 1

TestRKAB::initial_condition = "Gaussian"
TestRKAB::gaussian_width = 0.17677669529 # sqrt(2)*W = 0.25
Expand All @@ -19,66 +20,45 @@ CarpetX::verbose = no
Cactus::cctk_show_schedule = yes
Cactus::presync_mode = "mixed-error"

CarpetX::xmin = -4.0
CarpetX::ymin = -4.0
CarpetX::zmin = -4.0
CarpetX::xmin = -1.0
CarpetX::ymin = -1.0
CarpetX::zmin = -1.0

CarpetX::xmax = +4.0
CarpetX::ymax = +4.0
CarpetX::zmax = +4.0
CarpetX::xmax = +1.0
CarpetX::ymax = +1.0
CarpetX::zmax = +1.0

CarpetX::ncells_x = $ncells
CarpetX::ncells_y = $ncells
CarpetX::ncells_z = $ncells

CarpetX::periodic = yes
CarpetX::periodic_x = yes
CarpetX::periodic_y = yes
CarpetX::periodic_z = yes

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

CarpetX::prolongation_type = "ddf"
CarpetX::prolongation_order = 5
CarpetX::ghost_size = 3
CarpetX::dtfac = 1.0 # 0.25 * 2^2
#CarpetX::ghost_size = 3
CarpetX::dtfac = $cfl

CarpetX::blocking_factor_x = 2
CarpetX::blocking_factor_y = 2
CarpetX::blocking_factor_z = 2
#CarpetX::max_grid_size_x = 10000000
#CarpetX::max_grid_size_y = 10000000
#CarpetX::max_grid_size_z = 10000000
#CarpetX::max_tile_size_x = 10000000
#CarpetX::max_tile_size_y = 10000000
#CarpetX::max_tile_size_z = 10000000

BoxInBox::num_regions = 1
# Region 1
BoxInBox::shape_1 = "cube"
BoxInBox::num_levels_1 = $nlevels
BoxInBox::radius_1 = [ -1.0, 1.0, 0.5 ]


Cactus::terminate = "time"
Cactus::cctk_final_time = 2.0
Cactus::cctk_final_time = 1.0
#Cactus::terminate = "iteration"
#Cactus::cctk_itlast = $itlast

ODESolvers::method = "RK4"
#ODESolvers::verbose = yes
ODESolvers::method = "RKAB"
ODESolvers::verbose = yes

IO::out_dir = $parfile
IO::out_every = $out_every

#CarpetX::out_norm_vars = "all"
CarpetX::out_norm_vars = ""
CarpetX::out_tsv_vars = ""

CarpetX::out_tsv_vars = "
CarpetX::out_silo_vars = "
TestRKAB::state
TestRKAB::error
"
#
#CarpetX::out_silo_vars = "
# TestRKAB::state
# TestRKAB::error
#"
63 changes: 0 additions & 63 deletions TestRKAB/par/gaussian_single_mesh.par

This file was deleted.

11 changes: 6 additions & 5 deletions TestRKAB/par/standing.par
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ActiveThorns = "
$ncells = 80
$cfl = 0.25

$itlast = 1
$itlast = 50
$out_every = 1

TestRKAB::initial_condition = "standing wave"
Expand All @@ -35,6 +35,7 @@ CarpetX::ncells_x = $ncells
CarpetX::ncells_y = $ncells
CarpetX::ncells_z = $ncells

CarpetX::periodic = yes
CarpetX::periodic_x = yes
CarpetX::periodic_y = yes
CarpetX::periodic_z = yes
Expand All @@ -46,10 +47,10 @@ CarpetX::blocking_factor_x = 2
CarpetX::blocking_factor_y = 2
CarpetX::blocking_factor_z = 2

Cactus::terminate = "time"
Cactus::cctk_final_time = 4.0
#Cactus::terminate = "iteration"
#Cactus::cctk_itlast = $itlast
#Cactus::terminate = "time"
#Cactus::cctk_final_time = 1.0
Cactus::terminate = "iteration"
Cactus::cctk_itlast = $itlast

ODESolvers::method = "RKAB"
ODESolvers::verbose = yes
Expand Down
10 changes: 7 additions & 3 deletions TestRKAB/schedule.ccl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Schedule definitions for thorn TestRKAB

STORAGE: state pre rhs
STORAGE: state pre rhs energy error

# Init
SCHEDULE TestRKAB_Initial AT initial
Expand All @@ -10,12 +10,14 @@ SCHEDULE TestRKAB_Initial AT initial
SYNC: state pre
} "Initialize scalar wave state and previous state"



# Step
SCHEDULE TestRKAB_Sync AT postregrid
{
LANG: C
OPTIONS: global
SYNC: state
SYNC: state pre
} "Synchronize state"

SCHEDULE TestRKAB_RHS IN ODESolvers_RHS
Expand All @@ -29,9 +31,11 @@ SCHEDULE TestRKAB_Sync IN ODESolvers_PostStep
{
LANG: C
OPTIONS: global
SYNC: state
SYNC: state pre
} "Synchronize state"



# Analysis
SCHEDULE TestRKAB_Error IN ODESolvers_PostStep AFTER TestRKAB_Sync
{
Expand Down
Loading

0 comments on commit 26a5930

Please sign in to comment.