PicardBDEIntegrator Derived Type

type, public, extends(Integrator) :: PicardBDEIntegrator

Implicit Backwards Euler integrator with Picard iterations for handling non-linearities


Components

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

True only if user explicitly sets it to true

logical, public :: communicationNeeded

True if this Integrator requires MPI communication during evolution

type(CommunicationData), public :: commData

Communication data object for this Integrator

logical, public :: nonTrivialUpdate

True if this integrator should perform non-trivial updates of terms

logical, public :: nonTrivialModelDataUpdate

True if this integrator should perform non-trivial updates of model data

real(kind=rk), private, allocatable, dimension(:) :: implicitVectorOld

Buffer for implicit vector from previous Picard iteration

real(kind=rk), private, allocatable, dimension(:) :: implicitVectorNew

Buffer for implicit vector from current Picard iteration

integer(kind=ik), private, allocatable, dimension(:) :: convergenceTestVars

Variable indices in VariableContainer used to determine convergence of Picard iterations

real(kind=rk), private :: nonlinTol

Picard iteration relative convergence tolerance

real(kind=rk), private :: absTol

Picard iteration absolute convergence tolerance in epsilon units

integer(kind=ik), private :: maxIterations

Maximum allowed number of Picard iterations

type(VariableContainer), private, allocatable :: buffer

VariableContainer buffer for passing to Modeller routines

integer(kind=ik), private :: timesCalled

Tracker for number of times called

integer(kind=ik), private :: totNumIters

Tracker for total number of iterations

logical, private :: use2Norm

True if the norm to be used is the 2norm instead of local inf-norm

integer(kind=ik), private :: associatedPETScObjGroup

PETSc obj group this solver should interact with (defaults to 1)

logical, private :: internalStepControl

True if using internal step control - will attempt restarts on failed solves and will ignore timestep controller

type(InternalControllerOptions), private :: internalControlOpts
character(len=:), private, allocatable :: integratorName

Integrator named used in printing

real(kind=rk), private :: relaxationWeight

<1 for under-relaxation >1 for over-relaxation


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 :: setTimestep

  • interface

    private pure module subroutine setTimestep(this, timestep)

    Setter for dt

    Arguments

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

procedure, public :: getTimestep

  • interface

    private pure module function getTimestep(this) result(timestep)

    Getter for dt

    Arguments

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

    Return Value real(kind=rk)

procedure, public :: setTermGroups

  • interface

    private pure module subroutine setTermGroups(this, groups)

    Setter for termGroups

    Arguments

    Type IntentOptional Attributes Name
    class(Integrator), intent(inout) :: this
    type(IntArray), intent(in), dimension(:) :: groups

procedure, public :: getTermGroups

  • interface

    private pure module function getTermGroups(this) result(groups)

    Getter for termGroups

    Arguments

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

    Return Value type(IntArray), allocatable, dimension(:)

procedure, public :: setModelIndices

  • interface

    private pure module subroutine setModelIndices(this, indices)

    Setter for modelIndices

    Arguments

    Type IntentOptional Attributes Name
    class(Integrator), intent(inout) :: this
    integer(kind=ik), intent(in), dimension(:) :: indices

procedure, public :: getModelIndices

  • interface

    private pure module function getModelIndices(this) result(indices)

    Getter for modelIndices

    Arguments

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

    Return Value integer(kind=ik), allocatable, dimension(:)

procedure, public :: setTimeEvolving

  • interface

    private pure module subroutine setTimeEvolving(this, evo)

    Setter for evolvesTimeVar

    Arguments

    Type IntentOptional Attributes Name
    class(Integrator), intent(inout) :: this
    logical, intent(in) :: evo

procedure, public :: isTimeEvolving

  • interface

    private pure module function isTimeEvolving(this) result(evo)

    Check if this Integrator is allowed to evolve a time variable if present

    Arguments

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

    Return Value logical

procedure, public :: setTimestepController

  • interface

    private pure module subroutine setTimestepController(this, controller)

    Setter for dtController

    Arguments

    Type IntentOptional Attributes Name
    class(Integrator), intent(inout) :: this
    class(TimestepController), intent(in) :: controller

procedure, public :: hasTimestepController

  • interface

    private pure module function hasTimestepController(this) result(hasController)

    Check if this Integrator has an allocated timestep controller

    Arguments

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

    Return Value logical

procedure, public :: getTimestepFromController

  • interface

    private module function getTimestepFromController(this, inputVars) result(timestep)

    Get the individual timestep size if Integrator has a timestep controller

    Arguments

    Type IntentOptional Attributes Name
    class(Integrator), intent(inout) :: this
    class(VariableContainer), intent(in) :: inputVars

    Return Value real(kind=rk)

procedure, public :: isCommunicationNeeded

  • interface

    private pure module function isCommunicationNeeded(this) result(commNeeded)

    Check whether this Integrator requires MPI communication

    Arguments

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

    Return Value logical

procedure, public :: setCommunicationNeeded

  • interface

    private pure module subroutine setCommunicationNeeded(this, commNeeded)

    Setter for communicationNeeded

    Arguments

    Type IntentOptional Attributes Name
    class(Integrator), intent(inout) :: this
    logical, intent(in) :: commNeeded

procedure, public :: getCommunicationData

  • interface

    private pure module function getCommunicationData(this) result(commData)

    Getter for commData

    Arguments

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

    Return Value type(CommunicationData), allocatable

procedure, public :: setCommunicationData

  • interface

    private pure module subroutine setCommunicationData(this, commData)

    Setter for commData

    Arguments

    Type IntentOptional Attributes Name
    class(Integrator), intent(inout) :: this
    type(CommunicationData), intent(in) :: commData

procedure, public :: getUpdateRules

  • interface

    private pure module function getUpdateRules(this) result(updateRules)

    Getter for updateOnInternalIteration

    Arguments

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

    Return Value type(LogicalArray), dimension(:), allocatable

procedure, public :: setUpdateRules

  • interface

    private pure module subroutine setUpdateRules(this, updateRules)

    Setter for updateOnInternalIteration

    Arguments

    Type IntentOptional Attributes Name
    class(Integrator), intent(inout) :: this
    type(LogicalArray), intent(in), dimension(:) :: updateRules

procedure, public :: getModelDataUpdateRules

  • interface

    private pure module function getModelDataUpdateRules(this) result(updateRules)

    Getter for updateModelDataOnInternalIteration

    Arguments

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

    Return Value logical, dimension(:), allocatable

procedure, public :: setModelDataUpdateRules

  • interface

    private pure module subroutine setModelDataUpdateRules(this, updateRules)

    Setter for updateModelDataOnInternalIteration

    Arguments

    Type IntentOptional Attributes Name
    class(Integrator), intent(inout) :: this
    logical, intent(in), dimension(:) :: updateRules

procedure, public :: hasNonTrivialUpdate

  • interface

    private pure module function hasNonTrivialUpdate(this) result(nonTrivialUpdate)

    Getter for nonTrivialUpdate

    Arguments

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

    Return Value logical

procedure, public :: setNonTrivialUpdate

  • interface

    private pure module subroutine setNonTrivialUpdate(this, nonTrivialUpdate)

    Setter for nonTrivialUpdate

    Arguments

    Type IntentOptional Attributes Name
    class(Integrator), intent(inout) :: this
    logical, intent(in) :: nonTrivialUpdate

procedure, public :: hasNonTrivialModelDataUpdate

  • interface

    private pure module function hasNonTrivialModelDataUpdate(this) result(nonTrivialUpdate)

    Getter for nonTrivialModelDataUpdate

    Arguments

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

    Return Value logical

procedure, public :: setNonTrivialModelDataUpdate

  • interface

    private pure module subroutine setNonTrivialModelDataUpdate(this, nonTrivialUpdate)

    Setter for nonTrivialModelDataUpdate

    Arguments

    Type IntentOptional Attributes Name
    class(Integrator), intent(inout) :: this
    logical, intent(in) :: nonTrivialUpdate

procedure, public :: affect => integrateBDE

  • interface

    private module subroutine integrateBDE(this, manipulatedModeller, outputVars, inputVars)

    Integration routine for BDE integrator - implementation of abstract manipulate routine

    Arguments

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

    Modeller to be used in callbacks during integration

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

    VariableContainer object to store the integration output

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

    VariableContainer object housing input data for the integration routine

procedure, public :: init => initBDEIntegrator

  • interface

    private module subroutine initBDEIntegrator(this, indexingObj, procRank, nonlinTol, absTol, maxIters, convergenceIndices, modelList, termGroups, evolvesTimeVar, dtController, initialTimestep, use2Norm, petscGroup, intContOptions, integratorName, relaxationWeight)

    BDE integrator constructor

    Arguments

    Type IntentOptional Attributes Name
    class(PicardBDEIntegrator), intent(inout) :: this
    type(Indexing), intent(in) :: indexingObj

    Indexing object to be used in initializing the implicit vectors

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

    Rank of current processors

    real(kind=rk), intent(in), optional :: nonlinTol

    Picard iteration relative tolerance

    real(kind=rk), intent(in), optional :: absTol

    Picard iteration absolute tolerance in epsilon units

    integer(kind=ik), intent(in), optional :: maxIters

    Maximum number of Picard iterations

    integer(kind=ik), intent(in), optional, dimension(:) :: convergenceIndices

    Variable indices in VariableContainer used to determine convergence of Picard iterations

    integer(kind=ik), intent(in), optional, dimension(:) :: modelList

    List of models this integrator is responsible for

    type(IntArray), intent(in), optional, dimension(:) :: termGroups

    Term groups this integrator is responsible for - should conform with modelList

    logical, intent(in), optional :: evolvesTimeVar

    Set to true if this integrator is allowed to change the "time" varible (if present in passed variable container)

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

    User-supplied timestep controller object

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

    Default timestep

    logical, intent(in), optional :: use2Norm

    Set to true if this integrator uses the 2-norm instead of the local inf-norm for checking individual variable convergence

    integer(kind=ik), intent(in), optional :: petscGroup

    PETSc obj group this solver should interact with (defaults to 1)

    type(InternalControllerOptions), intent(in), optional :: intContOptions

    InternalControlOptions (if present turns on internal control)

    character(len=*), intent(in), optional :: integratorName

    Name of integrator used in printing

    real(kind=rk), intent(in), optional :: relaxationWeight

    relaxationWeight

procedure, public :: setNonlinTol

  • interface

    private pure module subroutine setNonlinTol(this, nonlinTol)

    Setter for nonlinTol value

    Arguments

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

    Picard iteration tolerance

procedure, public :: getNonlinTol

  • interface

    private pure module function getNonlinTol(this) result(nonlinTol)

    Getter for nonlinTol value

    Arguments

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

    Return Value real(kind=rk)

procedure, public :: setMaxIterations

  • interface

    private pure module subroutine setMaxIterations(this, maxIter)

    Setter for maxIterations value

    Arguments

    Type IntentOptional Attributes Name
    class(PicardBDEIntegrator), intent(inout) :: this
    integer(kind=ik), intent(in) :: maxIter

    Maximum number of Picard iterations

procedure, public :: getMaxIterations

  • interface

    private pure module function getMaxIterations(this) result(maxIter)

    Geter for maxIterations value

    Arguments

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

    Return Value integer(kind=ik)

procedure, public :: setConvergenceIndices

  • interface

    private pure module subroutine setConvergenceIndices(this, convVars)

    Setter for convergenceTestVars array

    Arguments

    Type IntentOptional Attributes Name
    class(PicardBDEIntegrator), intent(inout) :: this
    integer(kind=ik), intent(in), dimension(:) :: convVars

procedure, public :: getConvergenceIndices

  • interface

    private pure module function getConvergenceIndices(this) result(convVars)

    Getter for convergenceTestVars array

    Arguments

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

    Return Value integer(kind=ik), dimension(:), allocatable