uwc_bc_stencil_gen_class Module

Stencil generator for flux-like boundary conditions


Used by


Interfaces

interface

  • private module subroutine initUWCBCStencil(this, partitionObj, procRank, innerJ, outerJ, linInterp, extrapolate, interpVarIndex, leftBoundary, lowerBoundVarIndex, fixedLowerBound, linExterp)

    Flux-like boundary condition stencil value generator initialization routine

    Arguments

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

    Partition object used to determine local number of rows

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

    Current processor rank

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

    Inner/column jacobian/hodge star at boundary face

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

    Outer/row inverse jacobian/hodge star at boundary cell

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

    Linear interpolation coefficient at face before boundary

    logical, intent(in), optional :: extrapolate

    Extrapolate implicit/column variables. Defaults to .false.

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

    Variable to optionally interpolate as part of stencil (flux jacobian)

    logical, intent(in), optional :: leftBoundary

    True if the stencil values are for the left boundary condition

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

    Variable index of lower jacobian bound variable

    real(kind=rk), intent(in), optional :: fixedLowerBound

    A constant lower bound value (ignored if lowerBoundVarIndex is allocated)

    real(kind=rk), intent(in), optional :: linExterp

    Linear extrapolation coefficient for column variables. Computed from linInterp by default

interface


Derived Types

type, public, extends(JaggedArrayGenerator) ::  UWCBCStencilValGenerator

JaggedArrayGenerator for calculating a flux-like boundary condition stencil. Can take 2 variable indices, one for a flux jacobian variable and the other for a lower jacobian bound variable. If the flux jacobian is present it is extrapolated to the boundary and the stencil multiplied by it. If the lower jacobian bound variable is present it is extrapolated to the boundary and substituted for the flux jacobian if the jacobian's projection to the boundary surface normal is smaller than the lower bound variable. If setting extrapolate to true the stencils will extrapolate the implicit/column variables as well. The stencil is assumed to either be [0,-1] for right boundary or [0,1] for left boundary. Will return size(0) stencil if the current processor does not contain the corresponding boundary.

Components

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

True only if user explicitly sets it to true

real(kind=rk), private :: outerJ

Outer/row inverse jacobian/hodge star

real(kind=rk), private :: linInterp

linear interpolation coefficient for face before the boundary - used for flux and lower bound variable

real(kind=rk), private :: linExterp

Linear extrapolation coefficient for column variables

real(kind=rk), private :: innerJ

Inner/column jacobian/hodge star at boundary face

logical, private :: leftBoundary

True if the stencil values are for the left boundary condition

logical, private :: extrapolate

True if the stencil should extrapolate implicit/column variables in addition to the jacobian

integer(kind=ik), private :: minX

Local minX (obtained from partition data)

integer(kind=ik), private :: maxX

Local maxX

integer(kind=ik), private :: inferredGridSize
integer(kind=ik), private, allocatable :: interpVarIndex

Variable to optionally interpolate as part of stencil

integer(kind=ik), private, allocatable :: lowerBoundVarIndex

Variable index of lower jacobian bound variable

real(kind=rk), private, allocatable :: fixedLowerBound

A constant lower bound value (ignored if lowerBoundVarIndex is allocated)

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: calculate
procedure, public :: init => initUWCBCStencil
procedure, public :: calculateInPlace => calcUWCBCVals