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 MatrixSparse *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 MatrixSparse *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 |
| MatrixSparse * | getS () const |
| MatrixSparse * | getTildeCGrad (int iapex, int igparam) const |
| MatrixSparse * | getSGrad (int iapex, int igparam) 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 MatrixSparse *S, const VectorDouble &TildeC, const VectorDouble &Lambda, Model *model, const CGParam params=CGParam(), bool verbose=false) |
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 MatrixSparse * | S, |
| const VectorDouble & | TildeC, | ||
| const VectorDouble & | Lambda, | ||
| Model * | model, | ||
| const CGParam | params = CGParam(), |
||
| bool | verbose = false |
||
| ) |
| ShiftOpCs::ShiftOpCs | ( | const ShiftOpCs & | shift | ) |
|
virtual |
|
overridevirtual |
Perform the operation: y = S * x
| [in] | x | Input vector |
| [in] | y | Output vector |
Implements ALinearOp.
|
static |
|
static |
|
inline |
|
inline |
|
inline |
| int ShiftOpCs::getLambdaGradSize | ( | ) | const |
|
inline |
| double ShiftOpCs::getMaxEigenValue | ( | ) | const |
|
inline |
|
inline |
|
inline |
| MatrixSparse * 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 |
|
inlineoverridevirtual |
Implements ALinearOp.
|
inline |
| MatrixSparse * ShiftOpCs::getTildeCGrad | ( | int | iapex, |
| int | igparam | ||
| ) | const |
| int ShiftOpCs::initFromCS | ( | const MatrixSparse * | 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 |