Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MEDCoupling::MEDCouplingFieldDiscretizationKriging Class Reference
Inheritance diagram for MEDCoupling::MEDCouplingFieldDiscretizationKriging:
Collaboration diagram for MEDCoupling::MEDCouplingFieldDiscretizationKriging:

Public Member Functions

void checkCompatibilityWithNature (NatureOfField nat) const
 
MEDCouplingFieldDiscretizationclone () const
 
DataArrayDoublecomputeEvaluationMatrixOnGivenPts (const MEDCouplingMesh *mesh, const double *loc, int nbOfTargetPoints, int &nbCols) const
 
DataArrayDoublecomputeInverseMatrix (const MEDCouplingMesh *mesh, int &isDrift, int &matSz) const
 
DataArrayDoublecomputeMatrix (const MEDCouplingMesh *mesh, int &isDrift, int &matSz) const
 
DataArrayDoublecomputeVectorOfCoefficients (const MEDCouplingMesh *mesh, const DataArrayDouble *arr, int &isDrift) const
 
TypeOfField getEnum () const
 
MEDCouplingFieldDoublegetMeasureField (const MEDCouplingMesh *mesh, bool isAbs) const
 
const char * getRepr () const
 
std::string getStringRepr () const
 
void getValueOn (const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const
 
DataArrayDoublegetValueOnMulti (const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const
 
bool isEqualIfNotWhy (const MEDCouplingFieldDiscretization *other, double eps, std::string &reason) const
 
void operateOnDenseMatrix (int spaceDimension, int nbOfElems, double *matrixPtr) const
 
DataArrayDoubleperformDrift (const DataArrayDouble *matr, const DataArrayDouble *arr, int &delta) const
 
void reprQuickOverview (std::ostream &stream) const
 
- Public Member Functions inherited from MEDCoupling::MEDCouplingFieldDiscretizationOnNodes
MEDCouplingMeshbuildSubMeshData (const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const
 
MEDCouplingMeshbuildSubMeshDataRange (const MEDCouplingMesh *mesh, int beginCellIds, int endCellIds, int stepCellIds, int &beginOut, int &endOut, int &stepOut, DataArrayInt *&di) const
 
void checkCoherencyBetween (const MEDCouplingMesh *mesh, const DataArray *da) const
 
void computeMeshRestrictionFromTupleIds (const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd, DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const
 
DataArrayIntcomputeTupleIdsToSelectFromCellIds (const MEDCouplingMesh *mesh, const int *startCellIds, const int *endCellIds) const
 
DataArrayDoublegetLocalizationOfDiscValues (const MEDCouplingMesh *mesh) const
 
int getNumberOfMeshPlaces (const MEDCouplingMesh *mesh) const
 
int getNumberOfTuples (const MEDCouplingMesh *mesh) const
 
int getNumberOfTuplesExpectedRegardingCode (const std::vector< int > &code, const std::vector< const DataArrayInt * > &idsPerType) const
 
DataArrayIntgetOffsetArr (const MEDCouplingMesh *mesh) const
 
void getValueOnPos (const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const
 
void renumberArraysForCell (const MEDCouplingMesh *mesh, const std::vector< DataArray * > &arrays, const int *old2NewBg, bool check)
 
void renumberValuesOnCells (double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, int newSz, DataArrayDouble *arr) const
 
void renumberValuesOnCellsR (const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const
 
void renumberValuesOnNodes (double epsOnVals, const int *old2New, int newNbOfNodes, DataArrayDouble *arr) const
 
- Public Member Functions inherited from MEDCoupling::MEDCouplingFieldDiscretization
virtual void checkForUnserialization (const std::vector< int > &tinyInfo, const DataArrayInt *arr)
 
virtual void clearGaussLocalizations ()
 
virtual
MEDCouplingFieldDiscretization
clonePart (const int *startCellIds, const int *endCellIds) const
 
virtual
MEDCouplingFieldDiscretization
clonePartRange (int beginCellIds, int endCellIds, int stepCellIds) const
 
virtual
MEDCouplingFieldDiscretization
deepCopy () const
 
virtual void finishUnserialization (const std::vector< double > &tinyInfo)
 
virtual void getCellIdsHavingGaussLocalization (int locId, std::vector< int > &cellIds) const
 
std::vector< const
BigMemoryObject * > 
getDirectChildrenWithNull () const
 
virtual
MEDCouplingGaussLocalization
getGaussLocalization (int locId)
 
virtual const
MEDCouplingGaussLocalization
getGaussLocalization (int locId) const
 
virtual int getGaussLocalizationIdOfOneCell (int cellId) const
 
virtual int getGaussLocalizationIdOfOneType (INTERP_KERNEL::NormalizedCellType type) const
 
virtual std::set< int > getGaussLocalizationIdsOfOneType (INTERP_KERNEL::NormalizedCellType type) const
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
virtual double getIJK (const MEDCouplingMesh *mesh, const DataArrayDouble *da, int cellId, int nodeIdInCell, int compoId) const
 
virtual int getNbOfGaussLocalization () const
 
double getPrecision () const
 
virtual void getSerializationIntArray (DataArrayInt *&arr) const
 
virtual void getTinySerializationDbleInformation (std::vector< double > &tinyInfo) const
 
virtual void getTinySerializationIntInformation (std::vector< int > &tinyInfo) const
 
virtual void integral (const MEDCouplingMesh *mesh, const DataArrayDouble *arr, bool isWAbs, double *res) const
 
virtual bool isEqual (const MEDCouplingFieldDiscretization *other, double eps) const
 
virtual bool isEqualWithoutConsideringStr (const MEDCouplingFieldDiscretization *other, double eps) const
 
virtual void normL1 (const MEDCouplingMesh *mesh, const DataArrayDouble *arr, double *res) const
 
virtual void normL2 (const MEDCouplingMesh *mesh, const DataArrayDouble *arr, double *res) const
 
virtual void renumberCells (const int *old2NewBg, bool check=true)
 
virtual void resizeForUnserialization (const std::vector< int > &tinyInfo, DataArrayInt *&arr)
 
virtual void setGaussLocalizationOnCells (const MEDCouplingMesh *m, const int *begin, const int *end, const std::vector< double > &refCoo, const std::vector< double > &gsCoo, const std::vector< double > &wg)
 
virtual void setGaussLocalizationOnType (const MEDCouplingMesh *m, INTERP_KERNEL::NormalizedCellType type, const std::vector< double > &refCoo, const std::vector< double > &gsCoo, const std::vector< double > &wg)
 
void setPrecision (double val)
 
void updateTime () const
 
virtual ~MEDCouplingFieldDiscretization ()
 
- Public Member Functions inherited from MEDCoupling::TimeLabel
void declareAsNew () const
 
std::size_t getTimeOfThis () const
 
TimeLabeloperator= (const TimeLabel &other)
 

Static Public Member Functions

static void OperateOnDenseMatrixH2Ln (int nbOfElems, double *matrixPtr)
 
static void OperateOnDenseMatrixH3 (int nbOfElems, double *matrixPtr)
 
static DataArrayDoublePerformDriftOfVec (const DataArrayDouble *arr, int isDrift)
 
static DataArrayDoublePerformDriftRect (const DataArrayDouble *matr, const DataArrayDouble *arr, int &delta)
 

Static Public Attributes

static const char REPR [] ="KRIGING"
 
static const TypeOfField TYPE =ON_NODES_KR
 

Additional Inherited Members

- Protected Member Functions inherited from MEDCoupling::MEDCouplingFieldDiscretization
 MEDCouplingFieldDiscretization ()
 
- Static Protected Member Functions inherited from MEDCoupling::MEDCouplingFieldDiscretization
static void RenumberEntitiesFromN2OArr (const int *new2OldPtr, int new2OldSz, DataArrayDouble *arr, const std::string &msg)
 
static void RenumberEntitiesFromO2NArr (double epsOnVals, const int *old2NewPtr, int newNbOfEntity, DataArrayDouble *arr, const std::string &msg)
 
- Protected Attributes inherited from MEDCoupling::MEDCouplingFieldDiscretization
double _precision
 
- Static Protected Attributes inherited from MEDCoupling::MEDCouplingFieldDiscretization
static const double DFLT_PRECISION =1.e-12
 

Member Function Documentation

TypeOfField MEDCouplingFieldDiscretizationKriging::getEnum ( ) const
virtual
const char * MEDCouplingFieldDiscretizationKriging::getRepr ( ) const
virtual
MEDCouplingFieldDiscretization * MEDCouplingFieldDiscretizationKriging::clone ( ) const
virtual

This method is simply called by MEDCouplingFieldDiscretization::deepCopy. It performs the deep copy of this.

See Also
MEDCouplingFieldDiscretization::deepCopy.

Implements MEDCoupling::MEDCouplingFieldDiscretization.

std::string MEDCouplingFieldDiscretizationKriging::getStringRepr ( ) const
virtual
void MEDCouplingFieldDiscretizationKriging::checkCompatibilityWithNature ( NatureOfField  nat) const
virtual
bool MEDCouplingFieldDiscretizationKriging::isEqualIfNotWhy ( const MEDCouplingFieldDiscretization other,
double  eps,
std::string &  reason 
) const
virtual
MEDCouplingFieldDouble * MEDCouplingFieldDiscretizationKriging::getMeasureField ( const MEDCouplingMesh mesh,
bool  isAbs 
) const
virtual
void MEDCouplingFieldDiscretizationKriging::getValueOn ( const DataArrayDouble arr,
const MEDCouplingMesh mesh,
const double *  loc,
double *  res 
) const
virtual
void MEDCouplingFieldDiscretizationKriging::reprQuickOverview ( std::ostream &  stream) const
virtual
DataArrayDouble * MEDCouplingFieldDiscretizationKriging::computeInverseMatrix ( const MEDCouplingMesh mesh,
int &  isDrift,
int &  matSz 
) const

This method returns the square matrix of size matSz that is the inverse of the kriging matrix. The returned matrix can returned all the coeffs of kriging when multiplied by the vector of values attached to each point.

Parameters
[out]isDriftreturn if drift coefficients are present in the returned vector of coefficients. If different from 0 there is presence of drift coefficients.
[out]matSzthe size of returned square matrix
Returns
the new result matrix to be deallocated by the caller.
See Also
computeMatrix

References MEDCoupling::DataArrayTemplate< T >::alloc(), computeMatrix(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArrayTemplate< T >::getPointer(), MEDCoupling::DataArrayDouble::New(), and MEDCoupling::MCAuto< T >::retn().

Referenced by computeEvaluationMatrixOnGivenPts(), and computeVectorOfCoefficients().

DataArrayDouble * MEDCouplingFieldDiscretizationKriging::computeMatrix ( const MEDCouplingMesh mesh,
int &  isDrift,
int &  matSz 
) const
DataArrayDouble * MEDCouplingFieldDiscretizationKriging::computeVectorOfCoefficients ( const MEDCouplingMesh mesh,
const DataArrayDouble arr,
int &  isDrift 
) const

This method computes coefficients to apply to each representing points of mesh, that is to say the nodes of mesh given a field array arr whose number of tuples should be equal to the number of representing points in mesh.

Parameters
[in]meshis the sources of nodes on which kriging will be done regarding the parameters and the value of this->getSpaceDimension()
[in]arrinput field DataArrayDouble whose number of tuples must be equal to the number of nodes in mesh
[out]isDriftreturn if drift coefficients are present in the returned vector of coefficients. If different from 0 there is presence of drift coefficients. Whatever the value of isDrift the number of tuples of returned DataArrayDouble will be equal to arr->getNumberOfTuples() + isDrift.
Returns
a newly allocated array containing coefficients including or not drift coefficient at the end depending the value of isDrift parameter.

References MEDCoupling::DataArrayTemplate< T >::alloc(), computeInverseMatrix(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), MEDCoupling::DataArrayDouble::New(), PerformDriftOfVec(), and MEDCoupling::MCAuto< T >::retn().

void MEDCouplingFieldDiscretizationKriging::operateOnDenseMatrix ( int  spaceDimension,
int  nbOfElems,
double *  matrixPtr 
) const

Apply f(x) on each element x in matrixPtr. matrixPtr is expected to be a dense matrix represented by a chunck of memory of size at least equal to nbOfElems.

Parameters
[in]spaceDimensionspace dimension of the input mesh on which the Kriging has to be performed
[in]nbOfElemsis the result of the product of nb of rows and the nb of columns of matrix matrixPtr
[in,out]matrixPtris the dense matrix whose on each values the operation will be applied

References OperateOnDenseMatrixH2Ln(), and OperateOnDenseMatrixH3().

Referenced by computeEvaluationMatrixOnGivenPts(), and computeMatrix().

DataArrayDouble * MEDCouplingFieldDiscretizationKriging::performDrift ( const DataArrayDouble matr,
const DataArrayDouble arr,
int &  delta 
) const

Starting from a square matrix matr, this method returns a newly allocated dense square matrix whose matr is included in returned matrix in the top left corner, and in the remaining returned matrix the parameters to take into account about the kriging drift. For the moment only linear srift is implemented.

Parameters
[in]arrthe position of points were input mesh geometry is considered for Kriging
[in]matrinput matrix whose drift part will be added
[out]deltathe difference between the size of the output matrix and the input matrix matr.
Returns
a newly allocated matrix bigger than input matrix matr.
See Also
MEDCouplingFieldDiscretizationKriging::PerformDriftRect

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), MEDCoupling::DataArrayDouble::New(), MEDCoupling::MCAuto< T >::retn(), and MEDCoupling::DataArrayDouble::toNoInterlace().

Referenced by computeMatrix().

void MEDCouplingFieldDiscretizationKriging::OperateOnDenseMatrixH3 ( int  nbOfElems,
double *  matrixPtr 
)
static

Referenced by operateOnDenseMatrix().

void MEDCouplingFieldDiscretizationKriging::OperateOnDenseMatrixH2Ln ( int  nbOfElems,
double *  matrixPtr 
)
static

Referenced by operateOnDenseMatrix().

DataArrayDouble * MEDCouplingFieldDiscretizationKriging::PerformDriftRect ( const DataArrayDouble matr,
const DataArrayDouble arr,
int &  delta 
)
static

Performs a drift to the rectangular input matrix matr. This method generate a dense matrix starting from an input dense matrix matr and input array arr.

Parameters
[in]matrThe rectangular dense matrix (with only one component). The number of rows of matr must be equal to the number of tuples of arr
[in]arrThe array of coords to be appended in the input dense matrix matr. Typically arr is an array of coordinates.
[out]deltathe delta of number of columns between returned dense matrix and input dense matrix matr. delta is equal to number of components of arr + 1.
See Also
performDrift

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), MEDCoupling::DataArrayTemplate< T >::isAllocated(), MEDCoupling::DataArrayDouble::New(), and MEDCoupling::MCAuto< T >::retn().

Member Data Documentation