basic_environment_wrapper Module

Houses wrapper containing non-modeller objects for streamlined initialization and passing



Interfaces

interface

  • private module subroutine initEnvironmentFromJSON(this, textbookObj, normObj)

    Initialize environment using data from config.json and textbook object for initializing external variables. Also initializes the status_printing module. If the textbook is not supplied the envirnment is not considered defined and finishInit must be called before the environment is passed around.

    Arguments

    Type IntentOptional Attributes Name
    class(EnvironmentWrapper), intent(inout) :: this
    type(Textbook), intent(in), optional :: textbookObj

    Textbook object used to retrieve derivation rules for variable container

    class(Normalization), intent(in), optional :: normObj

    Normalization object used to retrieve grid normalization. If not present grid is assumed normalized

interface

  • private module subroutine finishInit(this, textbookObj)

    Finalize the initialization of the environment by setting the textbook object and performing initializations that require it

    Arguments

    Type IntentOptional Attributes Name
    class(EnvironmentWrapper), intent(inout) :: this
    type(Textbook), intent(in) :: textbookObj

    Textbook object used to retrieve derivation rules for variable container

interface


Derived Types

type, public, extends(Object) ::  EnvironmentWrapper

EnvironmentWrapper object storing publicly accessible grid, variable, and controller data

Components

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

True only if user explicitly sets it to true

type(Grid), public :: gridObj
type(Geometry), public :: geometryObj
type(Partition), public :: partitionObj
type(Indexing), public :: indexingObj
type(VSpace), public :: vSpaceObj
type(MPIController), public :: mpiCont
type(JSONController), public, pointer :: jsonCont => null()
type(HDF5Controller), public :: hdf5Cont
type(PETScController), public, allocatable :: petscCont
type(Textbook), public :: textbookObj
type(SpeciesList), public :: speciesListObj
type(SignalCollection), public :: signalCollectionObj
type(VariableContainer), public :: externalVars
type(VariableList), public :: allVars

Finalizations Procedures

final :: finalizeEnv

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: init => initEnvironmentFromJSON
procedure, public :: finishInit