ColdIonIJIntDerivation Derived Type

type, public, extends(Derivation) :: ColdIonIJIntDerivation

Calculates the Shkarofsky I or J integrals for cold drifting ions (normalized to ion density). The passed variable is assumed to be the ion flow velocity


Components

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

True only if user explicitly sets it to true

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

Local copy of velocity grid

integer(kind=ik), private :: ind

Integral index

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

Local copy of l harmonic grid

logical, private :: isJInt

True if the calculated integral is the J integral instead of the I integral.


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 => initColdIJInt

  • interface

    private module subroutine initColdIJInt(this, gridObj, ind, isJInt)

    Initialize col dion Shkarofsky I/J integral derivation derivation

    Arguments

    Type IntentOptional Attributes Name
    class(ColdIonIJIntDerivation), intent(inout) :: this
    type(Grid), intent(in) :: gridObj
    integer(kind=ik), intent(in) :: ind

    Index of integral

    logical, intent(in), optional :: isJInt

    If true the lower triangular J integral is calculated instead of the I integral. Defaults to false.

procedure, public :: calculate => calculateColdIJInt

  • interface

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

    Arguments

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

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