# these are the parameters for the integration module

# When evolving the temperature, should we assume a constant pressure (default) 
# or a constant volume (do_constant_volume_burn = T)?
do_constant_volume_burn  logical   .false.

# Do we call the EOS each time we enter the EOS?  This is expensive,
# but more accurate.  Otherwise, we instead call the EOS at the start
# of the integration and freeze the thermodynamics throughout the RHS
# evalulation.  This only affects the temperature integration (which
# is the input to the rate evaluation). In particular, since we
# calculate the composition factors either way, this determines
# whether we're updating the thermodynamic derivatives and other
# quantities (cp and cv) as we go.
call_eos_in_rhs          logical   .false.

# If we want to call the EOS in general, but don't want to overdo it,
# we can set a fraction ``dT_crit`` such that we only do the EOS call
# if the temperature has changed by a relative fraction > ``dT_crit``.
# If we use this option, we will do a linear fit to c_v and c_p
# in between EOS calls. This will work regardless of call_eos_in_rhs.
dT_crit                  real      1.0d20

# Integration mode: if 0, a hydrostatic burn (temperature and density
# remain constant), and if 1, a self-heating burn (temperature/energy
# evolve with the burning). If 2, a hybrid approach presented by
# Raskin et al. (2010): do hydrostatic everywhere, but if the
# hydrostatic burn gives us a negative energy change, redo the burn in
# self-heating mode.  If 3, do normal self-heating, but limit all
# values of the RHS by the same factor :math:`L` such that :math:`\dot{e} = f_s e / t_s`,
# where :math:`\dot{e}` is the energy injection rate, :math:`e` is the
# internal energy of the zone, :math:`t_s` is the sound crossing time, and
# :math:`f_s` is a safety factor. :math:`L` is computed as :math:`\min(1, f_s (e / \dot{e}) / t_s)`.
burning_mode             integer   1

# If we're using ``burning_mode == 3``, this is the safety factor :math:`f_s` to use.
burning_mode_factor      real      1.d-1

# Allow the temperature integration to be disabled by setting the RHS to zero.
integrate_temperature    logical   .true.

# Allow the energy integration to be disabled by setting the RHS to zero.
integrate_energy         logical   .true.

# Whether to use an analytical or numerical Jacobian.
# 1 == Analytical
# 2 == Numerical
jacobian                 integer   1

# one-sided numerical jacobian (.False.) or centered-difference
# Jacobian (.true.).  Note: the centered-difference requires
# twice as many RHS calls
centered_diff_jac        logical   .false.


# Should we print out diagnostic output after the solve?  
burner_verbose           logical   .false.

# Tolerances for the solver (relative and absolute), for the
# species, temperature, and energy equations.
rtol_spec                real      1.d-12
rtol_temp                real      1.d-6
rtol_enuc                real      1.d-6

atol_spec                real      1.d-12
atol_temp                real      1.d-6
atol_enuc                real      1.d-6

# If we fail to find a solution consistent with the tolerances,
# do we want to try again with a looser tolerance?
retry_burn               logical   .false.

# If we do retry a burn, by what factor should we loosen the tolerance?
retry_burn_factor        real      1.25d0

# What is the maximum factor we can increase the original tolerances by?
retry_burn_max_change    real      1.0d2

# Should we abort the run when the burn fails?
abort_on_failure         logical   .true.

# Whether to renormalize the mass fractions at each step in the evolution
# so that they sum to unity.
renormalize_abundances   logical   .false.

# The absolute cutoff for species -- note that this might be larger
# than ``small_x``, but the issue is that we need to prevent underflow
# issues and keep mass fractions positive in the integrator.  You may
# have to increase the floor to, e.g. 1.d-20 if your rates are large.
SMALL_X_SAFE                 real            1.0d-30

# The maximum temperature for reactions in the integration.
MAX_TEMP                     real            1.0d11

# boost the reaction rates by a factor > 1
react_boost                 real         -1.d0

# density, temperature, and energy scaling factors
reactions_density_scale          real         1.d0
reactions_temperature_scale      real         1.d0
reactions_energy_scale           real         1.d0

# maximum number of timesteps for the integrator
ode_max_steps              integer      150000

# Whether to use Jacobian caching in VODE
use_jacobian_caching    logical   .true.

# Inputs for generating a Nonaka Plot (TM)
nonaka_i                integer           0
nonaka_j                integer           0
nonaka_k                integer           0
nonaka_file             character         "nonaka_plot.dat"
