simulation_t Derived Type

type, public :: simulation_t


Inherits

type~~simulation_t~~InheritsGraph type~simulation_t simulation_t type~signal_t signal_t type~simulation_t->type~signal_t impl_tol type~signal_t->type~simulation_t sim c_funptr c_funptr type~signal_t->c_funptr init_signal_ext_ptr, sign_ptr c_ptr c_ptr type~signal_t->c_ptr val_cfg

Inherited by

type~~simulation_t~~InheritedByGraph type~simulation_t simulation_t type~signal_t signal_t type~simulation_t->type~signal_t impl_tol type~signal_t->type~simulation_t sim type~boundary_t boundary_t type~boundary_t->type~signal_t imposed_PorM, imposed_T type~he_prop_t He_prop_t type~he_prop_t->type~signal_t Temp_or_Q_Wall type~lab_prop_t lab_prop_t type~lab_prop_t->type~signal_t value type~scenario_t scenario_t type~scenario_t->type~signal_t Q_ext_load, Bfield_load, dBfield_load, ElCur_load type~solid_t solid_t type~solid_t->type~signal_t Q_ext_load type~channel_t channel_t type~channel_t->type~he_prop_t HeProp type~label_t label_t type~label_t->type~lab_prop_t regionArr, edgeArr type~strand_t strand_t type~strand_t->type~scenario_t scen type~mesh2d_t mesh2D_t type~mesh2d_t->type~label_t label

Components

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-Bound Procedures

procedure, public :: init => sim_init

  • private subroutine sim_init(me, input)

    Arguments

    Type IntentOptional Attributes Name
    class(simulation_t), intent(inout) :: me
    type(input_t), intent(in) :: input

procedure, public :: update_exp_dt => sim_update_exp_dt

  • private subroutine sim_update_exp_dt(me, wave_time)

    Arguments

    Type IntentOptional Attributes Name
    class(simulation_t), intent(inout) :: me
    real(kind=dp), intent(in) :: wave_time

procedure, public :: step_management => sim_step_management

  • private subroutine sim_step_management(me, err)

    Arguments

    Type IntentOptional Attributes Name
    class(simulation_t), intent(inout) :: me
    real(kind=dp), intent(in) :: err

Source Code

    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