basic_timeloop_class Module

Houses basic timeloop class responsible for the main computation-output loop in simulations


Used by


Interfaces

interface

  • private module subroutine initStandardTimeloop(this, envObj, normObj)

    Initialize timeloop parameters using config file and time normalization from normObj

    Arguments

    Type IntentOptional Attributes Name
    class(Timeloop), intent(inout) :: this
    class(EnvironmentWrapper), intent(inout) :: envObj
    class(Normalization), intent(in) :: normObj

interface

  • private module subroutine loop(this, envObj, modellerObj)

    Perform loop based on timeloop parameters and using passed modeller and environment

    Arguments

    Type IntentOptional Attributes Name
    class(Timeloop), intent(inout) :: this
    class(EnvironmentWrapper), intent(inout) :: envObj
    type(Modeller), intent(inout) :: modellerObj

Derived Types

type, public, extends(Object) ::  Timeloop

Object responsible for the main integration loop

Components

Type Visibility Attributes Name Initial
logical, public :: userDefined = .false.

True only if user explicitly sets it to true

integer(kind=ik), private :: modeTimeloop

Loop mode: 0 - fixed step number, 1 - target elapsed time (default 0)

integer(kind=ik), private :: numTimesteps

Fixed step number for loop mode 0

real(kind=rk), private :: targetTime

Target time value for loop mode 1

integer(kind=ik), private :: modeSave

Save mode: 0 - fixed save frequency, 1 - save with minimum time interval

integer(kind=ik), private :: saveSteps

Fixed step number for save mode 0

real(kind=rk), private :: minSaveInterval

Minimum time interval between saves for save mode 1

logical, private :: loadRestart

True if restart files should be loaded at the start of the loop

logical, private :: loadSerial

True if initial values are loaded from a serial file

logical, private :: saveRestart

True if restart files should be saved

logical, private :: resetTimeRestart

True if on loaded restart the time variable (if present) should be reset to 0

integer(kind=ik), private :: restartFrequency

Number of steps between restart saves

character(len=:), private, allocatable :: loadFilename

Serial load filename - default "ReMKiT1DVarInput"

type(VariableContainer), private, allocatable :: bufferVars
type(HDF5Controller), private, allocatable :: inputHDF5Controller

Controller used to input variables

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: init => initStandardTimeloop
procedure, public :: loop