term_moment_stencil_gen_class Module

Stencil generator for moment terms created using fully kinetic terms


Used by


Interfaces

interface

  • private module subroutine initTermMomentGen(this, partitionObj, vspaceObj, procRank, momentOrder, termName, removeLastCell)

    Term moment stencil value generator initialization routine

    Arguments

    Type IntentOptional Attributes Name
    class(TermMomentStencilGenerator), intent(inout) :: this
    type(Partition), intent(in) :: partitionObj

    Partition object used to determine local number of rows

    type(VSpace), intent(in) :: vspaceObj

    VSpace object used to get interpolation object

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

    Current processor rank

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

    Order of moment to be taken

    character(len=*), intent(in) :: termName

    Name of term in host model whose moment should be taken

    logical, intent(in), optional :: removeLastCell

    Set to true if the row variable is staggered and the grid is not periodic. Defaults to false.

interface

  • private module subroutine calcTermMomentVals(this, varCont, res, mbData, hostModel)

    Calculate term moment stencil values in place. Requires hostModel.

    Arguments

    Type IntentOptional Attributes Name
    class(TermMomentStencilGenerator), intent(inout) :: this
    type(VariableContainer), intent(in) :: varCont
    type(RealArray), intent(inout), allocatable, dimension(:) :: res
    class(ModelboundData), intent(in), optional :: mbData
    class(ModelSurrogate), intent(in), optional :: hostModel

Derived Types

type, public, extends(JaggedArrayGenerator) ::  TermMomentStencilGenerator

JaggedArrayGenerator for calculating moment terms based on taking velocity moments of other kinetic terms. The term whose moment is taken is expected to be evolving a single harmonic of a distribution variable and have a diagonal spatial stencil. If the implcit variable is a distribution, the spatial stencil must be strictly diagonal (no interpolation allowed).

Components

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

True only if user explicitly sets it to true

integer(kind=ik), private :: locNumX

Local x grid size (including any staggered grid modifications)

integer(kind=ik), private :: numV

Copy of v grid size

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

Vector used to calculate the moment (4piv*(2+m)dv)

character(len=:), private, allocatable :: termName

Name of the term whose moment is to be taken

type(SparseRowData), private :: matBuffer

Buffer for the matrix values of used term

type(MatrixTermIndexingData), private, allocatable :: indexingDataBuffer

Buffer for matrix term indexing data used to take moment

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: calculate
procedure, public :: init => initTermMomentGen
procedure, public :: calculateInPlace => calcTermMomentVals