Ensure that when we reset the time step we choose a new time step which no longer violates the cfl relations.

Merged
#380 · Created  · Last updated

Merged pull request

Merged in feature/ensure_new_time_step_always_satisfies_condition (pull request #380)

32fe435·Author: ·Closed by: ·2021-05-07

Description

This can prevent the situation where we reduce the time step and reinitialise only to have to reduce the time step again immediately.

This should hopefully avoid much penalty from setting a time step far away from the cfl limit. Rather than potentially doing N full time step changes where we change the step by delt_adj each time to get the time step below the cfl limit we now just keep changing the target time step until it satisfies the cfl condition and then do a reset. This saves calculating response matrices etc. that we don’t immediately need.

 

This also helps avoid some issues occurring when we need to change time step by more than one delt_adj factor in order to satisfy the cfl limit. Without this change we can find that the timestep may change twice on a single iteration but that the simulation time can change between these changes. See branch bugfix/fix_time_increasing_during_restar for an alternative fix for that issue.

0 attachments

0 comments

Loading commits...