1.8.0
CCC
 
Loading...
Searching...
No Matches
gstlrn::ShiftOpMatrix Class Reference

#include <ShiftOpMatrix.hpp>

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

Public Member Functions

 ShiftOpMatrix ()
 
 ShiftOpMatrix (const AMesh *amesh, const CovAniso *cova, const Db *dbout=nullptr, bool verbose=false)
 
 ShiftOpMatrix (const MatrixSparse *S, const 1 &TildeC, const 1 &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.
 
Id _addToDest (const constvect inv, vect outv) const override
 
Id initFromMesh (const AMesh *amesh, const CovAniso *cova, const Db *dbout=nullptr, bool flagAdvection=false, bool verbose=false)
 
Id initGradFromMesh (const AMesh *amesh, const CovAniso *cova, bool verbose=false, double tol=EPSILON10)
 
Id initFromCS (const MatrixSparse *S, const 1 &TildeC, const 1 &Lambda, const CovAniso *cova, bool verbose=false)
 
Id getNDim () const
 
Id getNCovAnisoGradParam () const
 
void prodTildeC (const 1 &x, 1 &y, const EPowerPT &power) const
 
void prodLambdaOnSqrtTildeC (const 1 &inv, 1 &outv, double puis=2) const
 
MatrixSparsegetS () const
 
MatrixSparsegetTildeCGrad (Id iapex, Id igparam) const
 
MatrixSparsegetSGrad (Id iapex, Id igparam) const
 
const & getTildeC () const
 
const & getLambdaGrads (Id idim) const
 
double getLambdaGrad (Id idim, Id iapex) const
 
Id getSGradAddress (Id iapex, Id igparam) const
 
Id getLambdaGradSize () const
 
- Public Member Functions inherited from gstlrn::AShiftOp
 AShiftOp (CovAniso *cova=nullptr, Id napices=0)
 
 AShiftOp (const AShiftOp &shift)
 
AShiftOpoperator= (const AShiftOp &shift)
 
virtual void prodLambda (const 1 &x, 1 &y, const EPowerPT &power) const
 
virtual ~AShiftOp ()
 
virtual double getMaxEigenValue () const
 
const & getLambdas () const
 
virtual double getLambda (Id iapex) const
 
virtual double logDetLambda () const
 
Id 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 1 &x, vect y, const EPowerPT &power) const
 
void prodLambda (const constvect x, 1 &y, const EPowerPT &power) const
 
- Public Member Functions inherited from gstlrn::ICloneable
 ICloneable ()
 
virtual ~ICloneable ()
 
virtual ICloneableclone () const =0
 
std::shared_ptr< ICloneablecloneShared () const
 
std::unique_ptr< ICloneablecloneUnique () const
 
- Public Member Functions inherited from gstlrn::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 gstlrn::ALinearOp
 ALinearOp ()
 
 ALinearOp (const ALinearOp &m)=delete
 
ALinearOpoperator= (const ALinearOp &m)=delete
 
virtual ~ALinearOp ()
 
Id evalDirect (const 1 &inv, 1 &outv) const
 
 evalDirect (const 1 &in) const
 
virtual void multiplyByValueAndAddDiagonal (double v1=1., double v2=0.) const
 
virtual void resetModif () const
 
void setUseFactor (bool usefactor)
 
Id evalDirect (constvect inv, vect outv) const
 
Id addToDest (const constvect inv, vect outv) const
 
Id 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 1 &TildeC, const 1 &Lambda, const CovAniso *cova, bool verbose=false)
 
- Static Public Member Functions inherited from gstlrn::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 gstlrn::ALinearOpEigenCG< AShiftOp >
enum  
 
typedef double Scalar
 
typedef double RealScalar
 
typedef Id StorageIndex
 

Constructor & Destructor Documentation

◆ ShiftOpMatrix() [1/4]

gstlrn::ShiftOpMatrix::ShiftOpMatrix ( )

◆ ShiftOpMatrix() [2/4]

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

◆ ShiftOpMatrix() [3/4]

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

◆ ShiftOpMatrix() [4/4]

gstlrn::ShiftOpMatrix::ShiftOpMatrix ( const ShiftOpMatrix shift)

◆ ~ShiftOpMatrix()

gstlrn::ShiftOpMatrix::~ShiftOpMatrix ( )
virtual

Member Function Documentation

◆ _addToDest()

Id gstlrn::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 gstlrn::AShiftOp.

◆ create()

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

◆ createFromSparse()

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

◆ getLambdaGrad()

double gstlrn::ShiftOpMatrix::getLambdaGrad ( Id  idim,
Id  iapex 
) const
inline

◆ getLambdaGrads()

const & gstlrn::ShiftOpMatrix::getLambdaGrads ( Id  idim) const
inline

◆ getLambdaGradSize()

Id gstlrn::ShiftOpMatrix::getLambdaGradSize ( ) const

◆ getNCovAnisoGradParam()

Id gstlrn::ShiftOpMatrix::getNCovAnisoGradParam ( ) const
inline

◆ getNDim()

Id gstlrn::ShiftOpMatrix::getNDim ( ) const
inline

◆ getS()

MatrixSparse * gstlrn::ShiftOpMatrix::getS ( ) const
inline

◆ getSGrad()

MatrixSparse * gstlrn::ShiftOpMatrix::getSGrad ( Id  iapex,
Id  igparam 
) const

◆ getSGradAddress()

Id gstlrn::ShiftOpMatrix::getSGradAddress ( Id  iapex,
Id  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 & gstlrn::ShiftOpMatrix::getTildeC ( ) const
inline

◆ getTildeCGrad()

MatrixSparse * gstlrn::ShiftOpMatrix::getTildeCGrad ( Id  iapex,
Id  igparam 
) const

◆ initFromCS()

Id gstlrn::ShiftOpMatrix::initFromCS ( const MatrixSparse S,
const 1 &  TildeC,
const 1 &  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()

Id gstlrn::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()

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

ICloneable interface.

Implements gstlrn::AShiftOp.

◆ operator=()

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

◆ prodLambdaOnSqrtTildeC()

void gstlrn::ShiftOpMatrix::prodLambdaOnSqrtTildeC ( const 1 &  inv,
1 &  outv,
double  puis = 2 
) const

◆ prodTildeC()

void gstlrn::ShiftOpMatrix::prodTildeC ( const 1 &  x,
1 &  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: