1.4.0
CCC
 
ShiftOpCs Class Reference

Shift Operator for performing the basic tasks of SPDE. More...

#include <ShiftOpCs.hpp>

Inheritance diagram for ShiftOpCs:
ALinearOpEigenCG< ShiftOpCs > ALinearOp

Detailed Description

Shift Operator for performing the basic tasks of SPDE.

Public Member Functions

 ShiftOpCs ()
 
 ShiftOpCs (const AMesh *amesh, const CovAniso *cova, const Db *dbout=nullptr, bool verbose=false)
 
 ShiftOpCs (const MatrixSparse *S, const VectorDouble &TildeC, const VectorDouble &Lambda, const CovAniso *cova, bool verbose=false)
 
 ShiftOpCs (const ShiftOpCs &shift)
 
ShiftOpCsoperator= (const ShiftOpCs &shift)
 
virtual ~ShiftOpCs ()
 
void normalizeLambdaBySills (const AMesh *)
 
int _addToDest (const Eigen::VectorXd &inv, Eigen::VectorXd &outv) const override
 
int initFromMesh (const AMesh *amesh, const CovAniso *cova, const Db *dbout=nullptr, bool flagAdvection=false, bool verbose=false)
 
int initGradFromMesh (const AMesh *amesh, const CovAniso *cova, bool verbose=false, double tol=EPSILON10)
 
int initFromCS (const MatrixSparse *S, const VectorDouble &TildeC, const VectorDouble &Lambda, const CovAniso *cova, bool verbose=false)
 
int getSize () const override
 
int getNDim () const
 
int getNCovAnisoGradParam () const
 
void prodTildeC (const VectorDouble &x, VectorDouble &y, const EPowerPT &power) const
 
void prodLambda (const VectorDouble &x, VectorDouble &y, const EPowerPT &power) const
 
void prodLambda (const Eigen::VectorXd &x, Eigen::VectorXd &y, const EPowerPT &power) const
 
void prodLambda (const VectorDouble &x, Eigen::VectorXd &y, const EPowerPT &power) const
 
void prodLambda (const Eigen::VectorXd &x, VectorDouble &y, const EPowerPT &power) const
 
void prodLambdaOnSqrtTildeC (const VectorDouble &inv, VectorDouble &outv, double puis=2) const
 
double getMaxEigenValue () const
 
MatrixSparsegetS () const
 
MatrixSparsegetTildeCGrad (int iapex, int igparam) const
 
MatrixSparsegetSGrad (int iapex, int igparam) const
 
const VectorDoublegetTildeC () const
 
const VectorDoublegetLambdas () const
 
double getLambda (int iapex) const
 
const VectorDoublegetLambdaGrads (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 ALinearOpEigenCG< ShiftOpCs >
virtual ~ALinearOpEigenCG ()
 
Eigen::Index rows () const
 
Eigen::Index cols () const
 
Eigen::Product< ShiftOpCs, Rhs, Eigen::AliasFreeProduct > operator* (const Eigen::MatrixBase< Rhs > &x) const
 
- Public Member Functions inherited from ALinearOp
virtual ~ALinearOp ()
 
int evalDirect (const VectorDouble &inv, VectorDouble &outv) const
 
VectorDouble evalDirect (const VectorDouble &in) const
 
int evalDirect (const VectorEigen &inv, VectorEigen &outv) const
 
int addToDest (const VectorDouble &inv, VectorDouble &outv) const
 
int addToDest (const VectorEigen &inv, VectorEigen &outv) const
 
int evalDirect (const Eigen::VectorXd &inv, Eigen::VectorXd &outv) const
 
int addToDest (const Eigen::VectorXd &inv, Eigen::VectorXd &outv) const
 

Static Public Member Functions

static ShiftOpCscreate (const AMesh *amesh, const CovAniso *cova, const Db *dbout=nullptr, bool verbose=false)
 
static ShiftOpCscreateFromSparse (const MatrixSparse *S, const VectorDouble &TildeC, const VectorDouble &Lambda, const CovAniso *cova, bool verbose=false)
 

Additional Inherited Members

- Public Types inherited from ALinearOpEigenCG< ShiftOpCs >
enum  
 
typedef double Scalar
 
typedef double RealScalar
 
typedef int StorageIndex
 

Constructor & Destructor Documentation

◆ ShiftOpCs() [1/4]

ShiftOpCs::ShiftOpCs ( )

◆ ShiftOpCs() [2/4]

ShiftOpCs::ShiftOpCs ( const AMesh amesh,
const CovAniso cova,
const Db dbout = nullptr,
bool  verbose = false 
)

◆ ShiftOpCs() [3/4]

ShiftOpCs::ShiftOpCs ( const MatrixSparse S,
const VectorDouble TildeC,
const VectorDouble Lambda,
const CovAniso cova,
bool  verbose = false 
)

◆ ShiftOpCs() [4/4]

ShiftOpCs::ShiftOpCs ( const ShiftOpCs shift)

◆ ~ShiftOpCs()

ShiftOpCs::~ShiftOpCs ( )
virtual

Member Function Documentation

◆ _addToDest()

int ShiftOpCs::_addToDest ( const Eigen::VectorXd &  inv,
Eigen::VectorXd &  outv 
) const
overridevirtual

Perform the operation: y = S * x

Parameters
[in]invInput vector
[in]outvOutput vector
Remarks
'S' is a member that stands as a sparse matrix

Implements ALinearOp.

◆ create()

ShiftOpCs * ShiftOpCs::create ( const AMesh amesh,
const CovAniso cova,
const Db dbout = nullptr,
bool  verbose = false 
)
static

◆ createFromSparse()

ShiftOpCs * ShiftOpCs::createFromSparse ( const MatrixSparse S,
const VectorDouble TildeC,
const VectorDouble Lambda,
const CovAniso cova,
bool  verbose = false 
)
static

◆ getLambda()

double ShiftOpCs::getLambda ( int  iapex) const
inline

◆ getLambdaGrad()

double ShiftOpCs::getLambdaGrad ( int  idim,
int  iapex 
) const
inline

◆ getLambdaGrads()

const VectorDouble& ShiftOpCs::getLambdaGrads ( int  idim) const
inline

◆ getLambdaGradSize()

int ShiftOpCs::getLambdaGradSize ( ) const

◆ getLambdas()

const VectorDouble& ShiftOpCs::getLambdas ( ) const
inline

◆ getMaxEigenValue()

double ShiftOpCs::getMaxEigenValue ( ) const

◆ getNCovAnisoGradParam()

int ShiftOpCs::getNCovAnisoGradParam ( ) const
inline

◆ getNDim()

int ShiftOpCs::getNDim ( ) const
inline

◆ getS()

MatrixSparse* ShiftOpCs::getS ( ) const
inline

◆ getSGrad()

MatrixSparse * ShiftOpCs::getSGrad ( int  iapex,
int  igparam 
) const

◆ getSGradAddress()

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

Parameters
iapexRank of the target apex
igparamRank of the target parameter
Returns

◆ getSize()

int ShiftOpCs::getSize ( ) const
inlineoverridevirtual

Implements ALinearOp.

◆ getTildeC()

const VectorDouble& ShiftOpCs::getTildeC ( ) const
inline

◆ getTildeCGrad()

MatrixSparse * ShiftOpCs::getTildeCGrad ( int  iapex,
int  igparam 
) const

◆ initFromCS()

int ShiftOpCs::initFromCS ( const MatrixSparse S,
const VectorDouble TildeC,
const VectorDouble Lambda,
const CovAniso cova,
bool  verbose = false 
)
Parameters
SSparse matrix describing the S information
TildeCDiagonal array containing TildeC
LambdaNormalization vector
covaPointer to the CovAniso structure
verboseVerbose flag
Returns

◆ initFromMesh()

int ShiftOpCs::initFromMesh ( const AMesh amesh,
const CovAniso cova,
const Db dbout = nullptr,
bool  flagAdvection = false,
bool  verbose = false 
)
Parameters
ameshMeshing description (New format)
covaPointer to the CovAniso structure
dboutPointer to the Db structure
flagAdvectionWhen TRUE, S is replaced by G
verboseVerbose flag
Returns
Error return code

◆ initGradFromMesh()

int ShiftOpCs::initGradFromMesh ( const AMesh amesh,
const CovAniso cova,
bool  verbose = false,
double  tol = EPSILON10 
)

Initialize the environment for calculation of derivatives of S

Parameters
ameshMeshing description (New format)
covaPointer to the CovAniso structure
verboseVerbose flag
tolSmallest value below which the value is not stored in sparse matrix
Returns
Error return code

◆ normalizeLambdaBySills()

void ShiftOpCs::normalizeLambdaBySills ( const AMesh mesh)

◆ operator=()

ShiftOpCs & ShiftOpCs::operator= ( const ShiftOpCs shift)

◆ prodLambda() [1/4]

void ShiftOpCs::prodLambda ( const Eigen::VectorXd &  x,
Eigen::VectorXd &  y,
const EPowerPT &  power 
) const

◆ prodLambda() [2/4]

void ShiftOpCs::prodLambda ( const Eigen::VectorXd &  x,
VectorDouble y,
const EPowerPT &  power 
) const

◆ prodLambda() [3/4]

void ShiftOpCs::prodLambda ( const VectorDouble x,
Eigen::VectorXd &  y,
const EPowerPT &  power 
) const

◆ prodLambda() [4/4]

void ShiftOpCs::prodLambda ( const VectorDouble x,
VectorDouble y,
const EPowerPT &  power 
) const

◆ prodLambdaOnSqrtTildeC()

void ShiftOpCs::prodLambdaOnSqrtTildeC ( const VectorDouble inv,
VectorDouble outv,
double  puis = 2 
) const

◆ prodTildeC()

void ShiftOpCs::prodTildeC ( const VectorDouble x,
VectorDouble y,
const EPowerPT &  power 
) const

Perform the operation: y = x * C^power

Parameters
[in]xInput vector
[in]yOutput vector
[in]powerValue of the exponent
Remarks
'C' is a member (_TildeC) that stands as a vector
Specific coding has been realized for the cases
where 'power' is equal to 1, -1, 0.5 and -0.5

The documentation for this class was generated from the following files: