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

Public Member Functions

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 checkCompatibilityWithNature (NatureOfField nat) const
 
MEDCouplingFieldDiscretizationclone () 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
 
TypeOfField getEnum () const
 
DataArrayDoublegetLocalizationOfDiscValues (const MEDCouplingMesh *mesh) const
 
MEDCouplingFieldDoublegetMeasureField (const MEDCouplingMesh *mesh, bool isAbs) 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
 
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
 
void getValueOnPos (const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const
 
bool isEqualIfNotWhy (const MEDCouplingFieldDiscretization *other, double eps, std::string &reason) 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
 
void reprQuickOverview (std::ostream &stream) 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 Attributes

static const char REPR [] ="P0"
 
static const TypeOfField TYPE =ON_CELLS
 

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)
 
- 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 MEDCouplingFieldDiscretizationP0::getEnum ( ) const
virtual
MEDCouplingFieldDiscretization * MEDCouplingFieldDiscretizationP0::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 MEDCouplingFieldDiscretizationP0::getStringRepr ( ) const
virtual
const char * MEDCouplingFieldDiscretizationP0::getRepr ( ) const
virtual
bool MEDCouplingFieldDiscretizationP0::isEqualIfNotWhy ( const MEDCouplingFieldDiscretization other,
double  eps,
std::string &  reason 
) const
virtual
int MEDCouplingFieldDiscretizationP0::getNumberOfTuplesExpectedRegardingCode ( const std::vector< int > &  code,
const std::vector< const DataArrayInt * > &  idsPerType 
) const
virtual

This method returns the number of tuples regarding exclusively the input code without using a mesh in input. The input code coherency is also checked regarding spatial discretization of this. If an incoherency is detected, an exception will be thrown. If the input code is coherent, the number of tuples expected is returned. The number of tuples expected is equal to those to have a valid field lying on this and having a mesh fitting perfectly the input code (geometric type distribution).

Implements MEDCoupling::MEDCouplingFieldDiscretization.

References MEDCoupling::DataArrayTemplate< T >::getMinValueInArray(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< T >::isAllocated().

int MEDCouplingFieldDiscretizationP0::getNumberOfTuples ( const MEDCouplingMesh mesh) const
virtual
int MEDCouplingFieldDiscretizationP0::getNumberOfMeshPlaces ( const MEDCouplingMesh mesh) const
virtual
void MEDCouplingFieldDiscretizationP0::renumberArraysForCell ( const MEDCouplingMesh mesh,
const std::vector< DataArray * > &  arrays,
const int *  old2NewBg,
bool  check 
)
virtual
DataArrayDouble * MEDCouplingFieldDiscretizationP0::getLocalizationOfDiscValues ( const MEDCouplingMesh mesh) const
virtual
void MEDCouplingFieldDiscretizationP0::checkCompatibilityWithNature ( NatureOfField  nat) const
virtual
void MEDCouplingFieldDiscretizationP0::computeMeshRestrictionFromTupleIds ( const MEDCouplingMesh mesh,
const int *  tupleIdsBg,
const int *  tupleIdsEnd,
DataArrayInt *&  cellRestriction,
DataArrayInt *&  trueTupleRestriction 
) const
virtual
void MEDCouplingFieldDiscretizationP0::checkCoherencyBetween ( const MEDCouplingMesh mesh,
const DataArray da 
) const
virtual
MEDCouplingFieldDouble * MEDCouplingFieldDiscretizationP0::getMeasureField ( const MEDCouplingMesh mesh,
bool  isAbs 
) const
virtual
void MEDCouplingFieldDiscretizationP0::getValueOn ( const DataArrayDouble arr,
const MEDCouplingMesh mesh,
const double *  loc,
double *  res 
) const
virtual
void MEDCouplingFieldDiscretizationP0::getValueOnPos ( const DataArrayDouble arr,
const MEDCouplingMesh mesh,
int  i,
int  j,
int  k,
double *  res 
) const
virtual
void MEDCouplingFieldDiscretizationP0::renumberValuesOnNodes ( double  epsOnVals,
const int *  old2New,
int  newNbOfNodes,
DataArrayDouble arr 
) const
virtual

Nothing to do. It's not a bug.

Implements MEDCoupling::MEDCouplingFieldDiscretization.

void MEDCouplingFieldDiscretizationP0::renumberValuesOnCells ( double  epsOnVals,
const MEDCouplingMesh mesh,
const int *  old2New,
int  newSz,
DataArrayDouble arr 
) const
virtual
void MEDCouplingFieldDiscretizationP0::renumberValuesOnCellsR ( const MEDCouplingMesh mesh,
const int *  new2old,
int  newSz,
DataArrayDouble arr 
) const
virtual
MEDCouplingMesh * MEDCouplingFieldDiscretizationP0::buildSubMeshData ( const MEDCouplingMesh mesh,
const int *  start,
const int *  end,
DataArrayInt *&  di 
) const
virtual

This method returns a submesh of 'mesh' instance constituting cell ids contained in array defined as an interval [start;end).

Parameters
diis an array returned that specifies entity ids (here cells ids) in mesh 'mesh' of entity in returned submesh. Example : The first cell id of returned mesh has the (*di)[0] id in 'mesh'
See Also
MEDCouplingFieldDiscretizationP0::buildSubMeshDataRange

Implements MEDCoupling::MEDCouplingFieldDiscretization.

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::MEDCouplingMesh::buildPart(), MEDCoupling::DataArrayTemplate< T >::getPointer(), MEDCoupling::DataArrayInt::New(), and MEDCoupling::MCAuto< T >::retn().

MEDCouplingMesh * MEDCouplingFieldDiscretizationP0::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 MEDCouplingFieldDiscretizationP0::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
MEDCouplingFieldDiscretizationP0::buildSubMeshData

Reimplemented from MEDCoupling::MEDCouplingFieldDiscretization.

References MEDCoupling::MEDCouplingMesh::buildPartRange(), and MEDCoupling::MCAuto< T >::retn().

DataArrayInt * MEDCouplingFieldDiscretizationP0::computeTupleIdsToSelectFromCellIds ( const MEDCouplingMesh mesh,
const int *  startCellIds,
const int *  endCellIds 
) const
virtual

This method returns a tuple ids selection from cell ids selection [start;end). This method is called by MEDCouplingFieldDiscretizationP0::buildSubMeshData to return parameter di. Here for P0 it's very simple !

Returns
a newly allocated array containing ids to select into the DataArrayDouble of the field.

Implements MEDCoupling::MEDCouplingFieldDiscretization.

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

void MEDCouplingFieldDiscretizationP0::reprQuickOverview ( std::ostream &  stream) const
virtual

Member Data Documentation