variable_ecs_transition_class Module

Houses variable energy and cross section transition


Used by


Interfaces

interface

  • private pure module function getEnergy(this) result(energyCost)

    Returns array representing energy cost of this transition

    Arguments

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

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

interface

  • private pure module subroutine initVariableECSTransition(this, locNumX, inStates, outStates, energyDeriv, energyDerivIndices, csDerivs, csDerivsReqIndices, csCols, distVarIndex, refVSpace, momentumMoment, l1Index)

    Initialization routine for VariableECSTransition object

    Arguments

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

    Local number of spatial cells

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

    Pre-transition states

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

    Post-transition states

    class(Derivation), intent(in) :: energyDeriv

    Derivation object used in rate calculation

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

    Indices for rate derivation

    type(DerivationContainer), intent(in), dimension(:) :: csDerivs

    Derivation objects for the various cross section data columns

    type(IntArray), intent(in), dimension(:) :: csDerivsReqIndices

    Required indices for the various cross section data column derivations

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

    Cross section columns corresponding to each of the derivations

    integer(kind=ik), intent(in) :: distVarIndex

    Distribution function variable index

    type(VSpace), intent(inout), target :: refVSpace

    Target for the reference pointer

    logical, intent(in), optional :: momentumMoment

    Set to true if the momentum rate should be calculated

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

    Index of the l=1 harmonic - must be provided if calculating momentum rate

interface

  • private module subroutine updateCSRates(this, varCont, hostModel, hostData, updatePriority)

    Update transition properties

    Arguments

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

    Variable container used in update

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

    Host model - unused

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

    Host data - used to get emission vectors

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

    Priority for this update call - unused

interface

  • private elemental module subroutine finalizeVariableECSTransition(this)

    Deallocate pointer component

    Arguments

    Type IntentOptional Attributes Name
    type(VariableECSTransition), intent(inout) :: this

Derived Types

type, public, extends(Transition) ::  VariableECSTransition

Transition where the transition energy and cross-section are derived

Components

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

True only if user explicitly sets it to true

real(kind=rk), private, allocatable, dimension(:) :: energyCost
real(kind=rk), private, allocatable, dimension(:) :: flattenedEmissionVector
class(Derivation), private, allocatable :: energyDeriv

Derivation object used in transition energy calculation

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

Indices for transition energy derivation

type(DerivationContainer), private, allocatable, dimension(:) :: csDerivs

Derivation objects for the various cross section data columns

type(IntArray), private, allocatable, dimension(:) :: csDerivsReqIndices

Required indices for the various cross section data column derivations

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

Cross section columns corresponding to each of the derivations

integer(kind=ik), private :: locNumX

Size of local rate vectors

type(VSpace), private, pointer :: vSpaceRef

Reference to velocity space object used in moment-taking

logical, private :: takeMomentumMoment

True if the momentum rate should be allocated and updated by taking the first moment of the l = 1 harmonic

integer(kind=ik), private :: l1HarmonicInd

Index of the l=1 m = 0 harmonic on the harmonic grid

integer(kind=ik), private :: distFunVarIndex

Variable index of the distribution function to be used in moment-taking

Finalizations Procedures

final :: finalizeVariableECSTransition

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: getIngoingStates
procedure, public :: getOutgoingStates
procedure, public :: setStates
procedure, public :: setRate
procedure, public :: getRate
procedure, public :: setRateMomentum
procedure, public :: getRateMomentum
procedure, public :: setRateEnergy
procedure, public :: getRateEnergy
procedure, public :: setCrossSection
procedure, public :: setCrossSectionCol
procedure, public :: getCrossSectionCol
procedure, public :: includesElDensity
procedure, public :: setIncludeElectronDensity
procedure, public :: setCSDim
procedure, public :: getCSDim
procedure, public :: getRateSize
procedure, public :: init => initVariableECSTransition
procedure, public :: update => updateCSRates
procedure, public :: getTransitionEnergy => getEnergy