d2dv2_derivation_class Module

Houses derivation that calculates velocity space second order derivatives


Used by


Interfaces

interface

  • private module function calculateD2DV2(this, inputArray, indices) result(output)

    Arguments

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

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

interface

  • private module subroutine initD2DV2Derivation(this, vSpaceObj, outerV, innerV, vidfdvAtZero, targetH)

    Initialize second order velocity derivative derivation

    Arguments

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

    Extrapolation of v_idf/dv at zero in the form A1f(v1)+A2*f(v2) where A's correspond to included harmonics (default = 0)

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

    Harmonic to take derivative of. If not present will return full distribution.


Derived Types

type, public, extends(Derivation) ::  D2DV2Derivation

Calculates v_o*d(v_i df/dv)/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 df/dv 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(:) :: dvPlus

Local copy of v_n+1 - v_n

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(:) :: vidfdvAtZero

Extrapolation of v_idf/dv at zero in the form A1f(v1)+A2*f(v2) where A's correspond to included harmonics (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
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: init => initD2DV2Derivation
procedure, public :: calculate => calculateD2DV2