Methods to calculate gradients (derivatives) with respect to different directions. More...
#include <gpr/auxiliary/Gradient.h>
Public Member Functions | |
| Gradient () | |
| virtual | ~Gradient () |
| void | calculateDerivativesSameDim (const gpr::Coord &x1, const gpr::Coord &x2, const gpr::AtomsConfiguration &conf_info, const gpr::FieldMatrixd &lengthScale, const gpr::FieldMatrixIdx &dims, uint8_t calc_options, gpr::Derivatives< std::vector< gpr::FieldMatrixd > > &derivatives, gpr::Derivatives< std::vector< gpr::FieldMatrixd > > &derivatives_pt) |
| Evaluate gradient of covariance function with respect to both input variables x and x2 (in same dimension). | |
| void | setFarFieldRadius (double radius) |
| double | farFieldRadius () const |
| void | calculateDerivativesDiffDim (const gpr::Coord &x1, const gpr::Coord &x2, const gpr::AtomsConfiguration &conf_info, const gpr::FieldMatrixd &lengthScale, const gpr::FieldMatrixIdx &dims1, const gpr::FieldMatrixIdx &dims2, const uint8_t calc_options, const uint8_t direction_x2, gpr::Derivatives< std::vector< gpr::FieldMatrixd > > &derivatives, gpr::Derivatives< std::vector< gpr::FieldMatrixd > > &derivatives_pt) |
| Evaluate gradient of covariance function, of which has been taken partial derivatives with respect to both input variables x and x2 with respect to parameters (if specified). | |
Methods to calculate gradients (derivatives) with respect to different directions.
Definition at line 28 of file Gradient.h.
|
inline |
Definition at line 30 of file Gradient.h.
|
inlinevirtual |
Definition at line 31 of file Gradient.h.
| void aux::Gradient::calculateDerivativesDiffDim | ( | const gpr::Coord & | x1, |
| const gpr::Coord & | x2, | ||
| const gpr::AtomsConfiguration & | conf_info, | ||
| const gpr::FieldMatrixd & | lengthScale, | ||
| const gpr::FieldMatrixIdx & | dims1, | ||
| const gpr::FieldMatrixIdx & | dims2, | ||
| const uint8_t | calc_options, | ||
| const uint8_t | direction_x2, | ||
| gpr::Derivatives< std::vector< gpr::FieldMatrixd > > & | derivatives, | ||
| gpr::Derivatives< std::vector< gpr::FieldMatrixd > > & | derivatives_pt ) |
Evaluate gradient of covariance function, of which has been taken partial derivatives with respect to both input variables x and x2 with respect to parameters (if specified).
dims1 and dims2. derivatives.D1/D2/D12 hold one block per pair.| x1 | Matrix of gpr::Coordinates |
| x2 | Matrix of gpr::Coordinates |
| conf_info | Configuration data for the GP model |
| lengthScale | Length-scale |
| dims1 | Coordinate-dimension indices differentiated in x1. |
| dims2 | Coordinate-dimension indices differentiated in x2. |
| calc_options | General type of the options to be calculated |
| direction_x2 | Direction for the derivative calculation for x2 field. |
| derivatives | Field of derivatives calculated at each dims (one block per coordinate) |
| derivatives_pt | Field of pairtype derivatives |
Definition at line 655 of file Gradient.cpp.
| void aux::Gradient::calculateDerivativesSameDim | ( | const gpr::Coord & | x1, |
| const gpr::Coord & | x2, | ||
| const gpr::AtomsConfiguration & | conf_info, | ||
| const gpr::FieldMatrixd & | lengthScale, | ||
| const gpr::FieldMatrixIdx & | dims, | ||
| uint8_t | calc_options, | ||
| gpr::Derivatives< std::vector< gpr::FieldMatrixd > > & | derivatives, | ||
| gpr::Derivatives< std::vector< gpr::FieldMatrixd > > & | derivatives_pt ) |
Evaluate gradient of covariance function with respect to both input variables x and x2 (in same dimension).
The first member of derivatives will contain a vector of fields for every derivative calculated for x (analog of D1). The second member of derivatives will contain derivatives calculated for active pairtypes.
dims. derivatives.D1/D2/D12 hold one block per coordinate.| x1 | Matrix of gpr::Coordinates |
| x2 | Matrix of gpr::Coordinates |
| conf_info | Configuration data for the GP model |
| lengthScale | Length-scale |
| dims | Derivative dimensions evaluated for both inputs |
| calc_options | Determines which derivative to calculate (D1, D2, D12) |
| derivatives | Output derivative fields (one block per coordinate) |
| derivatives_pt | Output derivatives for active pair types |
Definition at line 555 of file Gradient.cpp.
|
inlinenodiscard |
Definition at line 72 of file Gradient.h.
| void aux::Gradient::setFarFieldRadius | ( | double | radius | ) |
Same radius convention as Distance::setFarFieldRadius.
| radius | Far-field radius. |
Definition at line 885 of file Gradient.cpp.