Class Scine::Utils::AutomaticDifferentiation::Second3D

class Second3D

Class representing values in three dimensions and allowing for the automatic calculation of first and second derivatives.

Public Functions

Second3D()

Constructor that takes no arguments and intializes value and derivatives to Zero.

Second3D(double v, double dx, double dy, double dz, double xx = 0, double yy = 0, double zz = 0, double xy = 0, double xz = 0, double yz = 0)

Constructor that takes the value and all derivatives as doubles.

Second3D opposite() const

Returns a Second3D object with first derivatives only multiplied by -1.

Return

Second3D

double value() const

Getter for the value.

Return

double Value.

void setValue(double v)

Setter for the value.

void setFirst3D(const Eigen::Ref<Eigen::Vector3d> d)

Setter for first derivative as Eigen::Vector3d.

void setZero()

Zero initializer.

Eigen::Vector3d deriv() const

Getter for first derivative.

Return

Eigen::Vector3d

void setXX(double v)

Setter for all the second derivatives.

XX refers to (dv)^2/(dx)^2, XY to (dv)^2/(dxdy), and so on…

double dx() const

Getter for dv/dx derivative.

Return

double dv/dx

double dy() const

Getter for dv/dy derivative.

Return

double dv/dy

double dz() const

Getter for dv/dz derivative.

Return

double dv/dz

double XX() const

Getter for the second derivatives.

Return

double

Second3D operator-() const

Definition of all differentiation rules.