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

Public Member Functions

void checkNoOrphanCells () const
 
const DataArrayIntgetArrayOfDiscIds () const
 
void setArrayOfDiscIds (const DataArrayInt *adids)
 
std::vector< DataArrayInt * > splitIntoSingleGaussDicrPerCellType (std::vector< int > &locIds) const
 
- Public Member Functions inherited from MEDCoupling::MEDCouplingFieldDiscretization
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 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
 
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
 
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 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 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)
 
virtual ~MEDCouplingFieldDiscretization ()
 
- Public Member Functions inherited from MEDCoupling::TimeLabel
void declareAsNew () const
 
std::size_t getTimeOfThis () const
 
TimeLabeloperator= (const TimeLabel &other)
 

Protected Member Functions

void buildDiscrPerCellIfNecessary (const MEDCouplingMesh *mesh)
 
void checkCoherencyBetween (const MEDCouplingMesh *mesh, const DataArray *da) const
 
std::vector< const
BigMemoryObject * > 
getDirectChildrenWithNull () const
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
bool isEqualIfNotWhy (const MEDCouplingFieldDiscretization *other, double eps, std::string &reason) const
 
bool isEqualWithoutConsideringStr (const MEDCouplingFieldDiscretization *other, double eps) const
 
 MEDCouplingFieldDiscretizationPerCell ()
 
 MEDCouplingFieldDiscretizationPerCell (const MEDCouplingFieldDiscretizationPerCell &other, const int *startCellIds, const int *endCellIds)
 
 MEDCouplingFieldDiscretizationPerCell (const MEDCouplingFieldDiscretizationPerCell &other, int beginCellIds, int endCellIds, int stepCellIds)
 
void renumberCells (const int *old2NewBg, bool check)
 
void updateTime () const
 
 ~MEDCouplingFieldDiscretizationPerCell ()
 
- Protected Member Functions inherited from MEDCoupling::MEDCouplingFieldDiscretization
 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 ()
 

Protected Attributes

DataArrayInt_discr_per_cell
 
- Protected Attributes inherited from MEDCoupling::MEDCouplingFieldDiscretization
double _precision
 

Static Protected Attributes

static const int DFT_INVALID_LOCID_VALUE =-1
 
- Static Protected Attributes inherited from MEDCoupling::MEDCouplingFieldDiscretization
static const double DFLT_PRECISION =1.e-12
 

Additional Inherited Members

- Static Public Member Functions inherited from MEDCoupling::MEDCouplingFieldDiscretization
static TypeOfField GetTypeOfFieldFromStringRepr (const std::string &repr)
 
static std::string GetTypeOfFieldRepr (TypeOfField type)
 
static
MEDCouplingFieldDiscretization
New (TypeOfField type)
 
- 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)
 

Detailed Description

This class abstracts MEDCouplingFieldDiscretization that needs an information on each cell to perform their job. All classes that inherits from this are more linked to mesh.

Constructor & Destructor Documentation

MEDCouplingFieldDiscretizationPerCell::MEDCouplingFieldDiscretizationPerCell ( )
protected
MEDCouplingFieldDiscretizationPerCell::MEDCouplingFieldDiscretizationPerCell ( const MEDCouplingFieldDiscretizationPerCell other,
const int *  startCellIds,
const int *  endCellIds 
)
protected
MEDCouplingFieldDiscretizationPerCell::MEDCouplingFieldDiscretizationPerCell ( const MEDCouplingFieldDiscretizationPerCell other,
int  beginCellIds,
int  endCellIds,
int  stepCellIds 
)
protected
MEDCouplingFieldDiscretizationPerCell::~MEDCouplingFieldDiscretizationPerCell ( )
protected

Member Function Documentation

const DataArrayInt * MEDCouplingFieldDiscretizationPerCell::getArrayOfDiscIds ( ) const

References _discr_per_cell.

void MEDCouplingFieldDiscretizationPerCell::setArrayOfDiscIds ( const DataArrayInt adids)
std::vector< DataArrayInt * > MEDCouplingFieldDiscretizationPerCell::splitIntoSingleGaussDicrPerCellType ( std::vector< int > &  locIds) const

This method is useful when 'this' describes a field discretization with several gauss discretization on a same cell type. For example same NORM_TRI3 cells having 6 gauss points and others with 12 gauss points. This method returns 2 arrays with same size : the return value and 'locIds' output parameter. For a given i into [0,locIds.size) ret[i] represents the set of cell ids of i_th set an locIds[i] represents the set of discretisation of the set. The return vector contains a set of newly created instance to deal with. The returned vector represents a partition of cells ids with a gauss discretization set.

If no descretization is set in 'this' and exception will be thrown.

References _discr_per_cell, and MEDCoupling::DataArrayInt::partitionByDifferentValues().

Referenced by MEDCoupling::MEDCouplingFieldDiscretizationGauss::getLocalizationOfDiscValues(), and MEDCoupling::MEDCouplingFieldDiscretizationGauss::getMeasureField().

void MEDCouplingFieldDiscretizationPerCell::updateTime ( ) const
protectedvirtual

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

Reimplemented from MEDCoupling::MEDCouplingFieldDiscretization.

References _discr_per_cell, and MEDCoupling::TimeLabel::updateTimeWith().

std::size_t MEDCouplingFieldDiscretizationPerCell::getHeapMemorySizeWithoutChildren ( ) const
protectedvirtual
std::vector< const BigMemoryObject * > MEDCouplingFieldDiscretizationPerCell::getDirectChildrenWithNull ( ) const
protectedvirtual
bool MEDCouplingFieldDiscretizationPerCell::isEqualIfNotWhy ( const MEDCouplingFieldDiscretization other,
double  eps,
std::string &  reason 
) const
protectedvirtual
bool MEDCouplingFieldDiscretizationPerCell::isEqualWithoutConsideringStr ( const MEDCouplingFieldDiscretization other,
double  eps 
) const
protectedvirtual
void MEDCouplingFieldDiscretizationPerCell::renumberCells ( const int *  old2NewBg,
bool  check 
)
protectedvirtual

This method is typically the first step of renumbering. The impact on _discr_per_cell is necessary here. virtualy by this method.

Reimplemented from MEDCoupling::MEDCouplingFieldDiscretization.

References _discr_per_cell, MEDCoupling::DataArrayInt::CheckAndPreparePermutation(), MEDCoupling::RefCountObjectOnly::decrRef(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< T >::renumber().

Member Data Documentation

DataArrayInt* MEDCoupling::MEDCouplingFieldDiscretizationPerCell::_discr_per_cell
protected

Referenced by buildDiscrPerCellIfNecessary(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::buildNbOfGaussPointPerCellField(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::buildSubMeshDataRange(), checkCoherencyBetween(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::checkCoherencyBetween(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::checkForUnserialization(), checkNoOrphanCells(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::clearGaussLocalizations(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::computeTupleIdsToSelectFromCellIds(), getArrayOfDiscIds(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getCellIdsHavingGaussLocalization(), getDirectChildrenWithNull(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getGaussLocalizationIdOfOneCell(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getGaussLocalizationIdsOfOneType(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getMeasureField(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getNumberOfTuples(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getNumberOfTuplesExpectedRegardingCode(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getOffsetArr(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getOffsetOfCell(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getSerializationIntArray(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getStringRepr(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getTinySerializationIntInformation(), isEqualIfNotWhy(), isEqualWithoutConsideringStr(), MEDCouplingFieldDiscretizationPerCell(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::renumberArraysForCell(), renumberCells(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::resizeForUnserialization(), setArrayOfDiscIds(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnCells(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnType(), splitIntoSingleGaussDicrPerCellType(), updateTime(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::zipGaussLocalizations(), and ~MEDCouplingFieldDiscretizationPerCell().