Transition Derived Type

type, public, abstract, extends(Object) :: Transition

Represents a process in which an ingoing set of particles(states) is transformed into an outgoing set and to which quantities representing particle/momentum/energy exchange rates can be meaningfully assigned. Optionally, a Transition can have a cross-section object of rank 2 to accommodate anisotropic differential cross-sections.


Components

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

True only if user explicitly sets it to true

integer(kind=ik), private, allocatable, dimension(:) :: ingoingStates

Array of IDs associated with the ingoing states

integer(kind=ik), private, allocatable, dimension(:) :: outgoingStates

Array of IDs associated with the outgoing states

real(kind=rk), private, allocatable, dimension(:) :: rate

Spatial array associated with the (particle) Transition rate

real(kind=rk), private, allocatable, dimension(:) :: rateMomentum

Spatial array associated with the momentum exchange rate

real(kind=rk), private, allocatable, dimension(:) :: rateEnergy

Spatial array associated with the energy rate

real(kind=rk), private, allocatable, dimension(:,:) :: crossSection

Differential cross-section associated with the process - optional

logical, private :: rateContainsElDensity = .false.

Set to true if rate calculations already include one electron density factor from taking the rate moment

integer, private :: csDim = -1

Cross-section dimensionality - used to properly expose cs data


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

  • interface

    private pure module function getIngoingStates(this) result(inStates)

    Getter for ingoingStates

    Arguments

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

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

procedure, public :: getOutgoingStates

  • interface

    private pure module function getOutgoingStates(this) result(outStates)

    Getter for outgoingStates

    Arguments

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

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

procedure, public :: setStates

  • interface

    private pure module subroutine setStates(this, inStates, outStates)

    Setter for both ingoing and outgoing states

    Arguments

    Type IntentOptional Attributes Name
    class(Transition), intent(inout) :: this
    integer(kind=ik), intent(in), dimension(:) :: inStates

    Ingoing state IDs

    integer(kind=ik), intent(in), dimension(:) :: outStates

    Outgoing state IDs

procedure, public :: setRate

  • interface

    private pure module subroutine setRate(this, rate)

    Setter for rate values

    Arguments

    Type IntentOptional Attributes Name
    class(Transition), intent(inout) :: this
    real(kind=rk), intent(in), dimension(:) :: rate

procedure, public :: getRate

  • interface

    private pure module function getRate(this) result(rate)

    Getter for rate values

    Arguments

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

    Return Value real(kind=rk), allocatable, dimension(:)

procedure, public :: setRateMomentum

  • interface

    private pure module subroutine setRateMomentum(this, rate)

    Setter for rateMomentum values

    Arguments

    Type IntentOptional Attributes Name
    class(Transition), intent(inout) :: this
    real(kind=rk), intent(in), dimension(:) :: rate

procedure, public :: getRateMomentum

  • interface

    private pure module function getRateMomentum(this) result(rate)

    Getter for rateMomentum values

    Arguments

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

    Return Value real(kind=rk), allocatable, dimension(:)

procedure, public :: setRateEnergy

  • interface

    private pure module subroutine setRateEnergy(this, rate)

    Setter for rateEnergy

    Arguments

    Type IntentOptional Attributes Name
    class(Transition), intent(inout) :: this
    real(kind=rk), intent(in), dimension(:) :: rate

procedure, public :: getRateEnergy

  • interface

    private pure module function getRateEnergy(this) result(rate)

    Getter for rateEnergy

    Arguments

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

    Return Value real(kind=rk), allocatable, dimension(:)

procedure, public :: setCrossSection

  • interface

    private pure module subroutine setCrossSection(this, crossSection)

    Setter for crossSection

    Arguments

    Type IntentOptional Attributes Name
    class(Transition), intent(inout) :: this
    real(kind=rk), intent(in), dimension(:,:) :: crossSection

procedure, public :: setCrossSectionCol

  • interface

    private pure module subroutine setCrossSectionCol(this, crossSection, col)

    Set cross-section values in column col

    Arguments

    Type IntentOptional Attributes Name
    class(Transition), intent(inout) :: this
    real(kind=rk), intent(in), dimension(:) :: crossSection
    integer(kind=ik), intent(in) :: col

procedure, public :: getCrossSectionCol

  • interface

    private pure module function getCrossSectionCol(this, col) result(crossSection)

    Get cross-section values from column col

    Arguments

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

    Return Value real(kind=rk), allocatable, dimension(:)

procedure, public :: includesElDensity

  • interface

    private pure module function includesElDensity(this) result(includesDens)

    Check whether rates in this transition include an electron density factor

    Arguments

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

    Return Value logical

procedure, public :: setIncludeElectronDensity

  • interface

    private pure module subroutine setIncludeElectronDensity(this, includeDens)

    Setter for rateContainsElDensity

    Arguments

    Type IntentOptional Attributes Name
    class(Transition), intent(inout) :: this
    logical, intent(in) :: includeDens

procedure, public :: setCSDim

  • interface

    private pure module subroutine setCSDim(this, csDim)

    Setter for csDim

    Arguments

    Type IntentOptional Attributes Name
    class(Transition), intent(inout) :: this
    integer(kind=ik), intent(in) :: csDim

procedure, public :: getCSDim

  • interface

    private pure module function getCSDim(this) result(csDim)

    Getter for csDim

    Arguments

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

    Return Value integer(kind=ik)

procedure, public :: getRateSize

  • interface

    private pure module function getRateSize(this) result(rateSize)

    Getter for rate array length

    Arguments

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

    Return Value integer(kind=ik)

procedure, public :: update => noUpdate

  • interface

    private module subroutine noUpdate(this, varCont, hostModel, hostData, updatePriority)

    Default update routine - does nothing

    Arguments

    Type IntentOptional Attributes Name
    class(Transition), intent(inout) :: this
    type(VariableContainer), intent(in) :: varCont

    Variable container used in update

    class(ModelSurrogate), intent(in), optional :: hostModel

    Optional host model reference for callbacks during update

    class(ModelboundData), intent(in), optional :: hostData

    Optional host data reference for callbacks during update

    integer(kind=ik), intent(in), optional :: updatePriority

    Priority for this update call

procedure(returnEnergy), public, deferred :: getTransitionEnergy

  • pure function returnEnergy(this) result(energyCost) Prototype

    Returns array representing energy cost of this transition

    Arguments

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

    Return Value real(kind=rk), allocatable, dimension(:)