CompositeIntegrator Derived Type

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

  • interface

    private pure module function isDefinedObject(this) result(defined)

    Getter for userDefined

    Arguments

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

    Return Value logical

procedure, public :: makeDefined => makeDefinedObject

  • interface

    private pure module subroutine makeDefinedObject(this)

    Set userDefined to .true.

    Arguments

    Type IntentOptional Attributes Name
    class(Object), intent(inout) :: this

procedure, public :: makeUndefined => makeUndefinedObject

  • interface

    private pure module subroutine makeUndefinedObject(this)

    Set userDefined to .false.

    Arguments

    Type IntentOptional Attributes Name
    class(Object), intent(inout) :: this

procedure, public :: affect => integrateAll

  • 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

procedure, public :: getCurrentTime

  • 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)

procedure, public :: addIntegrator

  • 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

procedure, public :: addIntegrationStage

  • 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

procedure, public :: setTimestepController

procedure, public :: init => initCompositeIntegrator

  • 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