1.6.0
CCC
 
Loading...
Searching...
No Matches
ShiftOpMatrix Class Reference

#include <ShiftOpMatrix.hpp>

Inheritance diagram for ShiftOpMatrix:
AShiftOp ICloneable ALinearOpEigenCG< AShiftOp > ALinearOp

Public Member Functions

 ShiftOpMatrix ()
 
 ShiftOpMatrix (const AMesh *amesh, const CovAniso *cova, const Db *dbout=nullptr, bool verbose=false)
 
 ShiftOpMatrix (const MatrixSparse *S, const VectorDouble &TildeC, const VectorDouble &Lambda, const CovAniso *cova, bool verbose=false)
 
 ShiftOpMatrix (const ShiftOpMatrix &shift)
 
ShiftOpMatrixoperator= (const ShiftOpMatrix &shift)
 
virtual ~ShiftOpMatrix ()
 
void normalizeLambdaBySills (const AMesh *mesh) override
 ICloneable interface.
 
int _addToDest (const constvect inv, vect 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 getNDim () const
 
int getNCovAnisoGradParam () const
 
void prodTildeC (const VectorDouble &x, VectorDouble &y, const EPowerPT &power) const
 
void prodLambdaOnSqrtTildeC (const VectorDouble &inv, VectorDouble &outv, double puis=2) const
 
double getMaxEigenValue () const override
 
MatrixSparsegetS () const
 
MatrixSparsegetTildeCGrad (int iapex, int igparam) const
 
MatrixSparsegetSGrad (int iapex, int igparam) const
 
const VectorDoublegetTildeC () 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 AShiftOp
 AShiftOp (CovAniso *cova=nullptr, int napices=0)
 
 AShiftOp (const AShiftOp &shift)
 
AShiftOpoperator= (const AShiftOp &shift)
 
virtual void prodLambda (const VectorDouble &x, VectorDouble &y, const EPowerPT &power) const
 
virtual ~AShiftOp ()
 
const VectorDoublegetLambdas () const
 
virtual double getLambda (int iapex) const
 
int getSize () const override
 
virtual void addProdLambda (const constvect x, vect y, const EPowerPT &power) const
 
void prodLambda (const constvect x, vect y, const EPowerPT &power) const
 
void prodLambda (const VectorDouble &x, vect y, const EPowerPT &power) const
 
void prodLambda (const constvect x, VectorDouble &y, const EPowerPT &power) const
 
- Public Member Functions inherited from ICloneable
 ICloneable ()
 
virtual ~ICloneable ()
 
virtual ICloneableclone () const =0
 
- Public Member Functions inherited from ALinearOpEigenCG< AShiftOp >
virtual ~ALinearOpEigenCG ()
 
Eigen::Index rows () const
 
Eigen::Index cols () const
 
Eigen::Product< AShiftOp, Rhs, Eigen::AliasFreeProduct > operator* (const Eigen::MatrixBase< Rhs > &x) const
 
- Public Member Functions inherited from ALinearOp
 ALinearOp ()
 
 ALinearOp (const ALinearOp &op)=delete
 
virtual ~ALinearOp ()
 
int evalDirect (const VectorDouble &inv, VectorDouble &outv) const
 
VectorDouble evalDirect (const VectorDouble &in) const
 
virtual void multiplyByValueAndAddDiagonal (double v1=1., double v2=0.)
 
virtual void resetModif ()
 
void setUseFactor (bool usefactor)
 
int evalDirect (constvect inv, vect outv) const
 
int addToDest (const constvect inv, vect outv) const
 
int addToDest (const Eigen::VectorXd &inv, Eigen::VectorXd &outv) const
 

Static Public Member Functions

static ShiftOpMatrixcreate (const AMesh *amesh, const CovAniso *cova, const Db *dbout=nullptr, bool verbose=false)
 
static ShiftOpMatrixcreateFromSparse (const MatrixSparse *S, const VectorDouble &TildeC, const VectorDouble &Lambda, const CovAniso *cova, bool verbose=false)
 
- Static Public Member Functions inherited from AShiftOp
static std::shared_ptr< CovAnisocloneAndCast (const CovAniso *cova)
 
static std::shared_ptr< CovAnisocloneAndCast (const std::shared_ptr< CovAniso > &cova)
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ ShiftOpMatrix() [1/4]

ShiftOpMatrix::ShiftOpMatrix ( )

◆ ShiftOpMatrix() [2/4]

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

◆ ShiftOpMatrix() [3/4]

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

◆ ShiftOpMatrix() [4/4]

ShiftOpMatrix::ShiftOpMatrix ( const ShiftOpMatrix shift)

◆ ~ShiftOpMatrix()

ShiftOpMatrix::~ShiftOpMatrix ( )
virtual

Member Function Documentation

◆ _addToDest()

int ShiftOpMatrix::_addToDest ( const constvect  inv,
vect  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 AShiftOp.

◆ create()

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

◆ createFromSparse()

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

◆ getLambdaGrad()

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

◆ getLambdaGrads()

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

◆ getLambdaGradSize()

int ShiftOpMatrix::getLambdaGradSize ( ) const

◆ getMaxEigenValue()

double ShiftOpMatrix::getMaxEigenValue ( ) const
overridevirtual

Implements AShiftOp.

◆ getNCovAnisoGradParam()

int ShiftOpMatrix::getNCovAnisoGradParam ( ) const
inline

◆ getNDim()

int ShiftOpMatrix::getNDim ( ) const
inline

◆ getS()

MatrixSparse * ShiftOpMatrix::getS ( ) const
inline

◆ getSGrad()

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

◆ getSGradAddress()

int ShiftOpMatrix::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

◆ getTildeC()

const VectorDouble & ShiftOpMatrix::getTildeC ( ) const
inline

◆ getTildeCGrad()

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

◆ initFromCS()

int ShiftOpMatrix::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 ShiftOpMatrix::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 ShiftOpMatrix::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 ShiftOpMatrix::normalizeLambdaBySills ( const AMesh mesh)
overridevirtual

ICloneable interface.

Implements AShiftOp.

◆ operator=()

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

◆ prodLambdaOnSqrtTildeC()

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

◆ prodTildeC()

void ShiftOpMatrix::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: