Step management and interpolation in time
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(hdf5_t), | public | :: | h5 | ||||
| integer, | public | :: | sim_error | = | 0 | ||
| integer, | public, | parameter | :: | MAX_SIM_ERRORS | = | 10 | |
| character(len=512), | public | :: | sim_error_msg(MAX_SIM_ERRORS) | ||||
| type(h5_export_c_t), | private, | save, target | :: | H | |||
| type(tbl_dsc_c_t), | private, | allocatable, target, save | :: | Tbls_c(:) | |||
| type(comp_desc_c_t), | private, | allocatable, target, save | :: | Comps_c(:) | |||
| character(kind=c_char, len=1), | private, | allocatable, target, save | :: | vars_buf(:) | |||
| integer(kind=c_int), | private, | allocatable, save | :: | vars_offset(:) | |||
| integer(kind=c_int), | private, | allocatable, save | :: | n_vars_tbl(:) | |||
| integer(kind=c_int), | private, | allocatable, save | :: | var_len_tbl(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_funptr), | value | :: | fct_ptr_to_ext | |||
| integer(kind=c_int), | value | :: | cfg_len | |||
| character(len=*) | :: | cfg_str | ||||
| type(c_ptr) | :: | c_pt | ||||
| type(c_funptr) | :: | sign_ptr | ||||
| integer(kind=c_int), | value | :: | n |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | c_pt | |||
| real(kind=c_double), | value | :: | time | |||
| real(kind=c_double) | :: | signal(*) |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=dp), | public, | allocatable | :: | time(:) |
time events (points of interpolation) |
||
| real(kind=dp), | public, | allocatable | :: | offset(:,:) |
offset values (points of interpolation) |
||
| real(kind=dp), | public, | allocatable | :: | gain(:,:) |
gain values for 0th order simply 1 |
||
| real(kind=dp), | public, | allocatable | :: | x(:) |
spatial coordinates |
||
| integer, | public | :: | i | = | 1 |
last index (starting point for iteration) |
|
| type(simulation_t), | public, | pointer | :: | sim | |||
| type(c_funptr), | public | :: | init_signal_ext_ptr | = | C_NULL_FUNPTR | ||
| character(len=:), | public, | allocatable | :: | cfg_str | |||
| type(c_funptr), | public | :: | sign_ptr | = | C_NULL_FUNPTR | ||
| type(c_ptr), | public | :: | val_cfg | = | C_NULL_PTR | ||
| procedure(itf_signal), | public, | pointer, nopass | :: | val_fpt | => | null() | |
| procedure(init_signal_ext_if), | public, | pointer, nopass | :: | init_signal_ext | => | null() |
| procedure, public :: init => signal_init | |
| procedure, public :: v1d => signal_v1d | |
| procedure, public :: v0d => signal_v0d |
| 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 |
| procedure, public :: init => sim_init | |
| procedure, public :: update_exp_dt => sim_update_exp_dt | |
| procedure, public :: step_management => sim_step_management |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(c_ptr), | public | :: | name_ptr | ||||
| integer(kind=c_int), | public | :: | name_len | ||||
| type(c_ptr), | public | :: | node_x_ptr | ||||
| integer(kind=c_int), | public | :: | n_node | ||||
| type(c_ptr), | public | :: | data_ptr | ||||
| integer(kind=c_int), | public | :: | n1 | ||||
| integer(kind=c_int), | public | :: | n2 |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(c_ptr), | public | :: | name_ptr | ||||
| integer(kind=c_int), | public | :: | name_len | ||||
| type(c_ptr), | public | :: | vars_ptr | ||||
| integer(kind=c_int), | public | :: | n_vars | ||||
| integer(kind=c_int), | public | :: | var_len | ||||
| type(c_ptr), | public | :: | comps_ptr | ||||
| integer(kind=c_int), | public | :: | n_comps |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=c_int), | public | :: | nb_tables | ||||
| type(c_ptr), | public | :: | tables_ptr |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | val |
Filter/controller with limiter used by step management
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in) | :: | simple |
True: Elementary filter, False: PI42 controller |
||
| real(kind=dp), | intent(in) | :: | c1l | |||
| real(kind=dp), | intent(in) | :: | c0l | |||
| real(kind=dp), | intent(in) | :: | kl |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(signal_t), | intent(inout) | :: | me |
interpolated value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(signal_t), | intent(inout) | :: | me |
interpolated value
| 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 | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | msg |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(simulation_t), | intent(in) | :: | me |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | txt | |||
| character(kind=c_char, len=1), | intent(inout), | target | :: | buf(:) | ||
| integer, | intent(inout) | :: | pos | |||
| type(c_ptr), | intent(out) | :: | ptr | |||
| integer(kind=c_int), | intent(out) | :: | len_out |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr) | :: | h5_ptr |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(signal_t), | intent(inout) | :: | me | |||
| type(simulation_t), | intent(inout), | target | :: | sim | ||
| type(input_t), | intent(in) | :: | input_cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| real(kind=dp), | intent(in), | optional | :: | x(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | x(:) | |||
| real(kind=dp), | intent(in) | :: | y(:) | |||
| real(kind=dp), | intent(in) | :: | x_out | |||
| real(kind=dp), | intent(out) | :: | y_out |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | x(:) | |||
| real(kind=dp), | intent(in) | :: | y(:) | |||
| real(kind=dp), | intent(in) | :: | x_out(:) | |||
| real(kind=dp), | intent(out) | :: | y_out(:) |
Merging sorted events of simulation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | allocatable | :: | time_inout(:) | ||
| logical, | intent(inout), | allocatable | :: | expl_inout(:) | ||
| real(kind=dp), | intent(in) | :: | time(:) |
sorted, without duplicates input arrays ending with huge |
||
| logical, | intent(in) | :: | explicit |