[Users] CarpetRegrid2

Steven R. Brandt sbrandt at cct.lsu.edu
Wed Jan 30 15:33:08 CST 2019


My code (par file attached) is dying in regrid.cc with this error message:

terminate called after throwing an instance of 'std::out_of_range'
   what():  vector::_M_range_check: __n (which is 0) >= this->size() 
(which is 0)

The relevant code is below. I'm not sure what I'm doing wrong. Any 
ideas? Thanks.

         } else {
           // The level did not actually change: re-use the old domain
           // decomposition

           for (int m = 0; m < maps; ++ m) {
superregsss.at(m).at(rl).swap(old_superregsss.at(m).at(rl));
             int const ml = 0;
regsss.at(m).at(rl).swap(old_regssss.at(m).at(ml).at(rl)); // <-- dying here
           }

         } // if level did change
       } // for rl

--Steve

-------------- 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 InterpToArray CarpetInterp2
Spacemask SphericalSurface Tridiagonal "

#----------------------------------------------------
# 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 = 20
#Cactus::terminate = "time"
#Cactus::cctk_final_time = 5.0
Cactus::allow_mixeddim_gfs = "yes"
#Carpet::prolongation_order_space = 1

Carpet::processor_topology = "recursive"
#Carpet::processor_topology_3d_x = 2
#Carpet::processor_topology_3d_y = 2
#Carpet::processor_topology_3d_z = 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 =  30.1
CoordBase::ymin =  0
CoordBase::ymax =  30.1
CoordBase::zmin =  -5.0
CoordBase::zmax =  5.0
CoordBase::dx   =  0.1
CoordBase::dy   =  0.1
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
  InterpToArray::arrays2d[0]
"
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 = 3
FunWave::depth_file_offset_y = 3
FunWave::depth_type = "flat"
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    = 1

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

ActiveThorns = "CarpetRegrid2"
CarpetRegrid2::num_centres          = 1

CarpetRegrid2::num_levels_1         =  1
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
CarpetRegrid2::radius_1[ 3]         = 1.0

#cactus::debug_watch = "FUNWAVE::vxy FUNWAVE::uxx"
#Carpet::subcycling = yes
Activethorns = "CarpetIOHDF5"
IOHDF5::out2D_xyplane_z = 0
IOHDF5::out2D_every = 8
IOHDF5::out2D_vars = "
        FunWave::eta
        FunWave::u
        FunWave::v
        FunWave::depth
        FunWave::mask
        FunWave::mask9
"
IOHDF5::out2D_xz = "no"
IOHDF5::out2D_yz = "no"

InterpToArray::use_carpetinterp2  = "yes"
InterpToArray::carpetinterp2_interpolator_order = 2

InterpToArray::narrays2d          = 1
InterpToArray::array2d_vars[0]    = "FunWave::eta"
InterpToArray::array2d_x0         = 10.0
InterpToArray::array2d_y0         = 10.0
InterpToArray::array2d_z0         = 0.0
InterpToArray::array2d_dx_i       =  2.0
InterpToArray::array2d_dy_j       =  2.0
InterpToArray::array2d_dz_j       =  0.0
InterpToArray::array2d_npoints_i  =  3
InterpToArray::array2d_npoints_j  =  4


More information about the Users mailing list