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

Public Member Functions

DataArrayIntbuildNbOfGaussPointPerCellField () const
 
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
 
void checkForUnserialization (const std::vector< int > &tinyInfo, const DataArrayInt *arr)
 
void clearGaussLocalizations ()
 
MEDCouplingFieldDiscretizationclone () const
 
MEDCouplingFieldDiscretizationclonePart (const int *startCellIds, const int *endCellIds) const
 
MEDCouplingFieldDiscretizationclonePartRange (int beginCellIds, int endCellIds, int stepCellIds) 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
 
void finishUnserialization (const std::vector< double > &tinyInfo)
 
void getCellIdsHavingGaussLocalization (int locId, std::vector< int > &cellIds) const
 
TypeOfField getEnum () const
 
MEDCouplingGaussLocalizationgetGaussLocalization (int locId)
 
const
MEDCouplingGaussLocalization
getGaussLocalization (int locId) const
 
int getGaussLocalizationIdOfOneCell (int cellId) const
 
int getGaussLocalizationIdOfOneType (INTERP_KERNEL::NormalizedCellType type) const
 
std::set< int > getGaussLocalizationIdsOfOneType (INTERP_KERNEL::NormalizedCellType type) const
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
double getIJK (const MEDCouplingMesh *mesh, const DataArrayDouble *da, int cellId, int nodeIdInCell, int compoId) const
 
DataArrayDoublegetLocalizationOfDiscValues (const MEDCouplingMesh *mesh) const
 
MEDCouplingFieldDoublegetMeasureField (const MEDCouplingMesh *mesh, bool isAbs) const
 
int getNbOfGaussLocalization () 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
 
void getSerializationIntArray (DataArrayInt *&arr) const
 
std::string getStringRepr () const
 
void getTinySerializationDbleInformation (std::vector< double > &tinyInfo) const
 
void getTinySerializationIntInformation (std::vector< int > &tinyInfo) 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
 
bool isEqualWithoutConsideringStr (const MEDCouplingFieldDiscretization *other, double eps) const
 
 MEDCouplingFieldDiscretizationGauss ()
 
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
 
void resizeForUnserialization (const std::vector< int > &tinyInfo, DataArrayInt *&arr)
 
void resizeLocalizationVector (int newSz)
 
void setGaussLocalization (int locId, const MEDCouplingGaussLocalization &loc)
 
void setGaussLocalizationOnCells (const MEDCouplingMesh *mesh, const int *begin, const int *end, const std::vector< double > &refCoo, const std::vector< double > &gsCoo, const std::vector< double > &wg)
 
void setGaussLocalizationOnType (const MEDCouplingMesh *mesh, INTERP_KERNEL::NormalizedCellType type, const std::vector< double > &refCoo, const std::vector< double > &gsCoo, const std::vector< double > &wg)
 
- Public Member Functions inherited from MEDCoupling::MEDCouplingFieldDiscretizationPerCell
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
MEDCouplingFieldDiscretization
deepCopy () const
 
double getPrecision () 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 void normL1 (const MEDCouplingMesh *mesh, const DataArrayDouble *arr, double *res) const
 
virtual void normL2 (const MEDCouplingMesh *mesh, const DataArrayDouble *arr, double *res) const
 
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)
 

Static Public Attributes

static const char REPR [] ="GAUSS"
 
static const TypeOfField TYPE =ON_GAUSS_PT
 

Protected Member Functions

void checkLocalizationId (int locId) const
 
void commonUnserialization (const std::vector< int > &tinyInfo)
 
int getOffsetOfCell (int cellId) const
 
 MEDCouplingFieldDiscretizationGauss (const MEDCouplingFieldDiscretizationGauss &other, const int *startCellIds=0, const int *endCellIds=0)
 
 MEDCouplingFieldDiscretizationGauss (const MEDCouplingFieldDiscretizationGauss &other, int beginCellIds, int endCellIds, int stepCellIds)
 
void zipGaussLocalizations ()
 
- Protected Member Functions inherited from MEDCoupling::MEDCouplingFieldDiscretizationPerCell
void buildDiscrPerCellIfNecessary (const MEDCouplingMesh *mesh)
 
std::vector< const
BigMemoryObject * > 
getDirectChildrenWithNull () 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 ()
 

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)
 
- Protected Attributes inherited from MEDCoupling::MEDCouplingFieldDiscretizationPerCell
DataArrayInt_discr_per_cell
 
- Static Protected Attributes inherited from MEDCoupling::MEDCouplingFieldDiscretizationPerCell
static const int DFT_INVALID_LOCID_VALUE =-1
 

Constructor & Destructor Documentation

MEDCouplingFieldDiscretizationGauss::MEDCouplingFieldDiscretizationGauss ( )

Referenced by clone(), clonePart(), and clonePartRange().

MEDCouplingFieldDiscretizationGauss::MEDCouplingFieldDiscretizationGauss ( const MEDCouplingFieldDiscretizationGauss other,
const int *  startCellIds = 0,
const int *  endCellIds = 0 
)
protected
MEDCouplingFieldDiscretizationGauss::MEDCouplingFieldDiscretizationGauss ( const MEDCouplingFieldDiscretizationGauss other,
int  beginCellIds,
int  endCellIds,
int  stepCellIds 
)
protected

Member Function Documentation

TypeOfField MEDCouplingFieldDiscretizationGauss::getEnum ( ) const
virtual
bool MEDCouplingFieldDiscretizationGauss::isEqualIfNotWhy ( const MEDCouplingFieldDiscretization other,
double  eps,
std::string &  reason 
) const
virtual
bool MEDCouplingFieldDiscretizationGauss::isEqualWithoutConsideringStr ( const MEDCouplingFieldDiscretization other,
double  eps 
) const
virtual
MEDCouplingFieldDiscretization * MEDCouplingFieldDiscretizationGauss::clone ( ) const
virtual
MEDCouplingFieldDiscretization * MEDCouplingFieldDiscretizationGauss::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 from MEDCoupling::MEDCouplingFieldDiscretization.

References MEDCouplingFieldDiscretizationGauss().

MEDCouplingFieldDiscretization * MEDCouplingFieldDiscretizationGauss::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 from MEDCoupling::MEDCouplingFieldDiscretization.

References MEDCouplingFieldDiscretizationGauss().

const char * MEDCouplingFieldDiscretizationGauss::getRepr ( ) const
virtual
std::size_t MEDCouplingFieldDiscretizationGauss::getHeapMemorySizeWithoutChildren ( ) const
virtual
int MEDCouplingFieldDiscretizationGauss::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::MEDCouplingFieldDiscretizationPerCell::_discr_per_cell, MEDCoupling::DataArrayTemplate< T >::getMinValueInArray(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< T >::isAllocated().

int MEDCouplingFieldDiscretizationGauss::getNumberOfMeshPlaces ( const MEDCouplingMesh mesh) const
virtual
void MEDCouplingFieldDiscretizationGauss::checkCompatibilityWithNature ( NatureOfField  nat) const
virtual

Empty : not a bug

Implements MEDCoupling::MEDCouplingFieldDiscretization.

void MEDCouplingFieldDiscretizationGauss::getTinySerializationIntInformation ( std::vector< int > &  tinyInfo) const
virtual
void MEDCouplingFieldDiscretizationGauss::getTinySerializationDbleInformation ( std::vector< double > &  tinyInfo) const
virtual

Empty : Not a bug

Reimplemented from MEDCoupling::MEDCouplingFieldDiscretization.

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

Empty : Not a bug

Reimplemented from MEDCoupling::MEDCouplingFieldDiscretization.

void MEDCouplingFieldDiscretizationGauss::getSerializationIntArray ( DataArrayInt *&  arr) const
virtual
void MEDCouplingFieldDiscretizationGauss::resizeForUnserialization ( const std::vector< int > &  tinyInfo,
DataArrayInt *&  arr 
)
virtual
void MEDCouplingFieldDiscretizationGauss::checkForUnserialization ( const std::vector< int > &  tinyInfo,
const DataArrayInt arr 
)
virtual
double MEDCouplingFieldDiscretizationGauss::getIJK ( const MEDCouplingMesh mesh,
const DataArrayDouble da,
int  cellId,
int  nodeIdInCell,
int  compoId 
) const
virtual
void MEDCouplingFieldDiscretizationGauss::getValueOn ( const DataArrayDouble arr,
const MEDCouplingMesh mesh,
const double *  loc,
double *  res 
) const
virtual
void MEDCouplingFieldDiscretizationGauss::getValueOnPos ( const DataArrayDouble arr,
const MEDCouplingMesh mesh,
int  i,
int  j,
int  k,
double *  res 
) const
virtual
DataArrayDouble * MEDCouplingFieldDiscretizationGauss::getValueOnMulti ( const DataArrayDouble arr,
const MEDCouplingMesh mesh,
const double *  loc,
int  nbOfPoints 
) const
virtual
MEDCouplingMesh * MEDCouplingFieldDiscretizationGauss::buildSubMeshData ( const MEDCouplingMesh mesh,
const int *  start,
const int *  end,
DataArrayInt *&  di 
) const
virtual
MEDCouplingMesh * MEDCouplingFieldDiscretizationGauss::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 MEDCouplingFieldDiscretizationGauss::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
MEDCouplingFieldDiscretizationGauss::buildSubMeshData

Reimplemented from MEDCoupling::MEDCouplingFieldDiscretization.

References MEDCoupling::MEDCouplingFieldDiscretizationPerCell::_discr_per_cell, MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::MEDCouplingMesh::buildPartRange(), MEDCoupling::MEDCouplingFieldDiscretization::buildSubMeshDataRange(), MEDCoupling::MEDCouplingFieldDiscretizationPerCell::DFT_INVALID_LOCID_VALUE, MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::MCAuto< T >::retn().

DataArrayInt * MEDCouplingFieldDiscretizationGauss::computeTupleIdsToSelectFromCellIds ( const MEDCouplingMesh mesh,
const int *  startCellIds,
const int *  endCellIds 
) const
virtual
void MEDCouplingFieldDiscretizationGauss::renumberValuesOnNodes ( double  epsOnVals,
const int *  old2New,
int  newNbOfNodes,
DataArrayDouble arr 
) const
virtual

No implementation needed !

Implements MEDCoupling::MEDCouplingFieldDiscretization.

void MEDCouplingFieldDiscretizationGauss::renumberValuesOnCells ( double  epsOnVals,
const MEDCouplingMesh mesh,
const int *  old2New,
int  newSz,
DataArrayDouble arr 
) const
virtual
void MEDCouplingFieldDiscretizationGauss::renumberValuesOnCellsR ( const MEDCouplingMesh mesh,
const int *  new2old,
int  newSz,
DataArrayDouble arr 
) const
virtual
void MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnCells ( const MEDCouplingMesh mesh,
const int *  begin,
const int *  end,
const std::vector< double > &  refCoo,
const std::vector< double > &  gsCoo,
const std::vector< double > &  wg 
)
virtual
void MEDCouplingFieldDiscretizationGauss::clearGaussLocalizations ( )
virtual
void MEDCouplingFieldDiscretizationGauss::setGaussLocalization ( int  locId,
const MEDCouplingGaussLocalization loc 
)
void MEDCouplingFieldDiscretizationGauss::resizeLocalizationVector ( int  newSz)
MEDCouplingGaussLocalization & MEDCouplingFieldDiscretizationGauss::getGaussLocalization ( int  locId)
virtual
int MEDCouplingFieldDiscretizationGauss::getNbOfGaussLocalization ( ) const
virtual
int MEDCouplingFieldDiscretizationGauss::getGaussLocalizationIdOfOneCell ( int  cellId) const
virtual
int MEDCouplingFieldDiscretizationGauss::getGaussLocalizationIdOfOneType ( INTERP_KERNEL::NormalizedCellType  type) const
virtual
std::set< int > MEDCouplingFieldDiscretizationGauss::getGaussLocalizationIdsOfOneType ( INTERP_KERNEL::NormalizedCellType  type) const
virtual
void MEDCouplingFieldDiscretizationGauss::getCellIdsHavingGaussLocalization ( int  locId,
std::vector< int > &  cellIds 
) const
virtual
const MEDCouplingGaussLocalization & MEDCouplingFieldDiscretizationGauss::getGaussLocalization ( int  locId) const
virtual
DataArrayInt * MEDCouplingFieldDiscretizationGauss::buildNbOfGaussPointPerCellField ( ) const

This method do the assumption that there is no orphan cell. If there is an exception is thrown. This method makes the assumption too that '_discr_per_cell' is defined. If not an exception is thrown. This method returns a newly created array with number of tuples equals to '_discr_per_cell->getNumberOfTuples' and number of components equal to 1. The i_th tuple in returned array is the number of gauss point if the corresponding cell.

References MEDCoupling::MEDCouplingFieldDiscretizationPerCell::_discr_per_cell, MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::MEDCouplingFieldDiscretizationPerCell::DFT_INVALID_LOCID_VALUE, MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getPointer(), MEDCoupling::DataArrayInt::New(), and MEDCoupling::MCAuto< T >::retn().

Referenced by computeMeshRestrictionFromTupleIds(), computeTupleIdsToSelectFromCellIds(), and getLocalizationOfDiscValues().

void MEDCouplingFieldDiscretizationGauss::reprQuickOverview ( std::ostream &  stream) const
virtual
void MEDCouplingFieldDiscretizationGauss::zipGaussLocalizations ( )
protected

This method makes the assumption that _discr_per_cell is set. This method reduces as much as possible number size of _loc. This method is useful when several set on same cells has been done and that some Gauss Localization are no more used.

References MEDCoupling::MEDCouplingFieldDiscretizationPerCell::_discr_per_cell, MEDCoupling::DataArrayTemplate< T >::begin(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), and MEDCoupling::DataArrayTemplate< T >::getPointer().

Referenced by setGaussLocalizationOnCells(), and setGaussLocalizationOnType().

int MEDCouplingFieldDiscretizationGauss::getOffsetOfCell ( int  cellId) const
protected
void MEDCouplingFieldDiscretizationGauss::checkLocalizationId ( int  locId) const
protected

Referenced by getGaussLocalization().

void MEDCouplingFieldDiscretizationGauss::commonUnserialization ( const std::vector< int > &  tinyInfo)
protected

Member Data Documentation