ModelBuilder Derived Type

type, public, abstract, extends(Object) :: ModelBuilder

Abstract ModelBuilder object, housing basic functionality for the construction of Model objects and passing those objects to their final Modeller destination


Components

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

True only if user explicitly sets it to true

type(NamedScalarContainer), private :: scalarParams

Named scalar parameters for reading/writing JSON config files and use in Model construction

type(NamedArrayContainer), private :: arrayParams

Named array parameters for reading/writing JSON config files and use in Model construction

integer(kind=ik), private :: numImplicitGroups

Number of implicit Term groups contained in the Model to be built

integer(kind=ik), private :: numGeneralGroups

Number of general Term groups contained in th Model to be built


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

  • interface

    private module subroutine loadParams(this, jsonCont, mpiCont)

    Load parameters from "./config.json"

    Arguments

    Type IntentOptional Attributes Name
    class(ModelBuilder), intent(inout) :: this
    type(JSONController), intent(inout) :: jsonCont

    JSONController object responsible for reading the config file

    type(MPIController), intent(inout) :: mpiCont

    MPIController object to be used with JSON IO

procedure, public :: outputUsedParams

  • interface

    private module subroutine outputUsedParams(this, jsonCont, mpiCont)

    Output used parameters to "./used_config.json"

    Arguments

    Type IntentOptional Attributes Name
    class(ModelBuilder), intent(inout) :: this
    type(JSONController), intent(inout) :: jsonCont

    JSONController object responsible for writing the config file

    type(MPIController), intent(inout) :: mpiCont

    MPIController object to be used with JSON IO

procedure, public :: getScalarParams

  • interface

    private pure module function getScalarParams(this) result(params)

    Getter for ModelBuilder scalarParams

    Arguments

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

    Return Value type(NamedScalarContainer)

procedure, public :: getArrayParams

  • interface

    private pure module function getArrayParams(this) result(params)

    Getter for ModelBuilder arrayParams

    Arguments

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

    Return Value type(NamedArrayContainer)

procedure, public :: setScalarParams

  • interface

    private pure module subroutine setScalarParams(this, params)

    Setter for ModelBuilder scalarParams

    Arguments

    Type IntentOptional Attributes Name
    class(ModelBuilder), intent(inout) :: this
    type(NamedScalarContainer), intent(in) :: params

procedure, public :: setArrayParams

  • interface

    private pure module subroutine setArrayParams(this, params)

    Setter for ModelBuilder scalarParams

    Arguments

    Type IntentOptional Attributes Name
    class(ModelBuilder), intent(inout) :: this
    type(NamedArrayContainer), intent(in) :: params

procedure(addModel), public, deferred :: addModelToModeller

  • subroutine addModel(this, modellerObj) Prototype

    Abstract routine for adding Models to a Modeller object after building them

    Arguments

    Type IntentOptional Attributes Name
    class(ModelBuilder), intent(inout) :: this
    class(Modeller), intent(inout) :: modellerObj

    Modeller object that will house the constructed Model after it is built by the builder