File MatrixWithDerivatives.h¶
- Copyright
This code is licensed under the 3-clause BSD license.
Copyright ETH Zurich, Laboratory for Physical Chemistry, Reiher Group.
See LICENSE.txt for details.
-
template<>
structMatrixType<derivOrder::one>¶
-
template<>
structMatrixType<derivOrder::two>¶
-
namespace
Scine This header file contains functions that allow for common notation for common things that can be done at a different degree of derivatives.
This header contains alias definitions defining which classes to use for the different degrees of derivatives.
-
namespace
Utils Functions
-
template<>
MatrixWithDerivatives::Matrix0 &get<derivOrder::zero>()¶
-
template<>
MatrixWithDerivatives::Matrix1 &get<derivOrder::one>()¶
-
template<>
MatrixWithDerivatives::Matrix2 &get<derivOrder::two>()¶
-
template<>
const MatrixWithDerivatives::Matrix0 &get<derivOrder::zero>() const¶
-
template<>
const MatrixWithDerivatives::Matrix1 &get<derivOrder::one>() const¶
-
template<>
const MatrixWithDerivatives::Matrix2 &get<derivOrder::two>() const¶
-
class
MatrixWithDerivatives Container for a matrix and the derivatives of its elements. This class contains 3 matrices: val: contains the 0th order derivative of the elements. der: contains the 1th order derivative of the elements. It is thus a Eigen::Matrix of AutomaticDifferentiation::First3D elements. hes: contains the 2th order derivative of the elements. It is thus a Eigen::Matrix of AutomaticDifferentiation::Second3D elements.
Public Types
-
using
Der0= double¶
-
using
Der1= AutomaticDifferentiation::First3D¶
-
using
Der2= AutomaticDifferentiation::Second3D¶
-
using
Matrix0= Eigen::MatrixXd¶
-
using
Matrix= typename MatrixType<o>::MType¶
Public Functions
-
MatrixWithDerivatives &
operator+(const MatrixWithDerivatives &rhs)¶
-
MatrixWithDerivatives &
operator+=(const MatrixWithDerivatives &rhs)¶
-
MatrixWithDerivatives &
operator-(const MatrixWithDerivatives &rhs)¶
-
MatrixWithDerivatives &
operator-=(const MatrixWithDerivatives &rhs)¶
-
MatrixWithDerivatives(int rows = 0, int cols = 0)¶
-
void
setOrder(derivOrder o)¶
-
template<derivOrder
O>
Matrix<O> &get()¶
-
template<derivOrder
O>
const Matrix<O> &get() const¶
-
Eigen::MatrixXd
getMatrixXd() const Get a copy of the underlying matrix, without derivatives.
-
void
reset(int dimension) Alias for setDimension for the case where rows = cols
-
void
setDimension(int rows, int cols) Initializes the members with dimensions given as parameters.
-
void
setBaseMatrix(const Eigen::MatrixXd &m) Sets the base matrix to m. Implicitly calls setDimension with correct dimensions.
-
double
getValue(int i, int j) const¶
-
template<derivOrder
O>
structMatrixType¶
-
template<>
structMatrixType<derivOrder::one> Public Types
-
template<>
usingMType= Matrix1
-
template<>
-
template<>
structMatrixType<derivOrder::two> Public Types
-
template<>
usingMType= Matrix2
-
template<>
-
using
-
template<>
-
namespace