composite_integrator_class Module

Houses container/controller for multiple integration routines


Used by


Interfaces

interface

  • private pure module function getCurrentTime(this) result(time)

    Getter for currentTime

    Arguments

    Type IntentOptional Attributes Name
    class(CompositeIntegrator), intent(in) :: this

    Return Value real(kind=rk)

interface

  • private pure module subroutine initCompositeIntegrator(this, initialTime, initialTimestep, numIntegrators, dtController)

    Composite integraotr initialization routine

    Arguments

    Type IntentOptional Attributes Name
    class(CompositeIntegrator), intent(inout) :: this
    real(kind=rk), intent(in) :: initialTime

    Time value before first step

    real(kind=rk), intent(in) :: initialTimestep

    Default timestep

    integer(kind=ik), intent(in) :: numIntegrators

    Number of integrators expected

    class(TimestepController), intent(in), optional :: dtController

    Optional timestep controller

interface

  • private pure module subroutine addIntegrator(this, integ)

    Add Integrator object to composite integrator

    Arguments

    Type IntentOptional Attributes Name
    class(CompositeIntegrator), intent(inout) :: this
    class(Integrator), intent(in) :: integ

interface

  • private pure module subroutine addIntegrationStage(this, integStage)

    Add integration stage to composite integrator

    Arguments

    Type IntentOptional Attributes Name
    class(CompositeIntegrator), intent(inout) :: this
    type(IntegratorCallStep), intent(in) :: integStage

interface

interface

  • private module subroutine integrateAll(this, manipulatedModeller, outputVars, inputVars)

    Call all integrators based on the integration stages and global timestep. The global timestep is updated at the start if there is an allocated timestep controller.

    Arguments

    Type IntentOptional Attributes Name
    class(CompositeIntegrator), intent(inout) :: this
    class(ModellerSurrogate), intent(inout) :: manipulatedModeller

    Modeller object used in callback

    class(VariableContainer), intent(inout) :: outputVars

    Container for integration output

    class(VariableContainer), intent(in) :: inputVars

    Integration input variables


Derived Types

type, public ::  IntegratorContainer

Container allowing for heterogeneous Integrator arrays

Components

Type Visibility Attributes Name Initial
class(Integrator), public, allocatable :: entry

type, public ::  IntegratorCallStep

Object containing data pertaining to single integration step

Components

Type Visibility Attributes Name Initial
integer(kind=ik), public :: integratorIndex

Index of integrator active during this step

type(IntArray), public, allocatable, dimension(:) :: groupIndices

Term groups evolved during step

integer(kind=ik), public, allocatable, dimension(:) :: modelIndices

Model indices of evolved groups

real(kind=rk), public :: globalStepFraction

Fraction of global timestep allocated to this integration stage

logical, public :: allowTimeEvolution = .false.

Set to true to allow this step to change "time" variable if it is present

logical, public :: useInitialInput = .false.

Set to true to make this timestep use data from the start of the composite integration

logical, public :: communicationNeeded = .false.

Set to true to make integrator perform communication

logical, public :: nonTrivialUpdate = .false.

Set to true to update terms during internal integrator iterations

logical, public :: nonTrivialModelDataUpdate = .false.

Set to true to update model data during internal integrator iterations

type(CommunicationData), public :: commData

Data used for communication if applicable

type(LogicalArray), public, allocatable, dimension(:) :: updatesOnInternalIterations

True for those terms to be updated during internal integrator iterations

logical, public, allocatable, dimension(:) :: updatesOnInternalIterationsModelData

True for those models whose data should be updated during internal integrator iterations

type, public, extends(Manipulator) ::  CompositeIntegrator

Composite integrator object allowing for different integration stages

Components

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

True only if user explicitly sets it to true

type(IntegratorContainer), private, allocatable, dimension(:) :: integrators

Integrators contained in this composite integrator

integer(kind=ik), private :: numIntegratorsAdded

Counter keeping track of how many integrators have been added

real(kind=rk), private :: currentTime

Current time value (should agree with "time" variable if present)

real(kind=rk), private :: globalTimestep

Global timestep value

real(kind=rk), private :: initialTimestep

Initial timestep value

type(VariableContainer), private, allocatable :: stepBuffer

Variable container buffer used between steps

type(IntegratorCallStep), private, allocatable, dimension(:) :: integrationStage

Integration stages

logical, private :: allIntegratorsAdded

True when all integrators have been allocated

class(TimestepController), private, allocatable :: dtController

Optional timestep controller object at composite integrator level

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: affect => integrateAll
procedure, public :: getCurrentTime
procedure, public :: addIntegrator
procedure, public :: addIntegrationStage
procedure, public :: setTimestepController
procedure, public :: init => initCompositeIntegrator