inelastic_grid_data_class Module

Houses InelasticGridData class

Todo

Determine whether separate W and emit interpolations are valid and incorporate class into test suite


Used by


Interfaces

interface

  • private pure module function getFixedW(this, ind) result(wMat)

    Return fixed mapping matrix with given index

    Arguments

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

    Return Value type(SparseRowData)

interface

  • private pure module function getFixedEmissionVector(this, ind) result(emit)

    Return fixed emission vector for mapping matrix with given index

    Arguments

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

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

interface

  • private pure module function getInterpolatedEmissionVector(this, E) result(emit)

    Return interpolated emission vector for given input energy E

    Arguments

    Type IntentOptional Attributes Name
    class(InelasticGridData), intent(in) :: this
    real(kind=rk), intent(in) :: E

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

interface

  • private pure module subroutine initInelData(this, space, fixedEnergies, interpolationGrid)

    Inelastic grid data initialization routine

    Arguments

    Type IntentOptional Attributes Name
    class(InelasticGridData), intent(inout) :: this
    type(VSpace), intent(in) :: space

    Velocity space on which weights should be calculated

    real(kind=rk), intent(in), optional, dimension(:) :: fixedEnergies

    Energy values for fixed energy mappings

    real(kind=rk), intent(in), optional, dimension(:) :: interpolationGrid

    Energy values for mappings on the interpolation grid

interface

  • private pure module subroutine interpolateW(this, E, wRes)

    Interpolate mapping matrices for given energy and store in passed triangular matrix. Assumes upper triangular structure for wRes if E is positive and lower if it's negative

    Arguments

    Type IntentOptional Attributes Name
    class(InelasticGridData), intent(in) :: this
    real(kind=rk), intent(in) :: E

    Transition energy to interpolate for

    type(SparseRowData), intent(inout) :: wRes

    Lower/upper triangular matrix to store the interpolated weights


Derived Types

type, public, extends(Object) ::  InelasticGridData

Object responsible for storing inelastic mapping matrices, determining active emitter cels, and interpolating variable energy mapping matrices

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

Energy grid for interpolating variable energy mappings

type(SparseRowData), private, allocatable, dimension(:) :: interpW

Mappings evaluated on the interpolation grid

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

Energies used to evaluate fixed mappings

type(SparseRowData), private, allocatable, dimension(:) :: fixedW

Mappings with fixed transition energies

type(RealArray), private, allocatable, dimension(:) :: fixedEmissionVecs

Emission vectors for fixed mappings

integer(kind=ik), public :: numV

Local copy of velocity grid size used for building emission vectors

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: getFixedW
procedure, public :: getFixedEmissionVector
procedure, public :: interpolateW
procedure, public :: getInterpolatedEmissionVector
procedure, public :: init => initInelData