ScalingLBCStencilGen Derived Type

type, public, extends(JaggedArrayGenerator) :: ScalingLBCStencilGen

JaggedArrayGenerator for calculating logical boundary condition for electron distribution function. Contains x,h,v dependencies. Expects xStencil = [0] or [-1], depending on whether the boundary is left or right, and whether variables are staggered. The hStencil should cover all harmonics and assumes no m>0 harmonics. Expects vStencil = [0,1]. Calculates v*f_{cl}, without taking the x width or boundary sign into account.


Components

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

True only if user explicitly sets it to true

type(FScalingDerivation), private :: fDeriv

Derivation used to get scaling factors

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

Required variable indices for scaling extrapolation derivation

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

Tensor buffer

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

Copy of v grid

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

Copy of v grid widths

integer(kind=ik), private :: colL

l harmonic index of the column harmonic

integer(kind=ik), public, allocatable, dimension(:) :: includedDecompHarmonics

Harmonics to be included in the decomposition for this generator (useful for right boundary on staggered grid)

real(kind=rk), private :: dx

Width of boundary cell

logical, private :: isActive

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

  • interface

    private module function calculate(this, varCont, mbData, hostModel) result(res)

    Use in place version of stencil calculation to return values

    Arguments

    Type IntentOptional Attributes Name
    class(JaggedArrayGenerator), intent(inout) :: this
    type(VariableContainer), intent(in) :: varCont
    class(ModelboundData), intent(in), optional :: mbData
    class(ModelSurrogate), intent(in), optional :: hostModel

    Return Value type(RealArray), allocatable, dimension(:)

procedure, public :: init => initScalingLBCGen

  • interface

    private module subroutine initScalingLBCGen(this, vspaceObj, isActive, fDeriv, fDerivReqIndices, colL, dx, includedDecompHarmonics)

    Scaling logical boundary condition value generator initialization routine

    Arguments

    Type IntentOptional Attributes Name
    class(ScalingLBCStencilGen), intent(inout) :: this
    type(VSpace), intent(in) :: vspaceObj

    VSpace object used to get grid data

    logical, intent(in) :: isActive

    Set to true if the process containing this has a boundary where this is to be applied

    type(FScalingDerivation), intent(in) :: fDeriv

    Derivation used to get scaling factors

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

    Indices required for scaling extrapolation derivation

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

    Column l harmonic

    real(kind=rk), intent(in) :: dx

    Boundary cell width

    integer(kind=ik), intent(in), optional, dimension(:) :: includedDecompHarmonics

    Harmonics to be included in the decomposition for this generator (useful for right boundary on staggered grid). Defaults to all harmonics.

procedure, public :: calculateInPlace => calcScalingLBCVals

  • interface

    private module subroutine calcScalingLBCVals(this, varCont, res, mbData, hostModel)

    Calculate scaling logical boundary condition values in place

    Arguments

    Type IntentOptional Attributes Name
    class(ScalingLBCStencilGen), 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