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
12 changes: 6 additions & 6 deletions star/private/alloc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,12 @@ subroutine star_info_arrays(s, c_in, action_in, ierr)
if (failed('mlt_vc')) exit
call do1(s% conv_vel, c% conv_vel)
if (failed('conv_vel')) exit

! These are persistent inputs needed for ST time smoothing.
call do1(s% D_ST_start, c% D_ST_start)
if (failed('D_ST_start')) exit
call do1(s% nu_ST_start, c% nu_ST_start)
if (failed('nu_ST_start')) exit
end if

call do1(s% q, c% q)
Expand Down Expand Up @@ -811,12 +817,6 @@ subroutine star_info_arrays(s, c_in, action_in, ierr)
call do1(s% dynamo_B_phi, c% dynamo_B_phi)
if (failed('dynamo_B_phi')) exit

!for ST time smoothing
call do1(s% D_ST_start, c% D_ST_start)
if (failed('D_ST_start')) exit
call do1(s% nu_ST_start, c% nu_ST_start)
if (failed('nu_ST_start')) exit

call do1(s% opacity, c% opacity)
if (failed('opacity')) exit
call do1(s% d_opacity_dlnd, c% d_opacity_dlnd)
Expand Down
3 changes: 2 additions & 1 deletion star/private/evolve.f90
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ subroutine test_set_undefined
call set_to_NaN(s% mesh_adjust_PE_conservation)
call set_to_NaN(s% min_conv_time_scale)
call set_to_NaN(s% mstar_dot_old)
call set_to_NaN(s% mstar_old)
if (.not. s% doing_first_model_after_restart) call set_to_NaN(s% mstar_old)
call set_to_NaN(s% mx1_bot)
call set_to_NaN(s% mx1_bot_r)
call set_to_NaN(s% mx1_top)
Expand Down Expand Up @@ -1894,6 +1894,7 @@ integer function prepare_for_new_step(s)

call new_generation(s, ierr)
if (failed('new_generation ierr')) return
s% doing_first_model_after_restart = .false.
s% generations = 2

if ((s% time + s% dt_next) > s% max_age*secyer .and. s% max_age > 0) then
Expand Down
2 changes: 1 addition & 1 deletion star/private/photo_in.f90
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ subroutine read_star_photo(s, fname, ierr)
s% dq(1:nz), s% xa(:,1:nz), s% xh(:,1:nz), &
s% omega(1:nz), s% j_rot(1:nz), s% mlt_vc(1:nz), s% conv_vel(1:nz), &
s% D_ST_start(1:nz), s% nu_ST_start(1:nz), & ! needed for ST time smoothing
s% have_ST_start_info
s% have_ST_start_info, s% mstar_old

call read_part_number(iounit)
if (failed('rsp_num_periods')) return
Expand Down
2 changes: 1 addition & 1 deletion star/private/photo_out.f90
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ subroutine output_star_photo(s,iounit,ierr)
s% dq(1:nz), s% xa(:,1:nz), s% xh(:,1:nz), &
s% omega(1:nz), s% j_rot(1:nz), s% mlt_vc(1:nz), s% conv_vel(1:nz), &
s% D_ST_start(1:nz), s% nu_ST_start(1:nz), & ! needed for ST time smoothing
s% have_ST_start_info
s% have_ST_start_info, s% mstar_old

call write_part_number(iounit)
write(iounit) &
Expand Down
5 changes: 4 additions & 1 deletion star/private/read_model.f90
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ subroutine finish_load_model(s, restart, ierr)
! to account for the loading of old saved models.
if (s% have_j_rot) then
if (restart) then
! only need to compute irot, w_div_w_crit_roche is stored in photos
! Photo loading does not restore w_div_w_crit_roche.
! Initialize it before either the fallback or set_vars can use it.
call use_xh_to_update_i_rot(s)
! Preserve the photo's omega for rotation-dependent tidal deformation.
call set_i_rot_from_omega_and_j_rot(s)
else
! need to set w_div_w_crit_roche as well
Expand Down
2 changes: 1 addition & 1 deletion star_data/public/star_data_def.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

character(len=24) :: version_number ! mesa version from file $MESA_DIR/data/version_number

integer, parameter :: star_def_version = 18
integer, parameter :: star_def_version = 19

integer, parameter :: nz_alloc_extra = 200

Expand Down
Loading