# INITIAL MODEL
maestro.model_file = "ecsn.hse.25600"
maestro.drdxfac = 5

#amrex.fpe_trap_invalid = 1

# GRIDDING AND REFINEMENT
amr.max_level          = 3       # maximum level number allowed
amr.n_cell             = 128 128 128
amr.max_grid_size      = 64
#amr.ref_ratio          = 2 2 2 2  

amr.refine_grid_layout = 1       # chop grids up into smaller grids
if nprocs > ngrids

maestro.anelastic_cutoff_density = 1.e6
maestro.base_cutoff_density = 1.e5
maestro.burning_cutoff_density = 1.e5

maestro.do_sponge = 1
maestro.sponge_center_density = 3.e6
maestro.sponge_start_factor = 3.333e0
maestro.sponge_kappa = 10.e0

maestro.spherical = 1
maestro.octant = true

# PROBLEM SIZE
geometry.prob_lo     =  0.0    0.0    0.0
geometry.prob_hi     =  4.e7   4.e7   4.e7
# geometry.prob_hi     =  5.e7   5.e7   5.e7

# TIME STEPPING
maestro.max_step  = 30000
maestro.init_iter = 1

maestro.stop_time = 30000

# PLOTFILES
maestro.plot_file  = plt    # root name of plot file
maestro.plot_int   = 10     # number of timesteps between plot files
#maestro.small_plot_int = 50

#maestro.plot_vars = tfromp Hnuc X(ne20) X(o16) X(o20)
#maestro.small_plot_vars = rho tfromp Hnuc X(ne20) X(o16) X(o20)
#maestro.derive_plot_vars = tfromp Hnuc X(ne20) X(o16) X(o20)
#maestro.derive_small_plot_vars = tfromp Hnuc X(ne20) X(o16) X(o20)

# CHECKPOINT
maestro.check_base_name = chk
maestro.chk_int         = 10

maestro.cfl       = 0.7    # cfl number for hyperbolic system
                           # In this test problem, the velocity is
		           # time-dependent.  We could use 0.9 in
		           # the 3D test, but need to use 0.7 in 2D
		           # to satisfy CFL condition.

maestro.init_shrink = 0.1e-1
maestro.max_dt_growth = 1.1e0
maestro.use_soundspeed_firstdt = true
maestro.use_divu_firstdt = true

# BOUNDARY CONDITIONS
# 0 = Interior   3 = Symmetry
# 1 = Inflow     4 = Slipwall
# 2 = Outflow    5 = NoSlipWall
maestro.lo_bc = 3 3 3
maestro.hi_bc = 2 2 2
geometry.is_periodic =  0 0 0

# VERBOSITY
maestro.v              = 1       # verbosity
maestro.mg_verbose     = 1
maestro.cg_verbose     = 0

# ALGORITHMIC OPTIONS
maestro.do_initial_projection = true
maestro.init_divu_iter        = 3

maestro.do_burning = true

maestro.evolve_base_state = false

maestro.dpdt_factor = 0.0e0

maestro.use_tfromp = true

# tolerances for the initial projection
maestro.eps_init_proj_cart = 1.e-12
maestro.eps_init_proj_sph  = 1.e-10
# tolerances for the divu iterations
maestro.eps_divu_cart      = 1.e-12  # xinlong
maestro.eps_divu_sph       = 1.e-10
maestro.divu_iter_factor   = 100.
maestro.divu_level_factor  = 10.
# tolerances for the MAC projection
maestro.eps_mac            = 1.e-10
maestro.eps_mac_max        = 1.e-8
maestro.mac_level_factor   = 10.
maestro.eps_mac_bottom     = 1.e-3
# tolerances for the nodal projection
maestro.eps_hg             = 1.e-11
maestro.eps_hg_max         = 1.e-10
maestro.hg_level_factor    = 10.
maestro.eps_hg_bottom      = 1.e-4

&probin

  velpert_amplitude = 1.e5
  velpert_radius = 2.e7
  velpert_scale = 1.e7
  velpert_steep = 1.e5
  tag_density_1 = 6.8e9
  tag_density_2 = 1.e8
  tag_density_3 = 1.e8
  particle_temp_cutoff = 6.e8
  particle_tpert_threshold = 2.e7

  use_eos_coulomb = T
  retry_burn = T
/

