SpeciesList Derived Type

type, public, extends(Object) :: SpeciesList

Species list object providing centralized access and initialization of species objects


Components

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

True only if user explicitly sets it to true

type(Species), private, allocatable, dimension(:) :: speciesEntries
integer(kind=ik), private, allocatable, dimension(:) :: speciesIDs
type(StringArray), private, allocatable, dimension(:) :: speciesNames

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

  • interface

    private pure module function getSpeciesFromID(this, id) result(spec)

    Getter for species based on id

    Arguments

    Type IntentOptional Attributes Name
    class(SpeciesList), intent(in) :: this
    integer(kind=ik), intent(in) :: id

    Return Value type(Species), allocatable

procedure, public :: getSpeciesFromName

  • interface

    private pure module function getSpeciesFromName(this, name) result(spec)

    Getter for species based on name

    Arguments

    Type IntentOptional Attributes Name
    class(SpeciesList), intent(in) :: this
    character(len=*), intent(in) :: name

    Return Value type(Species), allocatable

procedure, public :: getSpeciesVarFromID

  • interface

    private pure module function getSpeciesVarFromID(this, id, ind) result(var)

    Return associated var with index ind of species with given id

    Arguments

    Type IntentOptional Attributes Name
    class(SpeciesList), intent(in) :: this
    integer(kind=ik), intent(in) :: id
    integer(kind=ik), intent(in) :: ind

    Return Value character(len=:), allocatable

procedure, public :: getSpeciesVarFromName

  • interface

    private pure module function getSpeciesVarFromName(this, name, ind) result(var)

    Return associated var with index ind of species with given name

    Arguments

    Type IntentOptional Attributes Name
    class(SpeciesList), intent(in) :: this
    character(len=*), intent(in) :: name
    integer(kind=ik), intent(in) :: ind

    Return Value character(len=:), allocatable

procedure, public :: getSpeciesIDs

  • interface

    private pure module function getSpeciesIDs(this) result(ids)

    Getter for speciesIDs

    Arguments

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

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

procedure, public :: init => initSpeciesList

  • interface

    private module subroutine initSpeciesList(this, jsonCont, mpiCont)

    SpeciesList initialization from config.json.

    Arguments

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

    JSONController used to get parameters from ./config.json

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

    MPIController used with JSONController