DDVDerivation Derived Type

type, public, extends(Derivation) :: DDVDerivation

Calculates v_o*d(v_i f)/dv, where v_o and v_i are velocity vectors, and f is a distribution. Can return either a distribution or a single harmonic. Assumes that f at v->inf is 0.


Components

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

True only if user explicitly sets it to true

integer(kind=ik), private :: numH

Total number of harmonics

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

Local copy of velocity grid widths for easier calculations

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

Local copy of velocity interpolation factors for easier calculations

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

Outer velocity vector corresponding to cell centres for each included harmonic. Defaults to ones.

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

Inner velocity vector corresponding to right cell boundaries for each included harmonic. Defaults to ones.

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

Extrapolation of v_if at zero in the form A1f(v1)+A2*f(v2) where A's are given for each included harmonic(default = 0)

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

Harmonics included in the output (either all or just the targeted harmonics). Defaults to all.


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 :: init => initDDVDerivation

  • interface

    private module subroutine initDDVDerivation(this, vSpaceObj, outerV, innerV, vifAtZero, targetH)

    Initialize first order velocity derivative derivation

    Arguments

    Type IntentOptional Attributes Name
    class(DDVDerivation), intent(inout) :: this
    type(VSpace), intent(in) :: vSpaceObj
    type(RealArray), intent(in), optional, dimension(:) :: outerV

    Outer velocity vector corresponding to cell centres for each included harmonic. Defaults to ones.

    type(RealArray), intent(in), optional, dimension(:) :: innerV

    Inner velocity vector corresponding to right cell boundaries for each included harmonic. Defaults to ones.

    type(RealArray), intent(in), optional, dimension(:) :: vifAtZero

    Extrapolation of v_if at zero in the form A1f(v1)+A2*f(v2) where A's are given for each included harmonic(default = 0)

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

    Harmonic to take derivative of. If not present will return full distribution/include all harmonics.

procedure, public :: calculate => calculateDDV

  • interface

    private module function calculateDDV(this, inputArray, indices) result(output)

    Arguments

    Type IntentOptional Attributes Name
    class(DDVDerivation), intent(inout) :: this
    type(RealArray), intent(in), dimension(:) :: inputArray
    integer(kind=ik), intent(in), dimension(:) :: indices

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