# ------------------  INPUTS TO MAIN PROGRAM  -------------------
max_step = 1000000000
stop_time = 300000

# PROBLEM SIZE & GEOMETRY
geometry.is_periodic = 1      1      0
geometry.coord_sys   = 0                  # 0 => cart, 1 => RZ  2=>spherical
geometry.prob_lo     = 0.0      0.0       0.0
geometry.prob_hi     = 9.81747704246810348767e8  9.81747704246810348767e8  3926990816.987241395066
amr.n_cell           = 64 64 256

# >>>>>>>>>>>>>  BC FLAGS <<<<<<<<<<<<<<<<
# 0 = Interior           3 = Symmetry
# 1 = Inflow             4 = SlipWall
# 2 = Outflow            5 = NoSlipWall
# >>>>>>>>>>>>>  BC FLAGS <<<<<<<<<<<<<<<<
castro.lo_bc       =  0    0    1
castro.hi_bc       =  0    0    2


castro.zl_ext_bc_type = 1
castro.hse_interp_temp = 1
castro.hse_reflect_vels = 1

castro.hse_zero_vels=0
fab.format=NATIVE_32

# WHICH PHYSICS
castro.do_hydro = 1
castro.do_react = 0
castro.add_ext_src = 0
castro.do_grav = 1
castro.do_sponge = 1
castro.do_radiation = 1
castro.do_rotation = 0
castro.do_reflux      = 1


#castro.do_tracer_particles      = 1
#particles.particle_init_file    = particle_file   # initial position of particles
#particles.particle_restart_file = xxxxx           # we can add new particles at restart
#particles.timestamp_dir         = particle_dir    # directory for output
#particles.timestamp_density     = 1
#particles.timestamp_temperature = 1
#particles.v                     = 1               # verbosity


#castro.ppm_type = 1
#castro.ppm_reference = 1
#castro.ppm_reference_edge_limit = 1
#castro.riemann_solver = 1

gravity.gravity_type = ConstantGrav
gravity.const_grav   = -1.0e3

castro.sponge_lower_factor = 0.0
castro.sponge_upper_factor = 1.0

castro.sponge_lower_density = 1.1e-15
castro.sponge_upper_density = 1.0e-13

castro.sponge_target_x_velocity = 0.0

castro.sponge_lower_pressure = 0.9e1
castro.sponge_upper_pressure = 1.0e1

castro.sponge_timescale    = 1.e2

# TIME STEP CONTROL
castro.cfl            = 0.01     # cfl number for hyperbolic system
castro.init_shrink    = 0.01     # scale back initial timestep
castro.change_max     = 1.001     # max time step growth

#castro.fixed_dt = 1.0e-3
#castro.initial_dt = 1e-4
# DIAGNOSTICS & VERBOSITY
castro.sum_interval   = 1       # timesteps between computing mass
castro.v              = 1       # verbosity in Castro.cpp
amr.v                 = 1       # verbosity in Amr.cpp

# REFINEMENT / REGRIDDING 
amr.max_level       = 0       # maximum level number allowed
amr.ref_ratio       = 2 2 2 2 # refinement ratio
amr.regrid_int      = 2 2 2 2 # how often to regrid
amr.blocking_factor = 8       # block factor in grid generation
amr.max_grid_size   = 128 
amr.n_error_buf     = 2 2 2 2 # number of buffer cells in error est

# CHECKPOINT FILES
amr.check_file      = chk        # root name of checkpoint file
amr.check_per       = 1000       # number of timesteps between checkpoints
#amr.restart        = 100
# PLOTFILES
amr.plot_file        = plt        # root name of plotfile
amr.plot_per         = 100000         # number of timesteps between plotfiles
amr.derive_plot_vars = X(X) z_velocity magvort
amr.plot_vars = density Temp xmom ymom zmom magvort z_velocity



# Root name of small plot files
amr.small_plot_file = smallplt

# Simulation time between small plotfiles
amr.small_plot_per = 5000

# Number of timesteps between small plotfiles
#amr.small_plot_int = 1

# State variables to add to small plot files
amr.small_plot_vars = density Temp xmom ymom zmom rad
amr.derive_small_plot_vars = rad pressure




#RESTART
#amr.restart      =    chk07196

# PROBLEM PARAMETERS
problem.model_name =  "newmodelcpp.hse"

problem.apply_vel_field = 0
problem.shear_vel_field = 0
problem.velpert_height_loc = 0.0e0
problem.velpert_scale = 0e0
problem.velpert_amplitude = 0.0e0
problem.num_vortices = 2

problem.shear_height_loc = 0.99365234538e9
problem.shear_amplitude  = 3.863080704e5
problem.shear_height     = 14
problem.shear_width_x    = 80.0
problem.shear_width_y    = 20.0

# EOS
eos.eos_gamma = 1.4

# OPACITY
opacity.const_kappa_p =  6.35e-3
opacity.kappa_p_exp_m =  2.0e0
opacity.kappa_p_exp_n = -1.0e0
opacity.kappa_p_exp_p =  0.0e0

opacity.const_kappa_r =  6.35e-3
opacity.kappa_r_exp_m =  2.0e0
opacity.kappa_r_exp_n = -1.0e0
opacity.kappa_r_exp_p =  0.0e0

# DATA LOG
amr.data_log = log


# ------------------  INPUTS TO RADIATION CLASS  -------------------

##### SolverType #####
# 0: single group diffusion w/o coupling to hydro
# 5: SGFLD       6: MGFLD
radiation.SolverType = 5

radiation.comoving = 0

radiation.Er_Lorentz_term = 0

# RADIATION TOLERANCES
radiation.reltol  = 1.e-8 # relative tolerance for implicit update loop
radiation.abstol  = 1.0e-10   # absolute tolerance for implicit update loop
radiation.maxiter = 300    # return after numiter iterations if not converged

# RADIATION LIMITER
radiation.limiter = 2     # 0 = no limiter
                          # 2 = correct form of Lev-Pom limiter

radiation.delta_temp            = 1e-13

# RADIATION VERBOSITY
radiation.v               = 0    # verbosity

# We set radiation boundary conditions directly since they do not
# correspond neatly to the physical boundary conditions used for the fluid.
# The choices are:
# 101 = LO_DIRICHLET           102 = LO_NEUMANN
# 104 = LO_MARSHAK             105 = LO_SANCHEZ_POMRANING

radiation.lo_bc     = 102   102   102
radiation.hi_bc     = 102   102   101

# For each boundary, we can specify either a constant boundary value
# or use a Fortran function FORT_RADBNDRY to specify values that vary
# in space and time.

# If bcflag is 0 then bcval is used, otherwise FORT_RADBNDRY used:

radiation.lo_bcflag = 0  0  0
radiation.hi_bcflag = 0  0  0

# bcval is interpreted differently depending on the boundary condition
# 101 = LO_DIRICHLET           bcval is Dirichlet value of rad energy density
# 102 = LO_NEUMANN             bcval is inward flux of rad energy
# 104 = LO_MARSHAK             bcval is incident flux
# 105 = LO_SANCHEZ_POMRANING   bcval is incident flux

radiation.lo_bcval = 0.0    0.0    1e-10
radiation.hi_bcval = 0.0    0.0    0.0793671

radiation.plot_lab_Er =	1
radiation.plot_com_flux = 1
radiation.plot_lab_flux = 1

radiation.plot_lambda = 1
radiation.plot_kappa_p = 1
radiation.plot_kappa_r = 1


# ------------------  INPUTS TO RADIATION SOLVER CLASS  -------------------

# solver flag values <  100 use HypreABec, support symmetric matrices only
# solver flag values >= 100 use HypreMultiABec, support nonsymmetric matrices
#
# PFMG does not support 1D.
# ParCSR does not work for periodic boundaries.
# For MGFLD with accelerate = 2, must use >=100.
#
# 0     SMG
# 1     PFMG  (>= 2D only)
# 100   AMG   using ParCSR ObjectType
# 102   GMRES using ParCSR ObjectType
# 103   GMRES using SStruct ObjectType
# 104   GMRES using AMG as preconditioner
# 109   GMRES using Struct SMG/PFMG as preconditioner
# 150   AMG   using ParCSR ObjectType
# 1002  PCG   using ParCSR ObjectType
# 1003  PCG   using SStruct ObjectType

radsolve.level_solver_flag = 1003   # can be any supported hypre solver flag

radsolve.reltol     = 1.0e-10 # relative tolerance
radsolve.abstol     = 0.0     # absolute tolerance (often not necessary)
radsolve.maxiter    = 200     # linear solver iteration limit

radsolve.v = 0      # verbosity

hmabec.verbose = 0  # verbosity for HypreMultiABec solvers
habec.verbose  = 0  # verbosity for HypreABec solvers
