Skip to content

Commit

Permalink
Enforce maximum_dt in electron_backward_euler_pseudotimestepping!()
Browse files Browse the repository at this point in the history
  • Loading branch information
johnomotani committed Dec 9, 2024
1 parent b34caea commit fe2dbd4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions moment_kinetics/src/electron_kinetic_equation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,8 @@ function electron_backward_euler_pseudotimestepping!(scratch, pdf, moments, phi,
else
t_params.dt[] = min(t_params.dt[] * t_params.max_increase_factor, t_params.cap_factor_ion_dt * ion_dt)
end
# Ensure dt does not exceed maximum_dt
t_params.dt[] = min(t_params.dt[], t_params.maximum_dt)
end

first_step = false
Expand Down

0 comments on commit fe2dbd4

Please sign in to comment.