! ============
! controls_dev
! ============

! .. warning::
!
!  CONTAINS OPTIONS THAT HAVE NOT YET BEEN THE GIVEN A GREEN LIGHT FOR GENERAL USE.
!  IN PARTICULAR, THESE ARE NOT YET FOR USE IN RESEARCH TO BE PUBLISHED.

      ! TDC options
      ! ~~~~~~~~~~~
      ! ::

      compare_TDC_to_MLT = .false.

      ! use_TDC_Y_face_seeded_newton
      ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ! If true, use the start-of-step TDC Y_face on the first solver
      ! iteration, and the previous solver iteration's TDC Y_face thereafter,
      ! to try a small local positive-Y bracket before the full bracketing path.
      ! The seed is only used during structural solver iterations.
      !
      ! ::

      use_TDC_Y_face_seeded_newton = .false.

      ! Hydro matrix solver options
      ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ! hydro_matrix_solver selects the mesa-star hydro matrix solve.
      ! Options are 'bcyclic' for the existing block cyclic reduction solver
      ! and 'banded' for an RSP-like DGBTRF/DGBTRS banded solve.
      !
      ! ::

      hydro_matrix_solver = 'bcyclic'

      ! RSP2 parameters
      ! ~~~~~~~~~~~~~~~

      !|   RSP2_alfad =     1.0d0         ! turbulent dissipation; damp ~ RSP2_alfad
      !|   RSP2_alfap =     0.0d0         ! turbulent pressure; Pt ~ alfap
      !|   RSP2_alfat =     0.0d0         ! turbulent flux; Lt ~ RSP2_alfat
      !|   RSP2_alfam =     0.25d0        ! turbulent viscosity; Eq and Uq ~ RSP2_alfam
      !|   RSP2_alfar =     0.0d0         ! radiative dissipation of turbulent energy; Dr ~ RSP2_alfar
      !
      ! RSP2 time weighting is determined by the velocity_time_centering controls.
      !
      !     + for Pt and Lt in turbulent energy equation
      !     + for P and grav in momentum equation
      !     + for P and L in energy equation
      !     + for area when multiplied by P
      !
      ! RSP2_Lsurf_factor: Lsurf = RSP2_Lsurf_factor*area(1)*clight*crad*T(1)**4
      ! RSP2_use_Stellingwerf_Lr as in RSP
      !

      ! ::

    RSP2_alfad = 1.0d0
    RSP2_alfap = 0.0d0
    RSP2_alfat = 0.0d0
    RSP2_alfam = 0.25d0
    RSP2_alfar = 0.0d0

    RSP2_min_Lt_div_L_for_overshooting_mixing_type = 1d-4
    RSP2_min_Lc_div_L_for_convective_mixing_type = 1d-4

    RSP2_Lsurf_factor = 0.5d0

    RSP2_report_adjust_w = .false.
    RSP2_use_L_eqn_at_surface = .true.
    RSP2_assume_HSE = .true.
    RSP2_use_RSP_eqn_for_Y_face = .true.
    RSP2_use_mass_interp_face_values = .false.
    RSP2_use_Stellingwerf_Lr = .true.

    RSP2_num_outermost_cells_forced_nonturbulent = 0
    RSP2_num_innermost_cells_forced_nonturbulent = 0

   RSP2_w_fix_if_neg = 5d-5
   RSP2_w_min_for_damping = 1d2
   RSP2_source_seed = 0d0

   RSP2_remesh_when_load = .true.

   RSP2_nz = 150
   RSP2_nz_outer = 40
   RSP2_T_anchor = 11d3
   RSP2_dq_1_factor = 2d0

   RSP2_nz_div_IBOTOM = 30d0


      ! period controls

      ! ::

    RSP2_target_steps_per_cycle = 600
    RSP2_min_max_R_for_periods = -1

      ! when to stop

      ! ::

    RSP2_max_num_periods = -1
    RSP2_GREKM_avg_abs_frac_new = 0.1d0
    RSP2_GREKM_avg_abs_limit = -1

      ! output data for work integrals during a particular period

      ! ::

    RSP2_work_period = -1
    RSP2_work_filename = 'work.data'

      ! output data for 3d map.  format same as for gnuplot pm3d

      ! ::

    RSP2_write_map = .false.
    RSP2_map_columns_filename = 'map_columns.list'

      ! items listed in your map columns must also appear in your profile columns

      ! ::

    RSP2_map_filename = 'map.data'
    RSP2_map_first_period = -1
    RSP2_map_last_period = -1
    RSP2_map_zone_interval = 2
    RSP2_map_history_filename = 'map_history.data'


! mass corrections
! ================


      ! use_mass_corrections
      ! ~~~~~~~~~~~~~~~~~~~~

      ! Gravitational vs baryonic mass corrections.

      ! The Lagrangian coordinate (:math:`m`) in MESA is the baryonic
      ! mass and the density (:math:`\rho`) is the baryonic mass
      ! density.

      ! If false, then no distinction between gravitational and baryonic mass.
      ! If true, then the gravitational mass is calculated using mass corrections
      ! and the momentum equation, total energy equation, and Brunt are modified.

      ! The variable ``mass_correction`` is the quantity you multiply
      ! the baryonic mass density by to get the gravitational mass
      ! density:

      !     (mass density) = (baryon density) * amu * mass_correction

      ! Given the mass fractions in a cell, the value of
      ! mass_correction is provided by the ``chem`` module.

      ! MESA holds m_grav fixed during the newton iterations.  This results
      ! in an energy conservation error, because the specific potential energy
      ! changes when m_grav is updated afterwards.  A message showing
      ! the relative energy error incurred due to this assumption
      ! will be printed to the terminal.

      ! Not compatible with RSP.

      ! ::

    use_mass_corrections = .false.


      ! phase_separation_no_diffusion
      ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      ! if true and element diffusion is on, prevent element diffusion
      ! from occurring in the layers where phase separation mixing
      ! is present (experimental)

      ! ::

    phase_separation_no_diffusion = .false.


! split burn
! ==========


      ! op_split_burn_min_T_for_variable_T_solver
      ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      ! use variable T, constant density solver for op_split_burn in cells with T >= this limit at start of step.
      ! only adopted in cells with T >= op_split_burn_min_T at start of step.

      ! ::

    op_split_burn_min_T_for_variable_T_solver = 1d99


! TDC
! ===


      ! TDC_use_density_form_for_eddy_viscosity
      ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      ! If ``u_flag = .true.`` or ``TDC_use_density_form_for_eddy_viscosity = .true.``, use density
      ! derivative from newton solver to form d(v/r)/dr, used to compute Eq and Uq.

    TDC_use_density_form_for_eddy_viscosity = .false.


      ! TDC_adjust_mass_fallback_to_mlt
      ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      ! If TDC_adjust_mass_fallback_to_mlt = .true., cells touched by
      ! adjust_mass use MLT instead of TDC. This matches the previous behavior.
      ! If false, TDC remains enabled in those cells and uses the TDC
      ! convective velocity for the zone.

      ! ::

    TDC_adjust_mass_fallback_to_mlt = .true.


      ! use_TDC_enthalpy_flux_limiter
      ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      ! If use_TDC_enthalpy_flux_limiter = .true. , apply enthalpy flux limiter to TDC
      ! similar to the form presented in Wuchterl & Feuchtinger 1998, and Smolec 2008.

      ! ::

    use_TDC_enthalpy_flux_limiter = .false.


      ! include_mlt_Pturb_in_thermodynamic_gradients
      ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      ! If mlt_Pturb_factor > 0, includes the effect of turbulent pressure Pturb
      ! on thermodynamic gradients gradr, grada, and hence gradT.
      ! Not supported by other_alpha_mlt or starspots

      ! ::

    include_mlt_Pturb_in_thermodynamic_gradients = .false.


      ! include_mlt_in_velocity_time_centering
      ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      ! If doing velocity time_centering, include time centering in mlt. Depending on the time
      ! centering flags adopted, include_mlt_in_velocity_time_centering includes time centering
      ! for P, L, and r in geff, gradr, grada, and mlt.

      ! ::

    include_mlt_in_velocity_time_centering = .false.


! Remeshing
! =========


      ! use_hydro_merge_limits_in_mesh_plan
      ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      ! Allows use of ``merge_amr_max_abs_du_div_cs``, ``merge_amr_du_div_cs_limit_only_for_compression``,
      ! and ``merge_amr_inhibit_at_jumps`` in default mesh_plan when ``use_split_merge_amr = .false.``.
      ! Only supports ``v_flag``.

      ! ::

    use_hydro_merge_limits_in_mesh_plan = .false.
