[Users] 2D configuration with Carpet

Steven R. Brandt sbrandt at cct.lsu.edu
Wed Feb 14 12:00:31 CST 2018


I have a parameter file which I have used fairly recently that does 
this. A very short running test case is attached.

--Steve


On 02/14/2018 09:21 AM, Miguel Zilhão wrote:
> hi Ian,
>
> many thanks for the parameter file. this allowed me to go a little further (i was missing
> CoordBase::boundary_shiftout_z_lower = 1 and CoordBase::boundary_shiftout_z_upper = 1).
> however, i'm still getting the following error:
>
> ERROR from host meurglysIII process 0
>     while executing schedule bin (none), routine (no thorn)::(no routine)
>     in thorn Carpet, file ./Cactus/arrangements/Carpet/Carpet/src/SetupGH.cc:2512:
>     -> There are not enough ghost zones for the desired spatial prolongation order on map 0,
> refinement level 0.  With a spatial prolongation order of 5, you need at least 3 ghost zones.
>
> i'm setting:
>
> Carpet::prolongation_order_space        = 5
> Carpet::prolongation_order_time         = 2
>
> driver::ghost_size_x                 = 3
> driver::ghost_size_y                 = 3
> driver::ghost_size_z                 = 0
>
> i'm guessing that in the example you provided things worked because you only had one grid? is there
> any way of doing this with more inner levels?
>
> thanks,
> Miguel
>
> On 14/02/18 22:25, ian.hinder at aei.mpg.de wrote:
>>
>>> On 13 Feb 2018, at 06:19, Miguel Zilhão <miguel.zilhao.nogueira at tecnico.ulisboa.pt
>>> <mailto:miguel.zilhao.nogueira at tecnico.ulisboa.pt>> wrote:
>>>
>>> hi Erik,
>>>
>>> thanks for your reply. i've tried to set the parameters as you described, but i'm getting a Carpet
>>> assertion failure:
>>>
>>> cactus_Lean_ET: Cactus/arrangements/Carpet/CarpetLib/src/gh.cc:61 <http://gh.cc:61/>: gh::gh(const
>>> std::vector<vect<int, 3> >&, centering, int, centering, const std::vector<std::vector<bbox<int, 3> >
>>>> &, const i2vect&): Assertion `all(box.shape() / box.stride() >= boundary_width[0] +
>>> boundary_width[1])' failed.
>>>
>>> here's how i'm specifying my grid:
>>>
>>> CoordBase::xmin                      = -48.00
>>> CoordBase::ymin                      = -48.00
>>> CoordBase::zmin                      =   0.00
>>> CoordBase::xmax                      = +48.00
>>> CoordBase::ymax                      = +48.00
>>> CoordBase::zmax                      =  +0.00
>>> CoordBase::dx                        =   2.00
>>> CoordBase::dy                        =   2.00
>>> CoordBase::dz                        =   2.00
>>>
>>> driver::ghost_size_x                 = 3
>>> driver::ghost_size_y                 = 3
>>> driver::ghost_size_z                 = 0
>>>
>>> CoordBase::boundary_size_x_lower     = 3
>>> CoordBase::boundary_size_y_lower     = 3
>>> CoordBase::boundary_size_z_lower     = 0
>>> CoordBase::boundary_size_x_upper     = 0
>>> CoordBase::boundary_size_y_upper     = 0
>>> CoordBase::boundary_size_z_upper     = 0
>>>
>>> CoordBase::boundary_shiftout_x_lower = 0
>>> CoordBase::boundary_shiftout_y_lower = 0
>>> CoordBase::boundary_shiftout_z_lower = 0
>>>
>>> am i missing something?
>> Hi Miguel,
>>
>> There is an example parameter file in Kranc, for a true 2D Laplace equation (i.e. it doesn't take
>> derivatives in the z direction):
>>
>> https://github.com/ianhinder/Kranc/blob/master/Examples/laplace.par
>>
>> I have not tried this recently, but it worked at one point.
>>
>> -- 
>> Ian Hinder
>> http://members.aei.mpg.de/ianhin
>>
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users

-------------- next part --------------

#Reorder the parameters for easy comparison to the input.txt in example 3
ActiveThorns = "CoordBase FunWave FunwaveCoord
Carpet CarpetIOASCII CartGrid3D IOUtil CarpetIOBasic CarpetSlab
Boundary SymBase MoL CarpetReduce LocalReduce InitBase CarpetLib
LoopControl Tridiagonal CarpetRegrid2 CarpetInterp2
Spacemask SphericalSurface "

#----------------------------------------------------
# Flesh and CCTK parameters
#----------------------------------------------------


#ActiveThorns = "Dissipation"

#Dissipation::epsdis = 0.0
#Dissipation::vars = "
#  Funwave::ubar
#  Funwave::vbar
#"

# Time
ActiveThorns = "Time"
Time::timestep_method = "given"
Time::timestep = 0.005

# flesh
Cactus::cctk_run_title = "Test Run"
Cactus::cctk_show_schedule = "yes"
Cactus::cctk_itlast = 4
Cactus::allow_mixeddim_gfs = "yes"
#Carpet::prolongation_order_space = 1

#Carpet::prolongate_initial_data = "yes"

# CartGrid3D
CartGrid3D::type = "coordbase"
CartGrid3D::avoid_origin = "no"
CoordBase::domainsize = "minmax"
CoordBase::spacing    = "gridspacing"
CoordBase::xmin =  0
CoordBase::xmax =  100
CoordBase::ymin =  0
CoordBase::ymax =  52
CoordBase::zmin =  -5.0
CoordBase::zmax =  5.0
CoordBase::dx   =  0.2
CoordBase::dy   =  0.2
CoordBase::dz   =  5.0

CoordBase::boundary_size_x_lower     = 3
CoordBase::boundary_size_x_upper     = 3
CoordBase::boundary_size_y_lower     = 3
CoordBase::boundary_size_y_upper     = 3
CoordBase::boundary_size_z_lower     = 0
CoordBase::boundary_size_z_upper     = 0
CoordBase::boundary_shiftout_x_lower = 1
CoordBase::boundary_shiftout_x_upper = 1
CoordBase::boundary_shiftout_y_lower = 1
CoordBase::boundary_shiftout_y_upper = 1
CoordBase::boundary_shiftout_z_lower = 1
CoordBase::boundary_shiftout_z_upper = 1

# Carpet
Carpet::domain_from_coordbase = "yes"
carpet::adaptive_stepsize = "no"
FunWave::dt_size = Time::timestep
Carpet::time_refinement_factors = "[1,1,1]"

# MoL
MoL::ODE_Method = "RK3"
#MoL::AB_Type = "3"
#MoL::AB_initially_reduce_order = yes
#MoL::MoL_intermediate_steps = 1
MoL::disable_prolongation        = "no"
#Carpet::prolongation_order_time = 0

# the output dir will be named after the parameter file name
IO::out_dir = $parfile
IO::out_fileinfo="none"
IOBasic::outInfo_every = 1
IOBasic::outInfo_vars = "FunWave::eta FunWave::u FunWave::v"

IOASCII::out1D_every = 1
IOASCII::out1d_vars = "FunWave::eta Funwave::depth"
IOASCII::out1D_xline_yi = 26
IOASCII::out2D_every = 100
IOASCII::out2D_xyplane_z = 0
IOASCII::out2D_vars = "
  FunWave::eta
  FunWave::u
  FunWave::v
"
IOASCII::out2D_xz = "no"
IOASCII::out2D_yz = "no"
IOASCII::output_ghost_points = "no"


#----------------------------------------------------
# Funwave parameters
#----------------------------------------------------

# Funwave depth 
#Funwave::perm_a = 2.0
FunWave::depth_file_offset_x = 0
FunWave::depth_file_offset_y = 0
FunWave::depth_type = "data"
FunWave::depth_format = "ele"
FunWave::depth_file = "/tmp/__depth__.txt"
FunWave::depth_flat = 0.47
#FunWave::test_depth_sandbar = 0.7
Funwave::test_depth_shore_x = 80
Funwave::test_depth_island_x = 25
Funwave::test_depth_island_y = 25
FunWave::depth_xslp = 10.0
FunWave::depth_slope = 0.05
Funwave::generate_test_depth_data = true

# Funwave wind forcing
Funwave::wind_force = false
Funwave::use_wind_mask = false
Funwave::num_time_wind_data = 2
Funwave::timewind[0] = 0
Funwave::wu[0] = 25
Funwave::wv[0] = 50
Funwave::timewind[1] = 1000
Funwave::wu[1] = 100
Funwave::wv[1] = 100
Funwave::boundary = funwave

# Funwave wave maker
FunWave::wavemaker_type = "ini_gau"
FunWave::xc = 30
FunWave::yc = 25
FunWave::amp =  0.5
FunWave::wid =  10
Funwave::wdep = 0.78
Funwave::xwavemaker = 5.0

# Funwave sponge 
FunWave::sponge_on = "no"
FunWave::sponge_west_width = 2.0
FunWave::sponge_east_width = 2.0
FunWave::sponge_north_width = 0.0
FunWave::sponge_south_width = 0.0
FunWave::sponge_decay_rate = 0.9
FunWave::sponge_damping_magnitude = 5.0

# Funwave dispersion (example 3 enables dispersion)
FunWave::dispersion_on = "true"
#FunWave::dispersion_on = "false"
FunWave::gamma1 = 1.0
FunWave::gamma2 = 1.0
FunWave::gamma3 = 1.0
FunWave::beta_ref = -0.531
FunWave::swe_eta_dep = 0.80
FunWave::cd = 0.001

# Funwave numerics (MoL parameter controls time integration scheme)
FunWave::reconstruction_scheme = "fourth"
FunWave::riemann_solver = "HLLC"
FunWave::dtfac = 0.5
FunWave::froudecap = 2.0
FunWave::mindepth = 0.001
FunWave::mindepthfrc = 0.001
FunWave::enable_masks = "true"
Funwave::estimate_dt_on = "true"
FunWave::static_mask = 0.3

FunwaveCoord::earth_a = 6371000.0
FunwaveCoord::earth_b = 6371000.0

FunwaveCoord::lat_south = 10.1
FunwaveCoord::spherical_coordinates = false

# FMR
#InitBase::initial_data_setup_method="init_all_levels"
Carpet::init_fill_timelevels = "true"
Carpet::max_refinement_levels    = 3

Carpet::ghost_size_x             = 3
Carpet::ghost_size_y             = 3
Carpet::ghost_size_z             = 3
Carpet::verbose                  = no
Carpet::schedule_barriers        = no
Carpet::veryverbose              = no

CarpetRegrid2::num_centres          = 1

CarpetRegrid2::num_levels_1         =  2
CarpetRegrid2::position_x_1         = 25.0
CarpetRegrid2::position_y_1         = 25.0
CarpetRegrid2::position_z_1         = 0.0
CarpetRegrid2::radius_1[ 1]         = 10.0
CarpetRegrid2::radius_1[ 2]         = 7.0

#cactus::debug_watch = "FUNWAVE::vxy FUNWAVE::uxx"
#Carpet::subcycling = yes


More information about the Users mailing list