species_procedures Submodule

Contains module procedures associated with the species class


Uses


Module Functions

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)

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)

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)

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

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


Module Subroutines

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

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