species_class Module

Houses base species class containing particle properties and associated variable names


Used by


Interfaces

interface

  • private pure module function getID(this) result(id)

    Getter for id

    Arguments

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

    Return Value integer(kind=ik)

interface

  • private pure module function getMass(this) result(mass)

    Getter for mass

    Arguments

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

    Return Value real(kind=rk)

interface

  • private pure module function getCharge(this) result(charge)

    Getter for charge

    Arguments

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

    Return Value real(kind=rk)

interface

  • private pure module function getName(this) result(name)

    Getter for name

    Arguments

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

    Return Value character(len=:), allocatable

interface

  • private pure module function getAssociatedVars(this) result(associatedVars)

    Getter for associatedVars

    Arguments

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

    Return Value type(StringArray), allocatable, dimension(:)

interface

  • private module subroutine initFromJSON(this, name, jsonCont, mpiCont)

    Initialize species from JSON file. Here for extensibility

    Arguments

    Type IntentOptional Attributes Name
    class(Species), intent(inout) :: this
    character(len=*), intent(in) :: name
    type(JSONController), intent(inout) :: jsonCont

    JSONController used to get parameters from ./config.json

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

    MPIController used with JSONController

interface

  • private module subroutine initSpecies(this, id, name, Z, A, vars)

    Species initialization. Z is the charge and A the atomic mass (in amus). A/Z are ignored if id = 0, which is reserved for electrons.
    vars is a StringArray containing names of associated variables for easy access

    Arguments

    Type IntentOptional Attributes Name
    class(Species), intent(inout) :: this
    integer(kind=ik), intent(in) :: id
    character(len=*), intent(in) :: name
    real(kind=rk), intent(in) :: Z
    real(kind=rk), intent(in) :: A
    type(StringArray), intent(in), dimension(:) :: vars

Derived Types

type, public, extends(Object) ::  Species

Base species class containing particle properties and associated variable names

Components

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

True only if user explicitly sets it to true

integer(kind=ik), private :: id
character(len=:), private, allocatable :: name
real(kind=rk), private :: charge

in elementary charge units

real(kind=rk), private :: mass

in kg

type(StringArray), private, allocatable, dimension(:) :: associatedVars

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: getID
procedure, public :: getName
procedure, public :: getCharge
procedure, public :: getMass
procedure, public :: getAssociatedVars
procedure, public :: initFromJSON
procedure, public :: init => initSpecies