Skip to content

Commit 60bf7dc

Browse files
committed
Merge branch 'abundance_timestep_controls' of github.com:matthiasfabry/mesa into matthiasfabry-abundance_timestep_controls
2 parents 0ec9a4c + f12d592 commit 60bf7dc

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

star/private/timestep.f90

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -514,13 +514,12 @@ integer function check_dX(s, skip_hard_limit, dt, &
514514
dX_div_X_hard_limit = s% dX_div_X_hard_limit*s% time_delta_coeff
515515

516516
do i=1, max_dx_limit_ctrls ! go over all potential species + XYZ
517-
if ( dX_limit_min_X(i) >= 1 .or. & ! as soon as any of these is >= 1
518-
dX_limit(i) >= 1 .or. & ! we'd have a problem elsewhere
519-
dX_hard_limit(i) >= 1 .or. &
520-
dX_div_X_limit_min_X(i) >= 1 .or. &
521-
dX_div_X_limit(i) >= 1 .or. &
522-
dX_div_X_hard_limit(i) >= 1 .or. &
523-
s% dX_limit_species(i) == '') then
517+
if ( dX_limit_min_X(i) >= 1 .and. & ! as soon as all of these are >= 1
518+
dX_limit(i) >= 1 .and. & ! we'd have nothing to do
519+
dX_hard_limit(i) >= 1 .and. &
520+
dX_div_X_limit_min_X(i) >= 1 .and. &
521+
dX_div_X_limit(i) >= 1 .and. &
522+
dX_div_X_hard_limit(i) >= 1) then
524523
cycle ! go to next
525524
end if
526525

@@ -579,7 +578,7 @@ integer function check_dX(s, skip_hard_limit, dt, &
579578

580579
if ((.not. s% dX_decreases_only(j)) .and. delta_X < 0) delta_X = -delta_X
581580

582-
if (X >= dX_limit_min_X(i)) then
581+
if (X >= dX_limit_min_X(i)) then ! any check for dX_limit_* < 1 is useless since X <= 1 anyway
583582
if ((.not. skip_hard_limit) .and. delta_X > dX_hard_limit(i)) then
584583
check_dX = retry
585584
s% why_Tlim = Tlim_dX

0 commit comments

Comments
 (0)