hyperdual Derived Type

type, public, bind(c) :: hyperdual

hyperdual

Scalar number carrying a primal value and two derivative seeds.

Description

The fields store coefficients of 1, epsilon1, epsilon2, and their product. When f1 and f2 are seeded with unit directions, f12 stores the corresponding mixed second derivative.

Examples

x = hyperdual(f0=x0, f1=1.0_pr, f2=1.0_pr)
y = exp(x)
print *, y%f12

Components

Type Visibility Attributes Name Initial
real(kind=pr), public :: f0 = 0

Primal value.

real(kind=pr), public :: f1 = 0

Coefficient of the first tangent direction.

real(kind=pr), public :: f12 = 0

Coefficient of the mixed second derivative.

real(kind=pr), public :: f2 = 0

Coefficient of the second tangent direction.