Version: 9.14.0
MEDCoupling::MEDCouplingFieldT< T > Class Template Referenceabstract
Inheritance diagram for MEDCoupling::MEDCouplingFieldT< T >:
Collaboration diagram for MEDCoupling::MEDCouplingFieldT< T >:

Public Member Functions

bool areCompatibleForDiv (const MEDCouplingField *other) const
 
bool areCompatibleForMul (const MEDCouplingField *other) const
 
bool areStrictlyCompatible (const MEDCouplingField *other) const
 
bool areStrictlyCompatibleForMulDiv (const MEDCouplingField *other) const
 
Traits< T >::FieldType * buildSubPart (const DataArrayIdType *part) const
 
Traits< T >::FieldType * buildSubPart (const mcIdType *partBg, const mcIdType *partEnd) const
 
Traits< T >::FieldType * buildSubPartRange (mcIdType begin, mcIdType end, mcIdType step) const
 
void checkConsistencyLight () const
 
void checkForUnserialization (const std::vector< mcIdType > &tinyInfoI, const DataArrayIdType *dataInt, const std::vector< typename Traits< T >::ArrayType * > &arrays)
 
virtual Traits< T >::FieldType * clone (bool recDeepCpy) const =0
 
Traits< T >::FieldType * cloneWithMesh (bool recDeepCpy) const
 
void copyAllTinyAttrFrom (const MEDCouplingFieldT< T > *other)
 
void copyTinyAttrFrom (const MEDCouplingFieldT< T > *other)
 
void copyTinyStringsFrom (const MEDCouplingField *other)
 
void finishUnserialization (const std::vector< mcIdType > &tinyInfoI, const std::vector< double > &tinyInfoD, const std::vector< std::string > &tinyInfoS)
 
Traits< T >::ArrayType * getArray ()
 
const Traits< T >::ArrayType * getArray () const
 
std::vector< typename Traits< T >::ArrayType * > getArrays () const
 
Traits< T >::ArrayType * getEndArray ()
 
const Traits< T >::ArrayType * getEndArray () const
 
double getEndTime (int &iteration, int &order) const
 
getIJ (mcIdType tupleId, std::size_t compoId) const
 
double getStartTime (int &iteration, int &order) const
 
double getTime (int &iteration, int &order) const
 
TypeOfTimeDiscretization getTimeDiscretization () const
 
double getTimeTolerance () const
 
std::string getTimeUnit () const
 
void getTinySerializationDbleInformation (std::vector< double > &tinyInfo) const
 
void getTinySerializationIntInformation (std::vector< mcIdType > &tinyInfo) const
 
void getTinySerializationStrInformation (std::vector< std::string > &tinyInfo) const
 
virtual bool isEqual (const MEDCouplingFieldT< T > *other, double meshPrec, T valsPrec) const
 
virtual bool isEqualIfNotWhy (const MEDCouplingFieldT< T > *other, double meshPrec, T valsPrec, std::string &reason) const
 
virtual bool isEqualWithoutConsideringStr (const MEDCouplingFieldT< T > *other, double meshPrec, T valsPrec) const
 
void renumberCells (const mcIdType *old2NewBg, bool check=true)
 
void renumberCellsWithoutMesh (const mcIdType *old2NewBg, bool check=true)
 
void reprQuickOverview (std::ostream &stream) const
 
void resizeForUnserialization (const std::vector< mcIdType > &tinyInfoI, DataArrayIdType *&dataInt, std::vector< typename Traits< T >::ArrayType * > &arrays)
 
void serialize (DataArrayIdType *&dataInt, std::vector< typename Traits< T >::ArrayType * > &arrays) const
 
void setArray (typename Traits< T >::ArrayType *array)
 
void setArrays (const std::vector< typename Traits< T >::ArrayType * > &arrs)
 
void setEndArray (typename Traits< T >::ArrayType *array)
 
void setEndIteration (int it)
 
void setEndOrder (int order)
 
void setEndTime (double val, int iteration, int order)
 
void setEndTimeValue (double val)
 
void setIteration (int it)
 
void setOrder (int order)
 
void setStartTime (double val, int iteration, int order)
 
void setTime (double val, int iteration, int order)
 
void setTimeTolerance (double val)
 
void setTimeUnit (const std::string &unit)
 
void setTimeValue (double val)
 
std::string simpleRepr () const
 
void synchronizeTimeWithMesh ()
 
const MEDCouplingTimeDiscretizationTemplate< T > * timeDiscrSafe () const
 
- Public Member Functions inherited from MEDCoupling::MEDCouplingField
virtual bool areCompatibleForMerge (const MEDCouplingField *other) const
 
MEDCouplingFieldDoublebuildMeasureField (bool isAbs) const
 
MEDCouplingMeshbuildSubMeshData (const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const
 
MEDCouplingMeshbuildSubMeshDataRange (mcIdType begin, mcIdType end, mcIdType step, mcIdType &beginOut, mcIdType &endOut, mcIdType &stepOut, DataArrayIdType *&di) const
 
void clearGaussLocalizations ()
 
DataArrayIdType * computeTupleIdsToSelectFromCellIds (const mcIdType *startCellIds, const mcIdType *endCellIds) const
 
void getCellIdsHavingGaussLocalization (int locId, std::vector< mcIdType > &cellIds) const
 
std::string getDescription () const
 
std::vector< const BigMemoryObject * > getDirectChildrenWithNull () const
 
MEDCouplingFieldDiscretizationgetDiscretization ()
 
const MEDCouplingFieldDiscretizationgetDiscretization () const
 
MEDCouplingGaussLocalizationgetGaussLocalization (int locId)
 
const MEDCouplingGaussLocalizationgetGaussLocalization (int locId) const
 
mcIdType getGaussLocalizationIdOfOneCell (mcIdType cellId) const
 
mcIdType getGaussLocalizationIdOfOneType (INTERP_KERNEL::NormalizedCellType type) const
 
std::set< mcIdType > getGaussLocalizationIdsOfOneType (INTERP_KERNEL::NormalizedCellType type) const
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
DataArrayDoublegetLocalizationOfDiscr () const
 
MEDCoupling::MEDCouplingMeshgetMesh ()
 
const MEDCoupling::MEDCouplingMeshgetMesh () const
 
std::string getName () const
 
NatureOfField getNature () const
 
mcIdType getNbOfGaussLocalization () const
 
mcIdType getNumberOfMeshPlacesExpected () const
 
mcIdType getNumberOfTuplesExpected () const
 
mcIdType getNumberOfTuplesExpectedRegardingCode (const std::vector< mcIdType > &code, const std::vector< const DataArrayIdType * > &idsPerType) const
 
TypeOfField getTypeOfField () const
 
void setDescription (const std::string &desc)
 
void setDiscretization (MEDCouplingFieldDiscretization *newDisc)
 
void setGaussLocalizationOnCells (const mcIdType *begin, const mcIdType *end, const std::vector< double > &refCoo, const std::vector< double > &gsCoo, const std::vector< double > &wg)
 
void setGaussLocalizationOnType (INTERP_KERNEL::NormalizedCellType type, const std::vector< double > &refCoo, const std::vector< double > &gsCoo, const std::vector< double > &wg)
 
void setMesh (const MEDCoupling::MEDCouplingMesh *mesh)
 
void setName (const std::string &name)
 
virtual void setNature (NatureOfField nat)
 
void updateTime () const
 
- Public Member Functions inherited from MEDCoupling::RefCountObjectOnly
bool decrRef () const
 
int getRCValue () const
 
void incrRef () const
 
RefCountObjectOnlyoperator= (const RefCountObjectOnly &other)
 
- Public Member Functions inherited from MEDCoupling::BigMemoryObject
std::string debugHeapMemorySize () const
 
std::vector< const BigMemoryObject * > getAllTheProgeny () const
 
virtual std::string getClassName () const
 
std::vector< const BigMemoryObject * > getDirectChildren () const
 
std::size_t getHeapMemorySize () const
 
std::string getHeapMemorySizeStr () const
 
bool isObjectInTheProgeny (const BigMemoryObject *obj) const
 
virtual ~BigMemoryObject ()
 
- Public Member Functions inherited from MEDCoupling::TimeLabel
void declareAsNew () const
 
std::size_t getTimeOfThis () const
 
TimeLabeloperator= (const TimeLabel &other)
 
 TimeLabel (const TimeLabel &other)=default
 

Protected Member Functions

 MEDCouplingFieldT (const MEDCouplingField &other, MEDCouplingTimeDiscretizationTemplate< T > *timeDiscr, bool deepCopy=true)
 
 MEDCouplingFieldT (const MEDCouplingFieldT< T > &other, bool deepCopy)
 
 MEDCouplingFieldT (MEDCouplingFieldDiscretization *type, NatureOfField n, MEDCouplingTimeDiscretizationTemplate< T > *timeDiscr)
 
 MEDCouplingFieldT (TypeOfField type, MEDCouplingTimeDiscretizationTemplate< T > *timeDiscr)
 
MEDCouplingTimeDiscretizationTemplate< T > * timeDiscrSafe ()
 
 ~MEDCouplingFieldT ()
 
- Protected Member Functions inherited from MEDCoupling::MEDCouplingField
bool isEqualIfNotWhyProtected (const MEDCouplingField *other, double meshPrec, std::string &reason) const
 
bool isEqualWithoutConsideringStrProtected (const MEDCouplingField *other, double meshPrec) const
 
 MEDCouplingField (const MEDCouplingField &other, bool deepCopy=true)
 
 MEDCouplingField (MEDCouplingFieldDiscretization *type, NatureOfField nature=NoNature)
 
 MEDCouplingField (TypeOfField type)
 
virtual ~MEDCouplingField ()
 
- 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

MEDCouplingTimeDiscretizationTemplate< T > * _time_discr
 
- Protected Attributes inherited from MEDCoupling::MEDCouplingField
std::string _desc
 
const MEDCouplingMesh_mesh
 
std::string _name
 
NatureOfField _nature
 
MCAuto< MEDCouplingFieldDiscretization_type
 

Additional Inherited Members

- Static Public Member Functions inherited from MEDCoupling::BigMemoryObject
static std::size_t GetHeapMemorySizeOfObjs (const std::vector< const BigMemoryObject * > &objs)
 

Constructor & Destructor Documentation

◆ MEDCouplingFieldT() [1/4]

template<class T >
MEDCoupling::MEDCouplingFieldT< T >::MEDCouplingFieldT ( const MEDCouplingFieldT< T > &  other,
bool  deepCopy 
)
protected

◆ MEDCouplingFieldT() [2/4]

template<class T >
MEDCoupling::MEDCouplingFieldT< T >::MEDCouplingFieldT ( const MEDCouplingField other,
MEDCouplingTimeDiscretizationTemplate< T > *  timeDiscr,
bool  deepCopy = true 
)
protected

◆ MEDCouplingFieldT() [3/4]

template<class T >
MEDCoupling::MEDCouplingFieldT< T >::MEDCouplingFieldT ( TypeOfField  type,
MEDCouplingTimeDiscretizationTemplate< T > *  timeDiscr 
)
protected

◆ MEDCouplingFieldT() [4/4]

template<class T >
MEDCoupling::MEDCouplingFieldT< T >::MEDCouplingFieldT ( MEDCouplingFieldDiscretization type,
NatureOfField  n,
MEDCouplingTimeDiscretizationTemplate< T > *  timeDiscr 
)
protected

◆ ~MEDCouplingFieldT()

template<class T >
MEDCoupling::MEDCouplingFieldT< T >::~MEDCouplingFieldT
protected

Member Function Documentation

◆ getTimeDiscretization()

template<class T >
TypeOfTimeDiscretization MEDCoupling::MEDCouplingFieldT< T >::getTimeDiscretization

Returns a type of time discretization of this field.

Returns
MEDCoupling::TypeOfTimeDiscretization - an enum item describing the time discretization type.

Referenced by MEDCoupling::MEDCouplingRemapper::reverseTransferField(), and MEDCoupling::MEDCouplingRemapper::transferField().

◆ clone()

template<class T >
virtual Traits<T>::FieldType* MEDCoupling::MEDCouplingFieldT< T >::clone ( bool  recDeepCpy) const
pure virtual

◆ checkConsistencyLight()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::checkConsistencyLight
virtual

Checks if this field is correctly defined, else an exception is thrown.

Exceptions
Ifthe mesh is not set.
Ifthe data array is not set.
Ifthe spatial discretization of this field is NULL.
Ifthis->getTimeTolerance() < 0.
Ifthe temporal discretization data is incorrect.
Ifmesh data does not correspond to field data.

Reimplemented from MEDCoupling::MEDCouplingField.

References MEDCoupling::MEDCouplingField::checkConsistencyLight().

Referenced by MEDCoupling::MEDCouplingRemapper::reverseTransfer(), MEDCoupling::MEDCouplingRemapper::reverseTransferField(), MEDCoupling::MEDCouplingFieldDouble::substractInPlaceDM(), and MEDCoupling::MEDCouplingRemapper::transferField().

◆ cloneWithMesh()

template<class T >
Traits< T >::FieldType * MEDCoupling::MEDCouplingFieldT< T >::cloneWithMesh ( bool  recDeepCpy) const

Returns a new MEDCouplingFieldDouble which is a copy of this one. The data of this field is copied either deep or shallow depending on recDeepCpy parameter. But the underlying mesh is always deep copied. Data that can be copied either deeply or shallow are:

This method behaves exactly like clone() except that here the underlying mesh is always deeply duplicated, whatever the value recDeepCpy parameter. The result of cloneWithMesh(true) is exactly the same as that of deepCopy(). So the resulting field can not be used together with this one in the methods like operator+(), operator*() etc. To avoid deep copying the underlying mesh, the user can call clone().

Parameters
[in]recDeepCpy- if true, the copy of the underlying data arrays is deep, else all data arrays of this field are shared by the new field.
Returns
MEDCouplingFieldDouble * - a new instance of MEDCouplingFieldDouble. The caller is to delete this field using decrRef() as it is no more needed.
See also
clone()

◆ buildSubPart() [1/2]

template<class T >
Traits< T >::FieldType * MEDCoupling::MEDCouplingFieldT< T >::buildSubPart ( const DataArrayIdType *  part) const

Builds a newly created field, that the caller will have the responsibility to deal with (decrRef()). This method makes the assumption that the field is correctly defined when this method is called, no check of this will be done. This method returns a restriction of this so that only tuples with ids specified in part will be contained in the returned field. Parameter part specifies cell ids whatever the spatial discretization of this ( ON_CELLS, ON_NODES, ON_GAUSS_PT, ON_GAUSS_NE, ON_NODES_KR, ON_NODES_FE).

For example, this is a field on cells lying on a mesh that have 10 cells, part contains following cell ids [3,7,6]. Then the returned field will lie on mesh having 3 cells and the returned field will contain 3 tuples.
Tuple #0 of the result field will refer to the cell #0 of returned mesh. The cell #0 of returned mesh will be equal to the cell #3 of this->getMesh().
Tuple #1 of the result field will refer to the cell #1 of returned mesh. The cell #1 of returned mesh will be equal to the cell #7 of this->getMesh().
Tuple #2 of the result field will refer to the cell #2 of returned mesh. The cell #2 of returned mesh will be equal to the cell #6 of this->getMesh().

Let, for example, this be a field on nodes lying on a mesh that have 10 cells and 11 nodes, and part contains following cellIds [3,7,6]. Thus this currently contains 11 tuples. If the restriction of mesh to 3 cells leads to a mesh with 6 nodes, then the returned field will contain 6 tuples and this field will lie on this restricted mesh.

Parameters
[in]part- an array of cell ids to include to the result field.
Returns
MEDCouplingFieldDouble * - a new instance of MEDCouplingFieldDouble. The caller is to delete this field using decrRef() as it is no more needed.

Here is a C++ example.
Here is a Python example.

See also
MEDCouplingFieldDouble::buildSubPartRange

◆ buildSubPart() [2/2]

template<class T >
Traits< T >::FieldType * MEDCoupling::MEDCouplingFieldT< T >::buildSubPart ( const mcIdType *  partBg,
const mcIdType *  partEnd 
) const

Builds a newly created field, that the caller will have the responsibility to deal with.
This method makes the assumption that this field is correctly defined when this method is called (this->checkConsistencyLight() returns without any exception thrown), no check of this will be done.
This method returns a restriction of this so that only tuple ids specified in [ partBg , partEnd ) will be contained in the returned field.
Parameter [partBg, partEnd ) specifies cell ids whatever the spatial discretization of this ( ON_CELLS, ON_NODES, ON_GAUSS_PT, ON_GAUSS_NE, ON_NODES_KR, ON_NODES_FE).

For example, this is a field on cells lying on a mesh that have 10 cells, partBg contains the following cell ids [3,7,6]. Then the returned field will lie on mesh having 3 cells and will contain 3 tuples.

  • Tuple #0 of the result field will refer to the cell #0 of returned mesh. The cell #0 of returned mesh will be equal to the cell #3 of this->getMesh().
  • Tuple #1 of the result field will refer to the cell #1 of returned mesh. The cell #1 of returned mesh will be equal to the cell #7 of this->getMesh().
  • Tuple #2 of the result field will refer to the cell #2 of returned mesh. The cell #2 of returned mesh will be equal to the cell #6 of this->getMesh().

    Let, for example, this be a field on nodes lying on a mesh that have 10 cells and 11 nodes, and partBg contains following cellIds [3,7,6]. Thus this currently contains 11 tuples. If the restriction of mesh to 3 cells leads to a mesh with 6 nodes, then the returned field will contain 6 tuples and this field will lie on this restricted mesh.

Parameters
[in]partBg- start (included) of input range of cell ids to select [ partBg, partEnd )
[in]partEnd- end (not included) of input range of cell ids to select [ partBg, partEnd )
Returns
a newly allocated field the caller should deal with.
Exceptions
ifthere is presence of an invalid cell id in [ partBg, partEnd ) regarding the number of cells of this->getMesh().

Here a C++ example.
Here a Python example.

See also
MEDCoupling::MEDCouplingFieldDouble::buildSubPart(const DataArrayInt *) const, MEDCouplingFieldDouble::buildSubPartRange

References MEDCoupling::MEDCouplingFieldDiscretization::clonePart().

◆ buildSubPartRange()

template<class T >
Traits< T >::FieldType * MEDCoupling::MEDCouplingFieldT< T >::buildSubPartRange ( mcIdType  begin,
mcIdType  end,
mcIdType  step 
) const

This method is equivalent to MEDCouplingFieldDouble::buildSubPart, the only difference is that the input range of cell ids is given using a range given begin, end and step to optimize the part computation.

See also
MEDCouplingFieldDouble::buildSubPart

References MEDCoupling::MEDCouplingFieldDiscretization::clonePartRange().

◆ setArray()

◆ setEndArray()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::setEndArray ( typename Traits< T >::ArrayType *  array)

◆ getArray() [1/2]

◆ getArray() [2/2]

template<class T >
Traits<T>::ArrayType* MEDCoupling::MEDCouplingFieldT< T >::getArray ( )

◆ getEndArray() [1/2]

template<class T >
const Traits<T>::ArrayType* MEDCoupling::MEDCouplingFieldT< T >::getEndArray ( ) const

◆ getEndArray() [2/2]

template<class T >
Traits<T>::ArrayType* MEDCoupling::MEDCouplingFieldT< T >::getEndArray ( )

◆ setArrays()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::setArrays ( const std::vector< typename Traits< T >::ArrayType * > &  arrs)

◆ getArrays()

template<class T >
std::vector<typename Traits<T>::ArrayType *> MEDCoupling::MEDCouplingFieldT< T >::getArrays ( ) const

◆ setTimeUnit()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::setTimeUnit ( const std::string &  unit)

◆ getTimeUnit()

◆ setTimeTolerance()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::setTimeTolerance ( double  val)

◆ getTimeTolerance()

template<class T >
double MEDCoupling::MEDCouplingFieldT< T >::getTimeTolerance ( ) const

◆ setIteration()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::setIteration ( int  it)

◆ setEndIteration()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::setEndIteration ( int  it)

◆ setOrder()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::setOrder ( int  order)

◆ setEndOrder()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::setEndOrder ( int  order)

◆ setTimeValue()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::setTimeValue ( double  val)

◆ setEndTimeValue()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::setEndTimeValue ( double  val)

◆ setTime()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::setTime ( double  val,
int  iteration,
int  order 
)

◆ synchronizeTimeWithMesh()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::synchronizeTimeWithMesh

This method synchronizes time information (time, iteration, order, time unit) regarding the information in this->_mesh.

Exceptions
Ifno mesh is set in this. Or if this is not compatible with time setting (typically NO_TIME)

Referenced by MEDCoupling::MEDCouplingCMesh::getMeasureField(), and MEDCoupling::MEDCouplingIMesh::getMeasureField().

◆ setStartTime()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::setStartTime ( double  val,
int  iteration,
int  order 
)

◆ setEndTime()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::setEndTime ( double  val,
int  iteration,
int  order 
)

◆ getTime()

template<class T >
double MEDCoupling::MEDCouplingFieldT< T >::getTime ( int &  iteration,
int &  order 
) const

◆ getStartTime()

template<class T >
double MEDCoupling::MEDCouplingFieldT< T >::getStartTime ( int &  iteration,
int &  order 
) const

◆ getEndTime()

template<class T >
double MEDCoupling::MEDCouplingFieldT< T >::getEndTime ( int &  iteration,
int &  order 
) const

◆ getIJ()

template<class T >
T MEDCoupling::MEDCouplingFieldT< T >::getIJ ( mcIdType  tupleId,
std::size_t  compoId 
) const

◆ isEqual()

template<class T >
bool MEDCoupling::MEDCouplingFieldT< T >::isEqual ( const MEDCouplingFieldT< T > *  other,
double  meshPrec,
valsPrec 
) const
virtual

◆ isEqualIfNotWhy()

template<class T >
bool MEDCoupling::MEDCouplingFieldT< T >::isEqualIfNotWhy ( const MEDCouplingFieldT< T > *  other,
double  meshPrec,
valsPrec,
std::string &  reason 
) const
virtual

◆ isEqualWithoutConsideringStr()

template<class T >
bool MEDCoupling::MEDCouplingFieldT< T >::isEqualWithoutConsideringStr ( const MEDCouplingFieldT< T > *  other,
double  meshPrec,
valsPrec 
) const
virtual

Checks equality of this and other field. Only numeric data is considered, i.e. names, description etc are not compared.

Parameters
[in]other- the field to compare with.
[in]meshPrec- a precision used to compare node coordinates of meshes.
[in]valsPrec- a precision used to compare data arrays of the two fields.
Returns
bool - true if the two fields are equal, false else.
Exceptions
Ifother == NULL.
Ifthe spatial discretization of this field is NULL.

References MEDCoupling::MEDCouplingFieldT< T >::_time_discr.

◆ copyTinyStringsFrom()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::copyTinyStringsFrom ( const MEDCouplingField other)
virtual

Copies tiny info (component names, name and description) from an other field to this one.

Warning
The underlying mesh is not renamed (for safety reason).
Parameters
[in]other- the field to copy the tiny info from.
Exceptions
Ifthis->getNumberOfComponents() != other->getNumberOfComponents()

Reimplemented from MEDCoupling::MEDCouplingField.

References MEDCoupling::MEDCouplingFieldT< T >::_time_discr, and MEDCoupling::MEDCouplingField::copyTinyStringsFrom().

◆ areStrictlyCompatible()

template<class T >
bool MEDCoupling::MEDCouplingFieldT< T >::areStrictlyCompatible ( const MEDCouplingField other) const
virtual

◆ areStrictlyCompatibleForMulDiv()

template<class T >
bool MEDCoupling::MEDCouplingFieldT< T >::areStrictlyCompatibleForMulDiv ( const MEDCouplingField other) const
virtual

This method is less strict than MEDCouplingField::areStrictlyCompatible method. The difference is that the nature is not checked. This method is used for multiplication and division on fields to operate a first check before attempting operation.

Reimplemented from MEDCoupling::MEDCouplingField.

References MEDCoupling::MEDCouplingFieldT< T >::_time_discr, and MEDCoupling::MEDCouplingField::areStrictlyCompatibleForMulDiv().

Referenced by MEDCoupling::MEDCouplingFieldDouble::CrossProductFields(), and MEDCoupling::MEDCouplingFieldDouble::DotFields().

◆ simpleRepr()

template<class T >
std::string MEDCoupling::MEDCouplingFieldT< T >::simpleRepr

Returns a string describing this field. This string is outputted by print Python command. The string includes info on

References MEDCoupling::MEDCouplingNatureOfField::GetReprNoThrow().

◆ reprQuickOverview()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::reprQuickOverview ( std::ostream &  stream) const
virtual

◆ areCompatibleForMul()

◆ areCompatibleForDiv()

template<class T >
bool MEDCoupling::MEDCouplingFieldT< T >::areCompatibleForDiv ( const MEDCouplingField other) const

Method with same principle than MEDCouplingFieldDouble::areStrictlyCompatibleForMulDiv method except that number of components between this and 'other' can be different here (for operator/).

References MEDCoupling::MEDCouplingFieldT< T >::_time_discr, and MEDCoupling::MEDCouplingField::areStrictlyCompatibleForMulDiv().

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

◆ copyTinyAttrFrom()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::copyTinyAttrFrom ( const MEDCouplingFieldT< T > *  other)

Copies only times, order and iteration from an other field to this one. The underlying mesh is not impacted by this method. Arrays are not impacted neither.

Parameters
[in]other- the field to tiny attributes from.
Exceptions
Ifthis->getNumberOfComponents() != other->getNumberOfComponents()

References MEDCoupling::MEDCouplingFieldT< T >::_time_discr.

◆ copyAllTinyAttrFrom()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::copyAllTinyAttrFrom ( const MEDCouplingFieldT< T > *  other)

◆ renumberCells()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::renumberCells ( const mcIdType *  old2NewBg,
bool  check = true 
)

Permutes values of this field according to a given permutation array for cells renumbering. The underlying mesh is deeply copied and its cells are also permuted. The number of cells remains the same; for that the permutation array old2NewBg should not contain equal ids. ** Warning, this method modifies the mesh aggreagated by this (by performing a deep copy ) **.

Parameters
[in]old2NewBg- the permutation array in "Old to New" mode. Its length is to be equal to this->getMesh()->getNumberOfCells().
[in]check- if true, old2NewBg is transformed to a new permutation array, so that its maximal cell id to correspond to (be less than) the number of cells in mesh. This new array is then used for the renumbering. If check == false, old2NewBg is used as is, that is less secure as validity of ids in old2NewBg is not checked.
Exceptions
Ifthe mesh is not set.
Ifthe spatial discretization of this field is NULL.
Ifcheck == true and old2NewBg contains equal ids.
Ifmesh nature does not allow renumbering (e.g. structured mesh).

Here is a C++ example.
Here is a Python example.

◆ renumberCellsWithoutMesh()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::renumberCellsWithoutMesh ( const mcIdType *  old2NewBg,
bool  check = true 
)

Permutes values of this field according to a given permutation array for cells renumbering. The underlying mesh is not permuted. The number of cells remains the same; for that the permutation array old2NewBg should not contain equal ids. This method performs a part of job of renumberCells(). The reasonable use of this method is only for multi-field instances lying on the same mesh to avoid a systematic duplication and renumbering of _mesh attribute.

Warning
Use this method with a lot of care!
Parameters
[in]old2NewBg- the permutation array in "Old to New" mode. Its length is to be equal to this->getMesh()->getNumberOfCells().
[in]check- if true, old2NewBg is transformed to a new permutation array, so that its maximal cell id to correspond to (be less than) the number of cells in mesh. This new array is then used for the renumbering. If check == false, old2NewBg is used as is, that is less secure as validity of ids in old2NewBg is not checked.
Exceptions
Ifthe mesh is not set.
Ifthe spatial discretization of this field is NULL.
Ifcheck == true and old2NewBg contains equal ids.
Ifmesh nature does not allow renumbering (e.g. structured mesh).

◆ getTinySerializationIntInformation()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::getTinySerializationIntInformation ( std::vector< mcIdType > &  tinyInfo) const

This method retrieves some critical values to resize and prepare remote instance. The first two elements returned in tinyInfo correspond to the parameters to give in constructor.

Parameters
tinyInfoout parameter resized correctly after the call. The length of this vector is tiny.

◆ getTinySerializationDbleInformation()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::getTinySerializationDbleInformation ( std::vector< double > &  tinyInfo) const

This method retrieves some critical values to resize and prepare remote instance.

Parameters
tinyInfoout parameter resized correctly after the call. The length of this vector is tiny.

◆ getTinySerializationStrInformation()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::getTinySerializationStrInformation ( std::vector< std::string > &  tinyInfo) const

◆ resizeForUnserialization()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::resizeForUnserialization ( const std::vector< mcIdType > &  tinyInfoI,
DataArrayIdType *&  dataInt,
std::vector< typename Traits< T >::ArrayType * > &  arrays 
)

This method has to be called to the new instance filled by CORBA, MPI, File...

Parameters
tinyInfoIis the value retrieves from distant result of getTinySerializationIntInformation on source instance to be copied.
dataIntout parameter. If not null the pointer is already owned by this after the call of this method. In this case no decrRef must be applied.
arraysout parameter is a vector resized to the right size. The pointers in the vector is already owned by this after the call of this method. No decrRef must be applied to every instances in returned vector.
See also
checkForUnserialization

◆ checkForUnserialization()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::checkForUnserialization ( const std::vector< mcIdType > &  tinyInfoI,
const DataArrayIdType *  dataInt,
const std::vector< typename Traits< T >::ArrayType * > &  arrays 
)

This method is extremely close to resizeForUnserialization except that here the arrays in dataInt and in arrays are attached in this after having checked that size is correct. This method is used in python pickeling context to avoid copy of data.

See also
resizeForUnserialization

◆ finishUnserialization()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::finishUnserialization ( const std::vector< mcIdType > &  tinyInfoI,
const std::vector< double > &  tinyInfoD,
const std::vector< std::string > &  tinyInfoS 
)

◆ serialize()

template<class T >
void MEDCoupling::MEDCouplingFieldT< T >::serialize ( DataArrayIdType *&  dataInt,
std::vector< typename Traits< T >::ArrayType * > &  arrays 
) const

Contrary to MEDCouplingPointSet class the returned arrays are not the responsibilities of the caller. The values returned must be consulted only in readonly mode.

◆ timeDiscrSafe() [1/2]

◆ timeDiscrSafe() [2/2]

template<class T >
MEDCouplingTimeDiscretizationTemplate< T > * MEDCoupling::MEDCouplingFieldT< T >::timeDiscrSafe
protected

Member Data Documentation

◆ _time_discr

template<class T >
MEDCouplingTimeDiscretizationTemplate<T>* MEDCoupling::MEDCouplingFieldT< T >::_time_discr
protected

Referenced by MEDCoupling::MEDCouplingFieldT< T >::areCompatibleForDiv(), MEDCoupling::MEDCouplingFieldT< T >::areCompatibleForMul(), MEDCoupling::MEDCouplingFieldT< T >::areStrictlyCompatible(), MEDCoupling::MEDCouplingFieldT< T >::areStrictlyCompatibleForMulDiv(), MEDCoupling::MEDCouplingFieldT< T >::copyTinyAttrFrom(), MEDCoupling::MEDCouplingFieldT< T >::copyTinyStringsFrom(), MEDCoupling::MEDCouplingFieldT< T >::getArray(), MEDCoupling::MEDCouplingFieldT< T >::getArrays(), MEDCoupling::MEDCouplingFieldT< T >::getEndArray(), MEDCoupling::MEDCouplingFieldT< T >::getEndTime(), MEDCoupling::MEDCouplingFieldT< T >::getStartTime(), MEDCoupling::MEDCouplingFieldT< T >::getTime(), MEDCoupling::MEDCouplingFieldT< T >::getTimeTolerance(), MEDCoupling::MEDCouplingFieldT< T >::getTimeUnit(), MEDCoupling::MEDCouplingFieldT< T >::isEqualIfNotWhy(), MEDCoupling::MEDCouplingFieldT< T >::isEqualWithoutConsideringStr(), MEDCoupling::MEDCouplingFieldT< T >::setArray(), MEDCoupling::MEDCouplingFieldT< T >::setArrays(), MEDCoupling::MEDCouplingFieldT< T >::setEndArray(), MEDCoupling::MEDCouplingFieldT< T >::setEndIteration(), MEDCoupling::MEDCouplingFieldT< T >::setEndOrder(), MEDCoupling::MEDCouplingFieldT< T >::setEndTime(), MEDCoupling::MEDCouplingFieldT< T >::setEndTimeValue(), MEDCoupling::MEDCouplingFieldT< T >::setIteration(), MEDCoupling::MEDCouplingFieldT< T >::setOrder(), MEDCoupling::MEDCouplingFieldT< T >::setStartTime(), MEDCoupling::MEDCouplingFieldT< T >::setTime(), MEDCoupling::MEDCouplingFieldT< T >::setTimeTolerance(), MEDCoupling::MEDCouplingFieldT< T >::setTimeUnit(), and MEDCoupling::MEDCouplingFieldT< T >::setTimeValue().