LogExtrapolation Derived Type

type, public, extends(Extrapolation) :: LogExtrapolation

Linear extrapolation object


Components

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

True only if user explicitly sets it to true

real(kind=rk), private :: logExterp

Logarithmic extrapolation coefficient used

real(kind=rk), private :: linInterp

Linear interpolation coefficient used when interpolationg

integer(kind=ik), public, dimension(2) :: exterpCoords

Coordinates used for extrapolation. Should be the indices of the data closest and second closest to the boundary, respectively.

logical, private :: interpolate

Interpolates the second closest value to the boundary using the extrapolation coordinates instead of using the value Associated with the second coordinate


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

  • interface

    private module subroutine setOnBoundary(this, partObj, gridObj, numProc)

    Check if this processor has the boundary corresponding with this extrapolation and set active

    Arguments

    Type IntentOptional Attributes Name
    class(Extrapolation), intent(inout) :: this
    type(Partition), intent(in) :: partObj
    type(Grid), intent(in) :: gridObj
    integer(kind=ik), intent(in) :: numProc

procedure, public :: setLeftBoundary

  • interface

    private module subroutine setLeftBoundary(this, leftBoundary)

    Setter for leftBoundary

    Arguments

    Type IntentOptional Attributes Name
    class(Extrapolation), intent(inout) :: this
    logical, intent(in) :: leftBoundary

procedure, public :: setStaggeredVars

  • interface

    private module subroutine setStaggeredVars(this, stagVars)

    Setter for staggeredVars

    Arguments

    Type IntentOptional Attributes Name
    class(Extrapolation), intent(inout) :: this
    logical, intent(in) :: stagVars

procedure, public :: setHaloWidth

  • interface

    private module subroutine setHaloWidth(this, haloWidth)

    Setter for haloWidth

    Arguments

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

procedure, public :: hasBoundary

  • interface

    private pure module function hasBoundary(this) result(active)

    Getter for active

    Arguments

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

    Return Value logical

procedure, public :: isLeftBoundary

  • interface

    private pure module function isLeftBoundary(this) result(leftBoundary)

    Getter for leftBoundary

    Arguments

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

    Return Value logical

procedure, public :: usesStaggeredVars

  • interface

    private pure module function usesStaggeredVars(this) result(staggeredVars)

    Getter for staggeredVars

    Arguments

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

    Return Value logical

procedure, public :: getHaloWidth

  • interface

    private pure module function getHaloWidth(this) result(haloWidth)

    Getter for haloWidth

    Arguments

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

    Return Value integer(kind=ik)

procedure, public :: init => initLogExtrap

  • interface

    private module subroutine initLogExtrap(this, partObj, gridObj, numProc, haloWidth, geometryObj, leftBoundary, staggeredVars, interpolate)

    Initialization routine for LogExtrapolation object

    Arguments

    Type IntentOptional Attributes Name
    class(LogExtrapolation), intent(inout) :: this
    type(Partition), intent(in) :: partObj
    type(Grid), intent(in) :: gridObj
    integer(kind=ik), intent(in) :: numProc
    integer(kind=ik), intent(in) :: haloWidth
    type(Geometry), intent(in) :: geometryObj
    logical, intent(in) :: leftBoundary
    logical, intent(in) :: staggeredVars
    logical, intent(in) :: interpolate

procedure, public :: extrapolate => extrapolateLog

  • interface

    private pure module function extrapolateLog(this, input) result(res)

    Logarithmic extrapolation

    Arguments

    Type IntentOptional Attributes Name
    class(LogExtrapolation), intent(in) :: this
    real(kind=rk), intent(in), dimension(:) :: input

    Return Value real(kind=rk)