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

Public Member Functions

virtual MEDCouplingMeshbuildSubMeshData (const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const =0
 
virtual MEDCouplingMeshbuildSubMeshDataRange (const MEDCouplingMesh *mesh, int beginCellIds, int endCellIds, int stepCellIds, int &beginOut, int &endOut, int &stepOut, DataArrayInt *&di) const
 
virtual void checkCoherencyBetween (const MEDCouplingMesh *mesh, const DataArray *da) const =0
 
virtual void checkCompatibilityWithNature (NatureOfField nat) const =0
 
virtual void checkForUnserialization (const std::vector< int > &tinyInfo, const DataArrayInt *arr)
 
virtual void clearGaussLocalizations ()
 
virtual
MEDCouplingFieldDiscretization
clone () const =0
 
virtual
MEDCouplingFieldDiscretization
clonePart (const int *startCellIds, const int *endCellIds) const
 
virtual
MEDCouplingFieldDiscretization
clonePartRange (int beginCellIds, int endCellIds, int stepCellIds) const
 
virtual void computeMeshRestrictionFromTupleIds (const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd, DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const =0
 
virtual DataArrayIntcomputeTupleIdsToSelectFromCellIds (const MEDCouplingMesh *mesh, const int *startCellIds, const int *endCellIds) const =0
 
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 TypeOfField getEnum () const =0
 
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 DataArrayDoublegetLocalizationOfDiscValues (const MEDCouplingMesh *mesh) const =0
 
virtual MEDCouplingFieldDoublegetMeasureField (const MEDCouplingMesh *mesh, bool isAbs) const =0
 
virtual int getNbOfGaussLocalization () const
 
virtual int getNumberOfMeshPlaces (const MEDCouplingMesh *mesh) const =0
 
virtual int getNumberOfTuples (const MEDCouplingMesh *mesh) const =0
 
virtual int getNumberOfTuplesExpectedRegardingCode (const std::vector< int > &code, const std::vector< const DataArrayInt * > &idsPerType) const =0
 
virtual DataArrayIntgetOffsetArr (const MEDCouplingMesh *mesh) const =0
 
double getPrecision () const
 
virtual const char * getRepr () const =0
 
virtual void getSerializationIntArray (DataArrayInt *&arr) const
 
virtual std::string getStringRepr () const =0
 
virtual void getTinySerializationDbleInformation (std::vector< double > &tinyInfo) const
 
virtual void getTinySerializationIntInformation (std::vector< int > &tinyInfo) const
 
virtual void getValueOn (const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const =0
 
virtual DataArrayDoublegetValueOnMulti (const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const =0
 
virtual void getValueOnPos (const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const =0
 
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 isEqualIfNotWhy (const MEDCouplingFieldDiscretization *other, double eps, std::string &reason) const =0
 
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 renumberArraysForCell (const MEDCouplingMesh *mesh, const std::vector< DataArray * > &arrays, const int *old2NewBg, bool check)=0
 
virtual void renumberCells (const int *old2NewBg, bool check=true)
 
virtual void renumberValuesOnCells (double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, int newSz, DataArrayDouble *arr) const =0
 
virtual void renumberValuesOnCellsR (const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const =0
 
virtual void renumberValuesOnNodes (double epsOnVals, const int *old2New, int newNbOfNodes, DataArrayDouble *arr) const =0
 
virtual void reprQuickOverview (std::ostream &stream) const =0
 
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 TypeOfField GetTypeOfFieldFromStringRepr (const std::string &repr)
 
static std::string GetTypeOfFieldRepr (TypeOfField type)
 
static
MEDCouplingFieldDiscretization
New (TypeOfField type)
 

Protected Member Functions

 MEDCouplingFieldDiscretization ()
 
- Protected Member Functions inherited from MEDCoupling::RefCountObject
 RefCountObject ()
 
 RefCountObject (const RefCountObject &other)
 
virtual ~RefCountObject ()
 
- Protected Member Functions inherited from MEDCoupling::RefCountObjectOnly
 RefCountObjectOnly ()
 
 RefCountObjectOnly (const RefCountObjectOnly &other)
 
virtual ~RefCountObjectOnly ()
 
- Protected Member Functions inherited from MEDCoupling::TimeLabel
void forceTimeOfThis (const TimeLabel &other) const
 
 TimeLabel ()
 
void updateTimeWith (const TimeLabel &other) const
 
virtual ~TimeLabel ()
 

Static Protected Member Functions

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

double _precision
 

Static Protected Attributes

static const double DFLT_PRECISION =1.e-12
 

Constructor & Destructor Documentation

MEDCouplingFieldDiscretization::~MEDCouplingFieldDiscretization ( )
virtual
MEDCouplingFieldDiscretization::MEDCouplingFieldDiscretization ( )
protected

Member Function Documentation

double MEDCoupling::MEDCouplingFieldDiscretization::getPrecision ( ) const

References _precision.

void MEDCoupling::MEDCouplingFieldDiscretization::setPrecision ( double  val)

References _precision.

void MEDCouplingFieldDiscretization::updateTime ( ) const
virtual

Excepted for MEDCouplingFieldDiscretizationPerCell no underlying TimeLabel object : nothing to do in generally.

Implements MEDCoupling::TimeLabel.

Reimplemented in MEDCoupling::MEDCouplingFieldDiscretizationPerCell.

std::size_t MEDCouplingFieldDiscretization::getHeapMemorySizeWithoutChildren ( ) const
virtual
std::vector< const BigMemoryObject * > MEDCouplingFieldDiscretization::getDirectChildrenWithNull ( ) const
virtual
bool MEDCouplingFieldDiscretization::isEqualWithoutConsideringStr ( const MEDCouplingFieldDiscretization other,
double  eps 
) const
virtual
MEDCouplingFieldDiscretization * MEDCouplingFieldDiscretization::deepCopy ( ) const
virtual

This method is an alias of MEDCouplingFieldDiscretization::clone. It is only here for coherency with all the remaining of MEDCoupling.

See Also
MEDCouplingFieldDiscretization::clone.

References clone().

MEDCouplingFieldDiscretization * MEDCouplingFieldDiscretization::clonePart ( const int *  startCellIds,
const int *  endCellIds 
) const
virtual

For all field discretization excepted GaussPts the [ startCellIds, endCellIds ) has no impact on the cloned instance.

Reimplemented in MEDCoupling::MEDCouplingFieldDiscretizationGauss.

References clone().

Referenced by MEDCoupling::MEDCouplingFieldDouble::buildSubPart().

MEDCouplingFieldDiscretization * MEDCouplingFieldDiscretization::clonePartRange ( int  beginCellIds,
int  endCellIds,
int  stepCellIds 
) const
virtual

For all field discretization excepted GaussPts the slice( beginCellId, endCellIds, stepCellId ) has no impact on the cloned instance.

Reimplemented in MEDCoupling::MEDCouplingFieldDiscretizationGauss.

References clone().

Referenced by MEDCoupling::MEDCouplingFieldDouble::buildSubPartRange().

virtual int MEDCoupling::MEDCouplingFieldDiscretization::getNumberOfTuplesExpectedRegardingCode ( const std::vector< int > &  code,
const std::vector< const DataArrayInt * > &  idsPerType 
) const
pure virtual
virtual int MEDCoupling::MEDCouplingFieldDiscretization::getNumberOfTuples ( const MEDCouplingMesh mesh) const
pure virtual
virtual int MEDCoupling::MEDCouplingFieldDiscretization::getNumberOfMeshPlaces ( const MEDCouplingMesh mesh) const
pure virtual
void MEDCouplingFieldDiscretization::normL1 ( const MEDCouplingMesh mesh,
const DataArrayDouble arr,
double *  res 
) const
virtual

Computes normL1 of DataArrayDouble instance arr.

Parameters
resoutput parameter expected to be of size arr->getNumberOfComponents();
Exceptions
whenthe field discretization fails on getMeasure fields (gauss points for example)

References MEDCoupling::MEDCouplingFieldT< T >::getArray(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), getMeasureField(), MEDCoupling::DataArray::getNumberOfComponents(), and getNumberOfTuples().

void MEDCouplingFieldDiscretization::normL2 ( const MEDCouplingMesh mesh,
const DataArrayDouble arr,
double *  res 
) const
virtual

Computes normL2 of DataArrayDouble instance arr.

Parameters
resoutput parameter expected to be of size arr->getNumberOfComponents();
Exceptions
whenthe field discretization fails on getMeasure fields (gauss points for example)

References MEDCoupling::MEDCouplingFieldT< T >::getArray(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), getMeasureField(), MEDCoupling::DataArray::getNumberOfComponents(), and getNumberOfTuples().

void MEDCouplingFieldDiscretization::integral ( const MEDCouplingMesh mesh,
const DataArrayDouble arr,
bool  isWAbs,
double *  res 
) const
virtual

Computes integral of DataArrayDouble instance arr.

Parameters
resoutput parameter expected to be of size arr->getNumberOfComponents();
Exceptions
whenthe field discretization fails on getMeasure fields (gauss points for example)

Reimplemented in MEDCoupling::MEDCouplingFieldDiscretizationGaussNE.

References MEDCoupling::MEDCouplingFieldT< T >::getArray(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), getMeasureField(), MEDCoupling::DataArray::getNumberOfComponents(), getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples().

virtual DataArrayDouble* MEDCoupling::MEDCouplingFieldDiscretization::getLocalizationOfDiscValues ( const MEDCouplingMesh mesh) const
pure virtual
virtual void MEDCoupling::MEDCouplingFieldDiscretization::computeMeshRestrictionFromTupleIds ( const MEDCouplingMesh mesh,
const int *  tupleIdsBg,
const int *  tupleIdsEnd,
DataArrayInt *&  cellRestriction,
DataArrayInt *&  trueTupleRestriction 
) const
pure virtual
void MEDCouplingFieldDiscretization::renumberCells ( const int *  old2NewBg,
bool  check = true 
)
virtual

This method is typically the first step of renumbering. The implementation is empty it is not a bug only gauss is impacted virtualy by this method.

Reimplemented in MEDCoupling::MEDCouplingFieldDiscretizationPerCell.

virtual void MEDCoupling::MEDCouplingFieldDiscretization::renumberArraysForCell ( const MEDCouplingMesh mesh,
const std::vector< DataArray * > &  arrays,
const int *  old2NewBg,
bool  check 
)
pure virtual
double MEDCouplingFieldDiscretization::getIJK ( const MEDCouplingMesh mesh,
const DataArrayDouble da,
int  cellId,
int  nodeIdInCell,
int  compoId 
) const
virtual
virtual void MEDCoupling::MEDCouplingFieldDiscretization::getValueOn ( const DataArrayDouble arr,
const MEDCouplingMesh mesh,
const double *  loc,
double *  res 
) const
pure virtual
virtual void MEDCoupling::MEDCouplingFieldDiscretization::getValueOnPos ( const DataArrayDouble arr,
const MEDCouplingMesh mesh,
int  i,
int  j,
int  k,
double *  res 
) const
pure virtual
virtual DataArrayDouble* MEDCoupling::MEDCouplingFieldDiscretization::getValueOnMulti ( const DataArrayDouble arr,
const MEDCouplingMesh mesh,
const double *  loc,
int  nbOfPoints 
) const
pure virtual
virtual DataArrayInt* MEDCoupling::MEDCouplingFieldDiscretization::computeTupleIdsToSelectFromCellIds ( const MEDCouplingMesh mesh,
const int *  startCellIds,
const int *  endCellIds 
) const
pure virtual
virtual MEDCouplingMesh* MEDCoupling::MEDCouplingFieldDiscretization::buildSubMeshData ( const MEDCouplingMesh mesh,
const int *  start,
const int *  end,
DataArrayInt *&  di 
) const
pure virtual
MEDCouplingMesh * MEDCouplingFieldDiscretization::buildSubMeshDataRange ( const MEDCouplingMesh mesh,
int  beginCellIds,
int  endCellIds,
int  stepCellIds,
int &  beginOut,
int &  endOut,
int &  stepOut,
DataArrayInt *&  di 
) const
virtual

This method is strictly equivalent to MEDCouplingFieldDiscretization::buildSubMeshData except that it is optimized for input defined as a range of cell ids.

Parameters
[out]beginOutValid only if di is NULL
[out]endOutValid only if di is NULL
[out]stepOutValid only if di is NULL
[out]diis an array returned that specifies entity ids (nodes, cells, Gauss points... ) in array if no output range is foundable.
See Also
MEDCouplingFieldDiscretization::buildSubMeshData

Reimplemented in MEDCoupling::MEDCouplingFieldDiscretizationGaussNE, MEDCoupling::MEDCouplingFieldDiscretizationGauss, MEDCoupling::MEDCouplingFieldDiscretizationOnNodes, and MEDCoupling::MEDCouplingFieldDiscretizationP0.

References MEDCoupling::DataArrayTemplate< T >::begin(), buildSubMeshData(), MEDCoupling::DataArrayTemplate< T >::end(), and MEDCoupling::DataArrayInt::Range().

Referenced by MEDCoupling::MEDCouplingFieldDiscretizationGauss::buildSubMeshDataRange(), and MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::buildSubMeshDataRange().

virtual void MEDCoupling::MEDCouplingFieldDiscretization::renumberValuesOnNodes ( double  epsOnVals,
const int *  old2New,
int  newNbOfNodes,
DataArrayDouble arr 
) const
pure virtual
virtual void MEDCoupling::MEDCouplingFieldDiscretization::renumberValuesOnCells ( double  epsOnVals,
const MEDCouplingMesh mesh,
const int *  old2New,
int  newSz,
DataArrayDouble arr 
) const
pure virtual
virtual void MEDCoupling::MEDCouplingFieldDiscretization::renumberValuesOnCellsR ( const MEDCouplingMesh mesh,
const int *  new2old,
int  newSz,
DataArrayDouble arr 
) const
pure virtual
void MEDCouplingFieldDiscretization::getSerializationIntArray ( DataArrayInt *&  arr) const
virtual
void MEDCouplingFieldDiscretization::getTinySerializationIntInformation ( std::vector< int > &  tinyInfo) const
virtual

Empty : Not a bug

Reimplemented in MEDCoupling::MEDCouplingFieldDiscretizationGauss.

void MEDCouplingFieldDiscretization::getTinySerializationDbleInformation ( std::vector< double > &  tinyInfo) const
virtual

Empty : Not a bug

Reimplemented in MEDCoupling::MEDCouplingFieldDiscretizationGauss.

void MEDCouplingFieldDiscretization::finishUnserialization ( const std::vector< double > &  tinyInfo)
virtual

Empty : Not a bug

Reimplemented in MEDCoupling::MEDCouplingFieldDiscretizationGauss.

void MEDCouplingFieldDiscretization::resizeForUnserialization ( const std::vector< int > &  tinyInfo,
DataArrayInt *&  arr 
)
virtual
void MEDCouplingFieldDiscretization::checkForUnserialization ( const std::vector< int > &  tinyInfo,
const DataArrayInt arr 
)
virtual

Empty : Not a bug

Reimplemented in MEDCoupling::MEDCouplingFieldDiscretizationGauss.

void MEDCouplingFieldDiscretization::setGaussLocalizationOnType ( const MEDCouplingMesh m,
INTERP_KERNEL::NormalizedCellType  type,
const std::vector< double > &  refCoo,
const std::vector< double > &  gsCoo,
const std::vector< double > &  wg 
)
virtual
void MEDCouplingFieldDiscretization::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 MEDCouplingFieldDiscretization::clearGaussLocalizations ( )
virtual
MEDCouplingGaussLocalization & MEDCouplingFieldDiscretization::getGaussLocalization ( int  locId)
virtual
int MEDCouplingFieldDiscretization::getNbOfGaussLocalization ( ) const
virtual
int MEDCouplingFieldDiscretization::getGaussLocalizationIdOfOneCell ( int  cellId) const
virtual
int MEDCouplingFieldDiscretization::getGaussLocalizationIdOfOneType ( INTERP_KERNEL::NormalizedCellType  type) const
virtual
std::set< int > MEDCouplingFieldDiscretization::getGaussLocalizationIdsOfOneType ( INTERP_KERNEL::NormalizedCellType  type) const
virtual
void MEDCouplingFieldDiscretization::getCellIdsHavingGaussLocalization ( int  locId,
std::vector< int > &  cellIds 
) const
virtual
const MEDCouplingGaussLocalization & MEDCouplingFieldDiscretization::getGaussLocalization ( int  locId) const
virtual

Member Data Documentation

const double MEDCouplingFieldDiscretization::DFLT_PRECISION =1.e-12
staticprotected