Houses modeller class responsible for controlling data manipulation and integration
Return true if modeller is assembled and ready to evolve variables
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(in) | :: | this |
Call the evaluateTermGroup routine on model with given index and for given term group - optionally use variable container other than the one stored in the modeller
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(in) | :: | this | |||
integer(kind=ik), | intent(in) | :: | modelIndex | |||
integer(kind=ik), | intent(in) | :: | groupIndex | |||
type(VariableContainer), | intent(in), | optional | :: | varCont |
Call the evaluateTermByName routine on model with given index and for given term name - optionally use variable container other than the one stored in the modeller
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(in) | :: | this | |||
integer(kind=ik), | intent(in) | :: | modelIndex | |||
character(len=*), | intent(in) | :: | name | |||
type(VariableContainer), | intent(in), | optional | :: | varCont |
Return true if group with given index is mixed in model with given index
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(in) | :: | this | |||
integer(kind=ik), | intent(in) | :: | groupIndex | |||
integer(kind=ik), | intent(in) | :: | modelIndex |
Return variable name for given group index and model index
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(in) | :: | this | |||
integer(kind=ik), | intent(in) | :: | groupIndex | |||
integer(kind=ik), | intent(in) | :: | modelIndex |
Return current value of the integrator time variable if the integrator object is a composite integrator or the value of the "time" variable if it isn't
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(in) | :: | this |
Return true if input is true on every processor using the MPI controller of the modeller
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
logical, | intent(inout) | :: | input |
Return minimum value of real input computed on all processes using the MPI controller of the modeller
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
real(kind=rk), | intent(inout) | :: | input |
Return maximum value of real input computed on all processes using the MPI controller of the modeller
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
real(kind=rk), | intent(inout) | :: | input |
Modeller initialization routine
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
integer(kind=ik), | intent(in) | :: | numModels |
Number of models this modeller expects to be added |
||
type(VariableContainer), | intent(in) | :: | initVars |
Initial variable container |
||
type(MPIController), | intent(in) | :: | mpiCont |
Main MPIController |
||
type(PETScController), | intent(in), | optional | :: | petscCont |
Optional PETSc controller - should be supplied if any integration/manipulation routine uses PETSc |
|
type(CommunicationData), | intent(in), | optional | :: | commData |
Default MPI communication data |
Copy values of variables from outside variable container into this modeller's container
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
type(VariableContainer), | intent(in) | :: | varCont |
Copy values of variables to outside variable container from this modeller's container
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
type(VariableContainer), | intent(inout) | :: | varCont |
Setter for integrator object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
class(Manipulator), | intent(in) | :: | integ |
Setter for manipulator object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
class(CompositeManipulator), | intent(in) | :: | manip |
Call the update routine of model with given index for the given term group - optionally use variable container other than the one stored in the modeller
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
integer(kind=ik), | intent(in) | :: | modelIndex | |||
integer(kind=ik), | intent(in) | :: | groupIndex | |||
type(VariableContainer), | intent(in), | optional | :: | varCont |
Call the update routine of model with given index for the given term name- optionally use variable container other than the one stored in the modeller
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
integer(kind=ik), | intent(in) | :: | modelIndex | |||
character(len=*), | intent(in) | :: | termName | |||
type(VariableContainer), | intent(in), | optional | :: | varCont |
Calculate matrix value in implicit term group given by groupIndex in model given by modelIndex, and optionally using variable container other than the one stored in the modeller
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
integer(kind=ik), | intent(in) | :: | modelIndex | |||
integer(kind=ik), | intent(in) | :: | groupIndex | |||
type(VariableContainer), | intent(in), | optional | :: | varCont |
Calculate matrix value in implicit term in model given by modelIndex, and optionally using variable container other than the one stored in the modeller
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
integer(kind=ik), | intent(in) | :: | modelIndex | |||
character(len=*), | intent(in) | :: | termName | |||
type(VariableContainer), | intent(in), | optional | :: | varCont |
Send off matrix values of given term group and model to the PETSc controller, multiplied by mult
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
integer(kind=ik), | intent(in) | :: | modelIndex | |||
integer(kind=ik), | intent(in) | :: | groupIndex | |||
real(kind=rk), | intent(in) | :: | mult | |||
integer(kind=ik), | intent(in), | optional | :: | petscGroup |
Assemble all of the matrix terms, preallocate PETScController objects and make sure modeller is ready for use. If withIdentityMat is true preallocates diagonal elements for the identity matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
logical, | intent(in), | optional | :: | withIdentityMat |
Perform communications using the modeller's MPI controller - optionally uses external CommunicationData instructions or exchanges data in external variable container
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
type(CommunicationData), | intent(in), | optional | :: | commData |
Optional non-default communication data |
|
type(VariableContainer), | intent(inout), | optional | :: | varCont |
Optional variable container to perform communications on instead of the modeller's |
|
integer(kind=ik), | intent(in), | optional | :: | onlyDepth |
Only communicate variables at given derivation depth |
Perform communications interlaced with derivation calls of increasing derivation depth
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
type(CommunicationData), | intent(in), | optional | :: | commData |
Optional non-default communication data |
|
type(VariableContainer), | intent(inout), | optional | :: | varCont |
Optional variable container to perform communications on instead of the modeller's |
|
integer(kind=ik), | intent(in), | optional | :: | derivPriority |
Derivation priority for interlaced calls |
Call optional CompositeManipulator manipulate routine with inVars and outVars - the default for the optional VariableContainers is the modeller's VariableContainer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
integer(kind=ik), | intent(in) | :: | priority | |||
type(VariableContainer), | intent(in), | optional | :: | inVars | ||
type(VariableContainer), | intent(inout), | optional | :: | outVars |
Call manipulator affect routine with inVars and outVars - the default for the optional VariableContainers is the modeller's VariableContainer Optionally request a timestep length (only available with composite integrators)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
type(VariableContainer), | intent(in), | optional | :: | inVars | ||
type(VariableContainer), | intent(inout), | optional | :: | outVars | ||
real(kind=rk), | intent(in), | optional | :: | requestedTimestep |
Call linearSolve routine on PETScController of this modeller. Creates PETSc objects if they've not yet been created. If addIdentityMat is true adds an identity matrix to the PETSc matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
real(kind=rk), | intent(in), | dimension(:) | :: | knownVec | ||
real(kind=rk), | intent(out), | dimension(:) | :: | unknownVec | ||
logical, | intent(in) | :: | addIdentityMat | |||
integer(kind=ik), | intent(inout) | :: | convReason | |||
integer(kind=ik), | intent(in), | optional | :: | petscGroup |
Update modelbound data of model with given index if that data is allocated
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
integer(kind=ik), | intent(in) | :: | modelIndex |
Model index for model whose data is to be update |
||
type(VariableContainer), | intent(in) | :: | varCont |
Variable container to be used in update |
||
integer(kind=ik), | intent(in), | optional | :: | updatePriority |
Priority for this update call |
Update the modelbound data of all models
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(inout) | :: | this | |||
type(VariableContainer), | intent(in), | optional | :: | varCont |
Variable container to be used in update |
Copy modelbound variable data with given name from model with given index.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Modeller), | intent(in) | :: | this | |||
integer(kind=ik), | intent(in) | :: | modelIndex | |||
character(len=*), | intent(in) | :: | varName |
Name of data |
||
real(kind=rk), | intent(inout), | allocatable, dimension(..) | :: | container |
Container to copy into |
Container for Model objects allowing heterogeneous arrays
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
class(Model), | public, | allocatable | :: | entry |
Central object responsible for storing variables and models, as well as doing integration and data manipulation
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | userDefined | = | .false. |
True only if user explicitly sets it to true |
|
type(VariableContainer), | private | :: | vars |
Main variable container |
|||
type(ModelContainer), | private, | allocatable, dimension(:) | :: | models |
Array holding all models this modeller has access to |
||
type(PETScController), | private, | allocatable | :: | petscCont |
PETScController object used for solving linear systems |
||
type(MPIController), | private | :: | MPICont |
MPIController used for all communication |
|||
type(CommunicationData), | private, | allocatable | :: | commData |
Default communication data containing MPI communication instruction |
||
type(SparseRowData), | private, | allocatable | :: | identityMat |
Sparse identity matrix used for PETSc calls |
||
class(Manipulator), | private, | allocatable | :: | integ |
Main integrator object |
||
class(CompositeManipulator), | private, | allocatable | :: | manip |
Secondary manipulator object for optional data manipulation |
||
integer(kind=ik), | private | :: | numModelsAdded |
Tracked of number of models allocated |
|||
logical(kind=ik), | private | :: | assembled |
True if modeller has been assembled and is ready for use |
procedure, public :: isDefined => isDefinedObject | |
procedure, public :: makeDefined => makeDefinedObject | |
procedure, public :: makeUndefined => makeUndefinedObject | |
procedure, public :: isAssembled | |
procedure, public :: addModel | |
procedure, public :: copyVarValuesTo | |
procedure, public :: copyVarValuesFrom | |
procedure, public :: callManipulator | |
procedure, public :: integrate | |
procedure, public :: setIntegrator | |
procedure, public :: setManipulator | |
procedure, public :: calculateIdentityMat | |
procedure, public :: updateModelTermGroup | |
procedure, public :: updateModelTermByName | |
procedure, public :: updateModelData | |
procedure, public :: updateAllModelData | |
procedure, public :: calculateMatGroupValsInModel | |
procedure, public :: calculateMatValsByTermName | |
procedure, public :: addModelMatGroupToPETSc | |
procedure, public :: linearSolvePETSc | |
procedure, public :: evaluateModelTermGroup | |
procedure, public :: evaluateModelTermByName | |
procedure, public :: copyDataFromModel | |
procedure, public :: getEvolvedVarInTermGroup | |
procedure, public :: isModelTermGroupMixed | |
procedure, public :: getCurrentTime | |
procedure, public :: performComm | |
procedure, public :: safeCommAndDeriv | |
procedure, public :: isTrueEverywhere | |
procedure, public :: assemble | |
procedure, public :: init => initModeller |