| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=dp), | public | :: | t | = | 0 |
current simulation time |
|
| real(kind=dp), | public | :: | dt |
current time step |
|||
| logical, | public | :: | explicit | = | .true. |
true for explicit, false for implicit scheme |
|
| logical, | public | :: | rejected | = | .false. |
current step is rejected |
|
| logical, | public | :: | rollback | = | .false. |
rollback in progress, skip state advance |
|
| logical, | public | :: | in_recovery | = | .false. |
error recovery explicit steps in progress |
|
| integer, | public | :: | recovery_steps_left | = | 0 |
countdown for recovery explicit steps |
|
| integer, | public | :: | consecutive_rollbacks | = | 0 |
number of consecutive rollbacks without a successful step |
|
| real(kind=dp), | public | :: | dtPrev1 |
previous time step |
|||
| real(kind=dp), | public | :: | dtPrev2 |
time step 2 steps before |
|||
| real(kind=dp), | public | :: | dtPrev3 |
time step 3 steps before |
|||
| real(kind=dp), | public | :: | dtPrev4 |
time step 4 steps before |
|||
| real(kind=dp), | public | :: | dtPrev5 |
time step 5 steps before |
|||
| real(kind=dp), | public | :: | dt_exp |
explicit time step (save for calc) |
|||
| type(signal_t), | public | :: | impl_tol |
from input file implicit tolerance |
|||
| real(kind=dP), | public | :: | expl_tol |
from input file explicit tolerance |
|||
| real(kind=dP), | public | :: | kValue |
from input file step management filter gain |
|||
| real(kind=dP), | public | :: | max_step |
from input file maximum step that solver can take |
|||
| real(kind=dP), | public | :: | t_final |
from input file time to simulate |
|||
| real(kind=dp), | public | :: | c0 |
step controller memory |
|||
| integer, | public | :: | step | = | 0 |
all steps including rejected |
|
| integer, | public | :: | expl_steps | = | 10 |
Minimum number of explicit steps left |
|
| real(kind=dp), | public, | allocatable | :: | events_time(:) |
list of time events forcing step |
||
| logical, | public, | allocatable | :: | events_expl(:) |
list of time events forcing explicit |
||
| real(kind=dp), | public | :: | scheme_diff_fact |
factor to be applied to the acoustic speed estimate |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(simulation_t), | intent(inout) | :: | me | |||
| type(input_t), | intent(in) | :: | input |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(simulation_t), | intent(inout) | :: | me | |||
| real(kind=dp), | intent(in) | :: | wave_time |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(simulation_t), | intent(inout) | :: | me | |||
| real(kind=dp), | intent(in) | :: | err |
type simulation_t ! protected real(dp) :: t = 0 !! current simulation time real(dp) :: dt !! current time step logical :: explicit = .true. !! true for explicit, false for implicit scheme logical :: rejected = .false. !! current step is rejected logical :: rollback = .false. !! rollback in progress, skip state advance logical :: in_recovery = .false. !! error recovery explicit steps in progress integer :: recovery_steps_left = 0 !! countdown for recovery explicit steps integer :: consecutive_rollbacks = 0 !! number of consecutive rollbacks without a successful step real(dp) :: dtPrev1 !! previous time step real(dp) :: dtPrev2 !! time step 2 steps before real(dp) :: dtPrev3 !! time step 3 steps before real(dp) :: dtPrev4 !! time step 4 steps before real(dp) :: dtPrev5 !! time step 5 steps before ! private real(dp) :: dt_exp !! explicit time step (save for calc) type(signal_t) :: impl_tol !! from input file implicit tolerance real(dP) :: expl_tol !! from input file explicit tolerance real(dP) :: kValue !! from input file step management filter gain real(dP) :: max_step !! from input file maximum step that solver can take real(dP) :: t_final !! from input file time to simulate real(dp) :: c0 !! step controller memory integer :: step = 0 !! all steps including rejected integer :: expl_steps = 10 !! Minimum number of explicit steps left real(dp), allocatable :: events_time(:) !! list of time events forcing step logical, allocatable :: events_expl(:) !! list of time events forcing explicit real(dp) :: scheme_diff_fact !! factor to be applied to the acoustic speed estimate contains procedure :: init => sim_init procedure :: update_exp_dt => sim_update_exp_dt procedure :: step_management => sim_step_management end type simulation_t