polynomial_fun_derivation_class Module

Houses derivation taking in a single variable and uses it in a polynomial function



Interfaces

interface

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

    Arguments

    Type IntentOptional Attributes Name
    class(PolyFunDeriv), 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 initPolyFunDeriv(this, polyPowers, polyCoeffs, constCoeff)

    Initialize polynomial function derivation object

    Arguments

    Type IntentOptional Attributes Name
    class(PolyFunDeriv), intent(inout) :: this
    real(kind=rk), intent(in), dimension(:) :: polyPowers
    real(kind=rk), intent(in), dimension(:) :: polyCoeffs
    real(kind=rk), intent(in), optional :: constCoeff

Derived Types

type, public, extends(Derivation) ::  PolyFunDeriv

Derivation taking in a single variable v and returning c0 + sum(c_ivp_i), where p are powers and c polynomial coefficents, Can optionally take as many conforming variables as there are coefficients and return c0 + sum(c_iv_i**p_i)

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

Polynomial powers

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

Polynomial coefficients

real(kind=rk), private :: constCoeff

Constant coefficient - default 0

Type-Bound Procedures

procedure, public :: isDefined => isDefinedObject
procedure, public :: makeDefined => makeDefinedObject
procedure, public :: makeUndefined => makeUndefinedObject
procedure, public :: init => initPolyFunDeriv
procedure, public :: calculate => calculatePolyFun