|
gstlearn
1.0.0
CCC
|
Shift Operator for performing the basic tasks of SPDE. More...
#include <ShiftOpCs.hpp>
Public Member Functions | |
| ShiftOpCs (const CGParam params=CGParam()) | |
| ShiftOpCs (const AMesh *amesh, Model *model, const Db *dbout=nullptr, int igrf=0, int icov=0, const CGParam params=CGParam(), bool verbose=false) | |
| ShiftOpCs (const cs *S, const VectorDouble &TildeC, const VectorDouble &Lambda, Model *model, const CGParam params=CGParam(), bool verbose=false) | |
| ShiftOpCs (const ShiftOpCs &shift) | |
| ShiftOpCs & | operator= (const ShiftOpCs &shift) |
| virtual | ~ShiftOpCs () |
| void | _evalDirect (const VectorDouble &inv, VectorDouble &outv) const override |
| int | initFromMesh (const AMesh *amesh, Model *model, const Db *dbout=nullptr, int igrf=0, int icov=0, bool flagAdvection=false, bool verbose=false) |
| int | initGradFromMesh (const AMesh *amesh, Model *model, int igrf=0, int icov=0, bool verbose=false, double tol=EPSILON10) |
| int | initFromCS (const cs *S, const VectorDouble &TildeC, const VectorDouble &Lambda, Model *model, bool verbose=false) |
| int | getSize () const override |
| int | getNDim () const |
| int | getNModelGradParam () const |
| void | prodTildeC (const VectorDouble &x, VectorDouble &y, const EPowerPT &power) const |
| void | prodLambda (const VectorDouble &x, VectorDouble &y, const EPowerPT &power) const |
| void | prodLambdaOnSqrtTildeC (const VectorDouble &inv, VectorDouble &outv, double puis=2) const |
| double | getMaxEigenValue () const |
| cs * | getS () const |
| cs * | getTildeCGrad (int iapex, int igparam) const |
| cs * | getSGrad (int iapex, int igparam) const |
| Triplet | getSToTriplet (bool flag_from_1=false) const |
| Triplet | getTildeCGradToTriplet (int iapex, int igparam, bool flag_from_1=false) const |
| Triplet | getSGradToTriplet (int iapex, int igparam, bool flag_from_1=false) const |
| const VectorDouble & | getTildeC () const |
| const VectorDouble & | getLambdas () const |
| double | getLambda (int iapex) const |
| const VectorDouble & | getLambdaGrads (int idim) const |
| double | getLambdaGrad (int idim, int iapex) const |
| int | getSGradAddress (int iapex, int igparam) const |
| int | getLambdaGradSize () const |
Public Member Functions inherited from ALinearOp | |
| ALinearOp (const CGParam params=CGParam()) | |
| ALinearOp (const ALinearOp &m) | |
| ALinearOp & | operator= (const ALinearOp &m) |
| virtual | ~ALinearOp () |
| virtual void | evalInverse (const VectorDouble &inv, VectorDouble &outv) const |
| void | evalDirect (const VectorDouble &inv, VectorDouble &outv) const |
| void | setX0 (const VectorDouble &x0) |
| void | mustShowStats (bool status) |
| const LogStats & | getLogStats () const |
Static Public Member Functions | |
| static ShiftOpCs * | create (const AMesh *amesh, Model *model, const Db *dbout=nullptr, int igrf=0, int icov=0, const CGParam params=CGParam(), bool verbose=false) |
| static ShiftOpCs * | createFromSparse (const cs *S, const VectorDouble &TildeC, const VectorDouble &Lambda, Model *model, const CGParam params=CGParam(), bool verbose=false) |
Private Member Functions | |
| int | _getIcov () const |
| void | _setIcov (int icov) |
| int | _getIgrf () const |
| void | _setIgrf (int igrf) |
| const Model * | _getModel () const |
| void | _setModel (const Model *model) |
| bool | _isNoStat () |
| bool | _isGlobalHH (int igrf, int icov) |
| const CovAniso * | _getCova () |
| int | _buildS (const AMesh *amesh, double tol=EPSILON10) |
| int | _buildSGrad (const AMesh *amesh, double tol=EPSILON10) |
| void | _buildLambda (const AMesh *amesh) |
| void | _loadAux (VectorDouble &tab, const EConsElem &type, int imesh=0) |
| void | _loadHH (const AMesh *amesh, MatrixSquareSymmetric &hh, int imesh=0) |
| void | _loadHHRegular (MatrixSquareSymmetric &hh, int imesh) |
| void | _loadHHVariety (MatrixSquareSymmetric &hh, int imesh) |
| void | _loadHHGrad (const AMesh *amesh, MatrixSquareSymmetric &hh, int igparam, int ipref) |
| double | _computeGradLogDetHH (const AMesh *amesh, int igparam, int ipref, const MatrixSquareSymmetric &HH, MatrixSquareSymmetric &work, MatrixSquareSymmetric &work2) |
| bool | _buildLambdaGrad (const AMesh *amesh) |
| void | _reset () |
| void | _resetGrad () |
| void | _reallocate (const ShiftOpCs &shift) |
| void | _projectMesh (const AMesh *amesh, const VectorDouble &srot, int imesh, double coeff[3][2]) |
| int | _preparMatrices (const AMesh *amesh, int imesh, MatrixSquareGeneral &matu, MatrixRectangular &matw) const |
| int | _prepareMatricesSVariety (const AMesh *amesh, int imesh, VectorVectorDouble &coords, MatrixSquareSymmetric &matMtM, AMatrix &matres, double *deter) |
| int | _prepareMatricesSphere (const AMesh *amesh, int imesh, VectorVectorDouble &coords, AMatrixSquare &matres, double *deter) |
| void | _updateCova (CovAniso *cova, int imesh) |
| VectorT< std::map< int, double > > | _mapCreate () const |
| VectorT< VectorT< std::map< int, double > > > | _mapVectorCreate () const |
| VectorT< std::map< int, double > > | _mapTildeCCreate () const |
| void | _mapTildeCUpdate (std::map< int, double > &tab, int ip1, double value, double tol=EPSILON10) const |
| void | _mapGradUpdate (std::map< std::pair< int, int >, double > &tab, int ip0, int ip1, double value, double tol=EPSILON10) |
| cs * | _BuildTildeCGradfromMap (std::map< int, double > &tab) const |
| cs * | _BuildSGradfromMap (std::map< std::pair< int, int >, double > &tab) |
| bool | _cond (int indref, int igparam, int ipref) |
| void | _determineFlagNoStatByHH () |
| void | _updateHH (MatrixSquareSymmetric &hh, int imesh) |
| cs * | _preparSSparse (const AMesh *amesh) const |
Private Attributes | |
| VectorDouble | _TildeC |
| VectorDouble | _Lambda |
| cs * | _S |
| int | _nModelGradParam |
| VectorT< cs * > | _SGrad |
| VectorT< cs * > | _TildeCGrad |
| VectorVectorDouble | _LambdaGrad |
| bool | _flagNoStatByHH |
| const Model * | _model |
| int | _igrf |
| int | _icov |
| int | _ndim |
| int | _napices |
Additional Inherited Members | |
Protected Attributes inherited from ALinearOp | |
| LogStats | _logStats |
Shift Operator for performing the basic tasks of SPDE.
| ShiftOpCs::ShiftOpCs | ( | const AMesh * | amesh, |
| Model * | model, | ||
| const Db * | dbout = nullptr, |
||
| int | igrf = 0, |
||
| int | icov = 0, |
||
| const CGParam | params = CGParam(), |
||
| bool | verbose = false |
||
| ) |
| ShiftOpCs::ShiftOpCs | ( | const cs * | S, |
| const VectorDouble & | TildeC, | ||
| const VectorDouble & | Lambda, | ||
| Model * | model, | ||
| const CGParam | params = CGParam(), |
||
| bool | verbose = false |
||
| ) |
| ShiftOpCs::ShiftOpCs | ( | const ShiftOpCs & | shift | ) |
|
virtual |
|
private |
Construct the _Lambda vector (Dimension: _napices)
| amesh | Description of the Mesh |
|
private |
Construct the _Lambda vector (Dimension: _napices)
| amesh | Description of the Mesh (New class) |
Calculate the private member "_S" directly from the Mesh on a Variety in 3-D space
| amesh | Description of the Mesh (New class) |
| tol | Tolerance beyond which elements are not stored in S matrix |
Calculate the private member "_SGrad" directly from the Mesh
| amesh | Description of the Mesh (New class) |
| tol | Tolerance beyond which elements are not stored in S matrix |
|
private |
Transform the Map into a square cparse matrix
| tab | Input Map |
|
private |
|
private |
|
private |
|
private |
|
overridevirtual |
Perform the operation: y = S * x
| [in] | x | Input vector |
| [in] | y | Output vector |
Implements ALinearOp.
|
private |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
Constitute HH (only in non-stationary case)
| hh | Returned HH symmetric matrix |
| amesh | Pointer to the meshing |
| imesh | Rank of the mesh |
|
private |
Calculate HH Gradient matrix from one of the Model parameters for the given Apex.
| amesh | Meshing description (New format) |
| hh | Output Array (updated here) |
| igparam | Rank of the parameter for derivation |
| ipref | Rank of the point |
: The parameters 'igparam' are sorted as follows:
: - 0:(ndim-1) : ranges in each Space direction
: - ndim:ngparam : rotation angles (=ndim or 1 in 2-D)
|
private |
Calculate HH matrix from parameters Note that this function is also called in Stationary case... So it must be workable without any updates
| hh | Output Array |
| imesh | Rank of the active mesh |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Project the coordinates of the mesh vertices on the sphere
| amesh | Mesh structure |
| srot | Rotation parameters |
| imesh | Rank of the mesh of interest |
| coeff | Coordinates of the projected vertices |
|
private |
|
private |
|
private |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
private |
Locally update the covariance (does nothing in Stationary Case)
| cova | Local CovAniso structure (updated here) |
| imesh | Rank of the active mesh |
|
private |
|
static |
|
static |
|
inline |
|
inline |
|
inline |
| int ShiftOpCs::getLambdaGradSize | ( | ) | const |
|
inline |
| double ShiftOpCs::getMaxEigenValue | ( | ) | const |
|
inline |
|
inline |
|
inline |
| cs * ShiftOpCs::getSGrad | ( | int | iapex, |
| int | igparam | ||
| ) | const |
| int ShiftOpCs::getSGradAddress | ( | int | iapex, |
| int | igparam | ||
| ) | const |
Returns the internal address for a given vertex and a given parameter It returns -1 if the address is ivalid
| iapex | Rank of the target apex |
| igparam | Rank of the target parameter |
| Triplet ShiftOpCs::getSGradToTriplet | ( | int | iapex, |
| int | igparam, | ||
| bool | flag_from_1 = false |
||
| ) | const |
|
inlineoverridevirtual |
Implements ALinearOp.
| Triplet ShiftOpCs::getSToTriplet | ( | bool | flag_from_1 = false | ) | const |
|
inline |
| cs * ShiftOpCs::getTildeCGrad | ( | int | iapex, |
| int | igparam | ||
| ) | const |
| Triplet ShiftOpCs::getTildeCGradToTriplet | ( | int | iapex, |
| int | igparam, | ||
| bool | flag_from_1 = false |
||
| ) | const |
| int ShiftOpCs::initFromCS | ( | const cs * | S, |
| const VectorDouble & | TildeC, | ||
| const VectorDouble & | Lambda, | ||
| Model * | model, | ||
| bool | verbose = false |
||
| ) |
| S | Sparse matrix describing the S information |
| TildeC | Diagonal array containing TildeC |
| Lambda | Normalization vector |
| model | Pointer to the Model structure |
| verbose | Verbose flag |
| int ShiftOpCs::initGradFromMesh | ( | const AMesh * | amesh, |
| Model * | model, | ||
| int | igrf = 0, |
||
| int | icov = 0, |
||
| bool | verbose = false, |
||
| double | tol = EPSILON10 |
||
| ) |
Initialize the environment for calculation of derivatives of S
| amesh | Meshing description (New format) |
| model | Pointer to the Model structure |
| igrf | Rank of the GRF |
| icov | Rank of the Covariance within the Model |
| verbose | Verbose flag |
| tol | Smallest value below which the value is not stored in sparse matrix |
| void ShiftOpCs::prodLambda | ( | const VectorDouble & | x, |
| VectorDouble & | y, | ||
| const EPowerPT & | power | ||
| ) | const |
| void ShiftOpCs::prodLambdaOnSqrtTildeC | ( | const VectorDouble & | inv, |
| VectorDouble & | outv, | ||
| double | puis = 2 |
||
| ) | const |
| void ShiftOpCs::prodTildeC | ( | const VectorDouble & | x, |
| VectorDouble & | y, | ||
| const EPowerPT & | power | ||
| ) | const |
Perform the operation: y = x * C^power
| [in] | x | Input vector |
| [in] | y | Output vector |
| [in] | power | Value of the exponent |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |