species_list_class Module

Houses species list class containing species initialized from config.json and accessed either via their ID or name


Used by


Interfaces

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

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(:)

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

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

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

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


Derived Types

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
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: getSpeciesFromID
procedure, public :: getSpeciesFromName
procedure, public :: getSpeciesVarFromID
procedure, public :: getSpeciesVarFromName
procedure, public :: getSpeciesIDs
procedure, public :: init => initSpeciesList