custom_model_builder_class Module

Houses model builder for user-defined models


Used by


Interfaces

interface

  • private module subroutine initCustomBuilder(this, env, normObject, modelTag)

    Constructs the model for this builder and sets it into defined state

    Arguments

    Type IntentOptional Attributes Name
    class(CustomModelBuilder), intent(inout) :: this
    class(EnvironmentWrapper), intent(inout) :: env
    class(Normalization), intent(in) :: normObject

    Reference normalization object

    character(len=*), intent(in) :: modelTag

    Tag of this model

interface

  • private module subroutine addCustomModel(this, modellerObj)

    Adds the model built by the builder and resets the builder to become undefined for further use

    Arguments

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

interface

  • private module subroutine addTermToModel(this, termJSONPrefix, termTag, env, normObject, mbData)

    Adds individual term to model buffer based on JSON file data

    Arguments

    Type IntentOptional Attributes Name
    class(CustomModelBuilder), intent(inout) :: this
    character(len=*), intent(in) :: termJSONPrefix
    character(len=*), intent(in) :: termTag
    class(EnvironmentWrapper), intent(inout) :: env
    class(Normalization), intent(in) :: normObject
    class(ModelboundData), intent(in), optional :: mbData

interface

  • private module subroutine applyTermGenerator(this, env, normObject, modelTag, currentNumTerms, mbData)

    Checks for associated term generator in JSON file and applies to custom model

    Arguments

    Type IntentOptional Attributes Name
    class(CustomModelBuilder), intent(inout) :: this
    class(EnvironmentWrapper), intent(inout) :: env
    class(Normalization), intent(in) :: normObject

    Reference normalization object

    character(len=*), intent(in) :: modelTag

    Tag of this model

    integer(kind=ik), intent(in) :: currentNumTerms
    class(ModelboundData), intent(in), optional :: mbData

Derived Types

type, public, extends(ModelBuilder) ::  CustomModelBuilder

Builder for custom models with user defined terms and modelbound data

Components

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

True only if user explicitly sets it to true

class(Model), private, allocatable :: modelBuffer

Model buffer filled during initialization

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: loadParams
procedure, public :: outputUsedParams
procedure, public :: getScalarParams
procedure, public :: getArrayParams
procedure, public :: setScalarParams
procedure, public :: setArrayParams
procedure, public :: init => initCustomBuilder
procedure, public :: addModelToModeller => addCustomModel
procedure, private :: addTermToModel
procedure, private :: applyTermGenerator