Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ Fixed bug in binary photos. They were not saving the variables: ``CE_years_detac

Fixed bug that ``Orbit_win_flag = .true.`` was not showing Orbit plot (pgbinary)

Fixed a bug in ``other_mlt_results`` which resulted in the pre-ms model builder reporting a segfault. ``other_mlt_results`` should now support ``mlt_option = TDC`` as well. see `gh-874 <https://github.com/MESAHub/mesa/issues/874`_.

Removed unused parameters: ``fp_error_limit``, ``fp_min``, ``ft_error_limit``, ``ft_min``, ``retain_fallback_at_each_step``.


Expand Down
4 changes: 2 additions & 2 deletions star/other/other_mlt_results.f90
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module other_mlt_results
contains

subroutine null_other_mlt_results(id, k, MLT_option, & ! NOTE: k=0 is a valid arg
r, L, T, P, opacity, rho, chiRho, chiT, Cp, gradr, grada, scale_height, &
r, L, T, P, opacity, rho, dV, chiRho, chiT, Cp, gradr, grada, scale_height, &
iso, XH1, cgrav, m, gradL_composition_term, mixing_length_alpha, &
alpha_semiconvection, thermohaline_coeff, &
mixing_type, gradT, Y_face, conv_vel, D, Gamma, ierr)
Expand All @@ -39,7 +39,7 @@ subroutine null_other_mlt_results(id, k, MLT_option, & ! NOTE: k=0 is a valid a
integer, intent(in) :: k
character(len=*), intent(in) :: MLT_option
type(auto_diff_real_star_order1), intent(in) :: &
r, L, T, P, opacity, rho, chiRho, chiT, Cp, gradr, grada, scale_height
r, L, T, P, opacity, rho, dV, chiRho, chiT, Cp, gradr, grada, scale_height
integer, intent(in) :: iso
real(dp), intent(in) :: &
XH1, cgrav, m, gradL_composition_term, &
Expand Down
23 changes: 16 additions & 7 deletions star/private/turb_support.f90
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,21 @@ subroutine get_gradT(s, MLT_option, & ! used to create models
gradr_ad = gradr
grada_ad = grada
scale_height_ad = scale_height
call Get_results(s, 0, MLT_option, &
r_ad, L_ad, T_ad, P_ad, opacity_ad, rho_ad, dV_ad, chiRho_ad, chiT_ad, Cp_ad, &
gradr_ad, grada_ad, scale_height_ad, &
iso, XH1, cgrav, m, gradL_composition_term, mixing_length_alpha, &
s% alpha_semiconvection, s% thermohaline_coeff, &
mixing_type, gradT_ad, Y_face_ad, mlt_vc_ad, D_ad, Gamma_ad, ierr)
if (s% use_other_mlt_results) then
call s% other_mlt_results(s% id, 0, MLT_option, &
r_ad, L_ad, T_ad, P_ad, opacity_ad, rho_ad, dV_ad, chiRho_ad, &
chiT_ad, Cp_ad, gradr_ad, grada_ad, scale_height_ad, &
iso, XH1, cgrav, m, gradL_composition_term, mixing_length_alpha, &
s% alpha_semiconvection, s% thermohaline_coeff, &
mixing_type, gradT_ad, Y_face_ad, mlt_vc_ad, D_ad, Gamma_ad, ierr)
else
call Get_results(s, 0, MLT_option, &
r_ad, L_ad, T_ad, P_ad, opacity_ad, rho_ad, dV_ad, chiRho_ad, &
chiT_ad, Cp_ad, gradr_ad, grada_ad, scale_height_ad, &
iso, XH1, cgrav, m, gradL_composition_term, mixing_length_alpha, &
s% alpha_semiconvection, s% thermohaline_coeff, &
mixing_type, gradT_ad, Y_face_ad, mlt_vc_ad, D_ad, Gamma_ad, ierr)
end if
gradT = gradT_ad%val
Y_face = Y_face_ad%val
conv_vel = mlt_vc_ad%val
Expand Down Expand Up @@ -163,7 +172,7 @@ subroutine do1_mlt_eval( &

if (s% use_other_mlt_results) then
call s% other_mlt_results(s% id, k, MLT_option, &
r, L, T, P, opacity, rho, chiRho, chiT, Cp, gradr, grada, scale_height, &
r, L, T, P, opacity, rho, dV, chiRho, chiT, Cp, gradr, grada, scale_height, &
iso, XH1, cgrav, m, gradL_composition_term, mixing_length_alpha, &
s% alpha_semiconvection, s% thermohaline_coeff, &
mixing_type, gradT, Y_face, mlt_vc, D, Gamma, ierr)
Expand Down
4 changes: 2 additions & 2 deletions star_data/public/star_data_def.inc
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@


subroutine other_mlt_results_interface(id, k, MLT_option, & ! NOTE: k=0 is a valid arg
r, L, T, P, opacity, rho, chiRho, chiT, Cp, gradr, grada, scale_height, &
r, L, T, P, opacity, rho, dV, chiRho, chiT, Cp, gradr, grada, scale_height, &
iso, XH1, cgrav, m, gradL_composition_term, mixing_length_alpha, &
alpha_semiconvection, thermohaline_coeff, &
mixing_type, gradT, Y_face, conv_vel, D, Gamma, ierr)
Expand All @@ -806,7 +806,7 @@
integer, intent(in) :: k
character (len=*), intent(in) :: MLT_option
type(auto_diff_real_star_order1), intent(in) :: &
r, L, T, P, opacity, rho, chiRho, chiT, Cp, gradr, grada, scale_height
r, L, T, P, opacity, rho, dV, chiRho, chiT, Cp, gradr, grada, scale_height
integer, intent(in) :: iso
real(dp), intent(in) :: &
XH1, cgrav, m, gradL_composition_term, &
Expand Down