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

Public Member Functions

virtual bool areCompatibleForMerge (const MEDCouplingField *other) const
 
virtual bool areStrictlyCompatible (const MEDCouplingField *other) const
 
virtual bool areStrictlyCompatibleForMulDiv (const MEDCouplingField *other) const
 
MEDCouplingFieldDoublebuildMeasureField (bool isAbs) const
 
MEDCouplingMeshbuildSubMeshData (const int *start, const int *end, DataArrayInt *&di) const
 
MEDCouplingMeshbuildSubMeshDataRange (int begin, int end, int step, int &beginOut, int &endOut, int &stepOut, DataArrayInt *&di) const
 
virtual void checkConsistencyLight () const
 
void clearGaussLocalizations ()
 
DataArrayIntcomputeTupleIdsToSelectFromCellIds (const int *startCellIds, const int *endCellIds) const
 
virtual void copyTinyStringsFrom (const MEDCouplingField *other)
 
void getCellIdsHavingGaussLocalization (int locId, std::vector< int > &cellIds) const
 
std::string getDescription () const
 
std::vector< const
BigMemoryObject * > 
getDirectChildrenWithNull () const
 
const
MEDCouplingFieldDiscretization
getDiscretization () const
 
MEDCouplingFieldDiscretizationgetDiscretization ()
 
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
 
DataArrayDoublegetLocalizationOfDiscr () const
 
const
MEDCoupling::MEDCouplingMesh
getMesh () const
 
MEDCoupling::MEDCouplingMeshgetMesh ()
 
std::string getName () const
 
NatureOfField getNature () const
 
int getNbOfGaussLocalization () const
 
int getNumberOfMeshPlacesExpected () const
 
int getNumberOfTuplesExpected () const
 
int getNumberOfTuplesExpectedRegardingCode (const std::vector< int > &code, const std::vector< const DataArrayInt * > &idsPerType) const
 
TypeOfField getTypeOfField () const
 
virtual bool isEqual (const MEDCouplingField *other, double meshPrec, double valsPrec) const
 
virtual bool isEqualIfNotWhy (const MEDCouplingField *other, double meshPrec, double valsPrec, std::string &reason) const
 
virtual bool isEqualWithoutConsideringStr (const MEDCouplingField *other, double meshPrec, double valsPrec) const
 
virtual void reprQuickOverview (std::ostream &stream) const =0
 
void setDescription (const std::string &desc)
 
void setDiscretization (MEDCouplingFieldDiscretization *newDisc)
 
void setGaussLocalizationOnCells (const int *begin, const int *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::TimeLabel
void declareAsNew () const
 
std::size_t getTimeOfThis () const
 
TimeLabeloperator= (const TimeLabel &other)
 

Protected Member Functions

 MEDCouplingField (TypeOfField type)
 
 MEDCouplingField (const MEDCouplingField &other, bool deepCopy=true)
 
 MEDCouplingField (MEDCouplingFieldDiscretization *type, NatureOfField nature=NoNature)
 
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

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

MEDCouplingField::MEDCouplingField ( TypeOfField  type)
protected
MEDCouplingField::MEDCouplingField ( const MEDCouplingField other,
bool  deepCopy = true 
)
protected
MEDCouplingField::MEDCouplingField ( MEDCouplingFieldDiscretization type,
NatureOfField  nature = NoNature 
)
protected
MEDCouplingField::~MEDCouplingField ( )
protectedvirtual

Member Function Documentation

bool MEDCouplingField::areCompatibleForMerge ( const MEDCouplingField other) const
virtual

This method states if 'this' and 'other' are compatibles each other before performing any treatment. This method is good for methods like : mergeFields. This method is not very demanding compared to areStrictlyCompatible that is better for operation on fields.

Reimplemented in MEDCoupling::MEDCouplingFieldDouble.

References _mesh, _nature, _type, and MEDCoupling::MEDCouplingMesh::areCompatibleForMerge().

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

bool MEDCouplingField::areStrictlyCompatible ( const MEDCouplingField other) const
virtual

This method is more strict than MEDCouplingField::areCompatibleForMerge method. This method is used for operation on fields to operate a first check before attempting operation.

Reimplemented in MEDCoupling::MEDCouplingFieldT< T >, MEDCoupling::MEDCouplingFieldT< double >, and MEDCoupling::MEDCouplingFieldT< int >.

References _mesh, _nature, and _type.

Referenced by MEDCoupling::MEDCouplingFieldDouble::areCompatibleForMeld(), and MEDCoupling::MEDCouplingFieldT< T >::areStrictlyCompatible().

bool MEDCouplingField::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 in MEDCoupling::MEDCouplingFieldT< T >, MEDCoupling::MEDCouplingFieldT< double >, and MEDCoupling::MEDCouplingFieldT< int >.

References _mesh, and _type.

Referenced by MEDCoupling::MEDCouplingFieldT< T >::areCompatibleForDiv(), MEDCoupling::MEDCouplingFieldT< T >::areCompatibleForMul(), and MEDCoupling::MEDCouplingFieldT< T >::areStrictlyCompatibleForMulDiv().

bool MEDCouplingField::isEqualIfNotWhy ( const MEDCouplingField other,
double  meshPrec,
double  valsPrec,
std::string &  reason 
) const
virtual
bool MEDCouplingField::isEqual ( const MEDCouplingField other,
double  meshPrec,
double  valsPrec 
) const
virtual

Checks if this and another MEDCouplingField are fully equal.

Parameters
[in]other- the field to compare with this one.
[in]meshPrec- precision used to compare node coordinates of the underlying mesh.
[in]valsPrec- precision used to compare field values.
Returns
bool - true if the two fields are equal, false else.
Exceptions
Ifother is NULL.

References isEqualIfNotWhy().

bool MEDCouplingField::isEqualWithoutConsideringStr ( const MEDCouplingField other,
double  meshPrec,
double  valsPrec 
) const
virtual

Checks if this and another MEDCouplingField are equal. The textual information like names etc. is not considered.

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

Reimplemented in MEDCoupling::MEDCouplingFieldT< T >, MEDCoupling::MEDCouplingFieldT< double >, and MEDCoupling::MEDCouplingFieldT< int >.

References _mesh, _nature, _type, and MEDCoupling::MEDCouplingMesh::isEqualWithoutConsideringStr().

Referenced by MEDCoupling::MEDCouplingFieldT< T >::isEqualWithoutConsideringStr().

void MEDCouplingField::copyTinyStringsFrom ( const MEDCouplingField other)
virtual

Copy tiny info (component names, name, description) but warning the underlying mesh is not renamed (for safety reason).

Reimplemented in MEDCoupling::MEDCouplingFieldT< T >, MEDCoupling::MEDCouplingFieldT< double >, and MEDCoupling::MEDCouplingFieldT< int >.

References _desc, _name, setDescription(), and setName().

Referenced by MEDCoupling::MEDCouplingFieldT< T >::copyTinyStringsFrom().

void MEDCouplingField::setMesh ( const MEDCoupling::MEDCouplingMesh mesh)

Sets the underlying mesh of this field. For examples of field construction, see Building a field from scratch.

Parameters
[in]mesh- the new underlying mesh.

References _mesh, MEDCoupling::TimeLabel::declareAsNew(), MEDCoupling::RefCountObjectOnly::decrRef(), MEDCoupling::RefCountObjectOnly::incrRef(), and MEDCoupling::TimeLabel::updateTimeWith().

Referenced by MEDCoupling::MEDCouplingFieldDouble::AddFields(), MEDCoupling::MEDCouplingCartesianAMRMeshGen::buildCellFieldOnRecurseWithoutOverlapWithoutGhost(), MEDCoupling::MEDCouplingAMRAttribute::buildCellFieldOnWithoutGhost(), MEDCoupling::MEDCouplingUMesh::buildDirectionVectorField(), MEDCoupling::MEDCouplingFieldDouble::buildNewTimeReprFromThis(), MEDCoupling::MEDCouplingStructuredMesh::buildOrthogonalField(), MEDCoupling::MEDCoupling1GTUMesh::buildOrthogonalField(), MEDCoupling::MEDCouplingCurveLinearMesh::buildOrthogonalField(), MEDCoupling::MEDCouplingUMesh::buildOrthogonalField(), MEDCoupling::MEDCouplingUMesh::buildPartOrthogonalField(), MEDCoupling::MEDCouplingFieldDouble::buildSubPart(), MEDCoupling::MEDCouplingFieldDouble::buildSubPartRange(), MEDCoupling::MEDCouplingFieldDouble::changeUnderlyingMesh(), MEDCoupling::MEDCoupling1SGTUMesh::computeDiameterField(), MEDCoupling::MEDCouplingUMesh::computeDiameterField(), MEDCoupling::MEDCouplingFieldDouble::computeVectorFieldCyl(), MEDCoupling::MEDCouplingFieldDouble::convertQuadraticCellsToLinear(), MEDCoupling::MEDCouplingFieldDouble::CrossProductFields(), MEDCoupling::MEDCouplingFieldDouble::determinant(), MEDCoupling::MEDCouplingFieldDouble::deviator(), MEDCoupling::MEDCouplingFieldDouble::DivideFields(), MEDCoupling::MEDCouplingFieldDouble::DotFields(), MEDCoupling::MEDCouplingFieldDouble::doublyContractedProduct(), MEDCoupling::MEDCouplingFieldDouble::eigenValues(), MEDCoupling::MEDCouplingFieldDouble::eigenVectors(), MEDCoupling::MEDCouplingMesh::fillFromAnalytic(), MEDCoupling::MEDCouplingMesh::fillFromAnalyticCompo(), MEDCoupling::MEDCouplingMesh::fillFromAnalyticNamedCompo(), MEDCoupling::MEDCouplingUMesh::getAspectRatioField(), MEDCoupling::MEDCouplingUMesh::getEdgeRatioField(), MEDCoupling::MEDCoupling1GTUMesh::getMeasureField(), MEDCoupling::MEDCouplingCurveLinearMesh::getMeasureField(), MEDCoupling::MEDCouplingCMesh::getMeasureField(), MEDCoupling::MEDCouplingIMesh::getMeasureField(), MEDCoupling::MEDCouplingUMesh::getMeasureField(), MEDCoupling::MEDCouplingFieldDiscretizationGauss::getMeasureField(), MEDCoupling::MEDCouplingFieldDiscretizationGaussNE::getMeasureField(), MEDCoupling::MEDCoupling1GTUMesh::getMeasureFieldOnNode(), MEDCoupling::MEDCouplingUMesh::getMeasureFieldOnNode(), MEDCoupling::MEDCouplingUMesh::getSkewField(), MEDCoupling::MEDCouplingUMesh::getWarpField(), MEDCoupling::MEDCouplingFieldDouble::inverse(), MEDCoupling::MEDCouplingFieldDouble::keepSelectedComponents(), MEDCoupling::MEDCouplingFieldDouble::magnitude(), MEDCoupling::MEDCouplingFieldDouble::MaxFields(), MEDCoupling::MEDCouplingFieldDouble::maxPerTuple(), MEDCoupling::MEDCouplingFieldDouble::MeldFields(), MEDCoupling::MEDCouplingFieldDouble::MergeFields(), MEDCoupling::MEDCouplingFieldDouble::mergeNodes(), MEDCoupling::MEDCouplingFieldDouble::mergeNodesCenter(), MEDCoupling::MEDCouplingFieldDouble::MinFields(), MEDCoupling::MEDCouplingFieldDouble::MultiplyFields(), MEDCoupling::MEDCouplingFieldDouble::negate(), MEDCoupling::ParaFIELD::ParaFIELD(), MEDCoupling::MEDCouplingFieldDouble::PowFields(), MEDCoupling::MEDCouplingRemapper::prepare(), MEDCoupling::ReadFieldsOnSameMesh(), MEDCoupling::MEDCouplingFieldDouble::renumberCells(), MEDCoupling::MEDCouplingFieldDouble::renumberNodes(), MEDCoupling::MEDCouplingFieldDouble::simplexize(), MEDCoupling::MEDCouplingFieldDouble::SubstractFields(), MEDCoupling::MEDCouplingFieldDouble::trace(), MEDCoupling::MEDCouplingFieldDouble::zipConnectivity(), and MEDCoupling::MEDCouplingFieldDouble::zipCoords().

const MEDCoupling::MEDCouplingMesh* MEDCoupling::MEDCouplingField::getMesh ( ) const

References _mesh.

Referenced by MEDCoupling::MEDCouplingFieldDouble::AddFields(), MEDCoupling::DisjointDEC::attachLocalField(), MEDCoupling::OverlapDEC::attachSourceLocalField(), MEDCoupling::OverlapDEC::attachTargetLocalField(), MEDCoupling::MEDCouplingFieldDouble::buildNewTimeReprFromThis(), MEDCoupling::MEDCouplingFieldDouble::cellToNodeDiscretization(), MEDCoupling::MEDCouplingFieldDouble::computeVectorFieldCyl(), MEDCoupling::MEDCouplingFieldDouble::convertQuadraticCellsToLinear(), MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::copyTinyInfoFrom(), MEDCoupling::MEDFileAnyTypeFieldMultiTSWithoutSDA::copyTinyInfoFrom(), MEDCoupling::MEDCouplingFieldDouble::CrossProductFields(), MEDCoupling::MEDCouplingFieldDouble::determinant(), MEDCoupling::MEDCouplingFieldDouble::deviator(), MEDCoupling::MEDCouplingFieldDouble::DivideFields(), MEDCoupling::MEDCouplingFieldDouble::DotFields(), MEDCoupling::MEDCouplingFieldDouble::doublyContractedProduct(), MEDCoupling::MEDCouplingFieldDouble::eigenValues(), MEDCoupling::MEDCouplingFieldDouble::eigenVectors(), MEDCoupling::MEDCouplingFieldDouble::extractSlice3D(), MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::getFieldOnMeshAtLevel(), MEDCoupling::MEDCouplingFieldDouble::inverse(), MEDCoupling::MEDCouplingFieldDouble::keepSelectedComponents(), MEDCoupling::MEDCouplingFieldDouble::magnitude(), MEDCoupling::MEDCouplingFieldDouble::MaxFields(), MEDCoupling::MEDCouplingFieldDouble::maxPerTuple(), MEDCoupling::MEDCouplingFieldDouble::MeldFields(), MEDCoupling::MEDCouplingFieldDouble::MergeFields(), MEDCoupling::MEDCouplingFieldDouble::MinFields(), MEDCoupling::MEDCouplingFieldDouble::MultiplyFields(), MEDCoupling::MEDCouplingFieldDouble::negate(), MEDCoupling::MEDCouplingFieldDouble::nodeToCellDiscretization(), MEDCoupling::MEDCouplingFieldDouble::PowFields(), MEDCoupling::MEDCouplingRemapper::prepareEx(), MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::setFieldNoProfileSBT(), MEDCoupling::MEDCouplingFieldDouble::SubstractFields(), MEDCoupling::MEDCouplingFieldDouble::substractInPlaceDM(), MEDCoupling::MEDCouplingFieldDouble::trace(), MEDCoupling::MEDCouplingFieldDouble::voronoize(), MEDCoupling::WriteField(), MEDCoupling::WriteFieldUsingAlreadyWrittenMesh(), and MEDCoupling::MEDCouplingFieldDouble::WriteVTK().

MEDCoupling::MEDCouplingMesh* MEDCoupling::MEDCouplingField::getMesh ( )

References _mesh.

void MEDCoupling::MEDCouplingField::setName ( const std::string &  name)
void MEDCoupling::MEDCouplingField::setDescription ( const std::string &  desc)
NatureOfField MEDCouplingField::getNature ( ) const

Returns the nature of this field. This information is very important during interpolation process using MEDCoupling::MEDCouplingRemapper or MEDCoupling::InterpKernelDEC. In other context than the two mentioned above, this attribute is unimportant. This attribute is not stored in the MED file. For more information of the semantics and the influence of this attribute to the result of interpolation, see

References _nature.

Referenced by MEDCoupling::MEDCouplingFieldDouble::AddFields(), MEDCoupling::MEDCouplingFieldDouble::buildNewTimeReprFromThis(), MEDCoupling::MEDCouplingFieldDouble::computeVectorFieldCyl(), MEDCoupling::MEDCouplingFieldDouble::determinant(), MEDCoupling::MEDCouplingFieldDouble::deviator(), MEDCoupling::MEDCouplingFieldDouble::doublyContractedProduct(), MEDCoupling::MEDCouplingFieldDouble::eigenValues(), MEDCoupling::MEDCouplingFieldDouble::eigenVectors(), MEDCoupling::MEDCouplingFieldDouble::inverse(), MEDCoupling::MEDCouplingFieldDouble::keepSelectedComponents(), MEDCoupling::MEDCouplingFieldDouble::magnitude(), MEDCoupling::MEDCouplingFieldDouble::MaxFields(), MEDCoupling::MEDCouplingFieldDouble::maxPerTuple(), MEDCoupling::MEDCouplingFieldDouble::MeldFields(), MEDCoupling::MEDCouplingFieldDouble::MergeFields(), MEDCoupling::MEDCouplingFieldDouble::MinFields(), MEDCoupling::MEDCouplingFieldDouble::negate(), MEDCoupling::MEDCouplingRemapper::reverseTransfer(), MEDCoupling::MEDCouplingRemapper::reverseTransferField(), MEDCoupling::MEDCouplingFieldDouble::SubstractFields(), MEDCoupling::MEDCouplingFieldDouble::trace(), and MEDCoupling::MEDCouplingRemapper::transferField().

void MEDCouplingField::setNature ( NatureOfField  nat)
virtual

Sets the nature of this field. This information is very important during interpolation process using MEDCoupling::MEDCouplingRemapper or MEDCoupling::InterpKernelDEC. In other context than the two mentioned above, this attribute is unimportant. This attribute is not stored in the MED file. For more information of the semantics and the influence of this attribute to the result of interpolation, see

Parameters
[in]nat- the nature of this field.
Exceptions
Ifnat has an invalid value.

References _nature, _type, and MEDCoupling::MEDCouplingNatureOfField::GetRepr().

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

DataArrayDouble * MEDCouplingField::getLocalizationOfDiscr ( ) const

Returns coordinates of field location points that depend on spatial discretization of this field.

  • For a field on nodes, returns coordinates of nodes.
  • For a field on cells, returns barycenters of cells.
  • For a field on gauss points, returns coordinates of gauss points.
Returns
DataArrayDouble * - a new instance of DataArrayDouble. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthe spatial discretization of this field is NULL.
Ifthe mesh is not set.

References _mesh, and _type.

MEDCouplingFieldDouble * MEDCouplingField::buildMeasureField ( bool  isAbs) const

Returns a new MEDCouplingFieldDouble containing volumes of cells of a dual mesh whose cells are constructed around field location points (getLocalizationOfDiscr()) of this field. (In case of a field on cells, the dual mesh coincides with the underlying mesh).
For 1D cells, the returned field contains lengths.
For 2D cells, the returned field contains areas.
For 3D cells, the returned field contains volumes.

Parameters
[in]isAbs- if true, the computed cell volume does not reflect cell orientation, i.e. the volume is always positive.
Returns
MEDCouplingFieldDouble * - a new instance of MEDCouplingFieldDouble. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthe mesh is not set.
Ifthe spatial discretization of this field is NULL.
Ifthe spatial discretization of this field is not well defined.

References _mesh, and _type.

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

MEDCouplingMesh * MEDCouplingField::buildSubMeshData ( const int *  start,
const int *  end,
DataArrayInt *&  di 
) const

Returns a new MEDCouplingMesh constituted by some cells of the underlying mesh of this field, and returns ids of entities (nodes, cells, Gauss points) lying on the specified cells. The cells to include to the result mesh are specified by an array of cell ids. The new mesh shares the coordinates array with the underlying mesh.

Parameters
[in]start- an array of cell ids to include to the result mesh.
[in]end- specifies the end of the array start, so that the last value of start is end[ -1 ].
[out]di- a new instance of DataArrayInt holding the ids of entities (nodes, cells, Gauss points). The caller is to delete this array using decrRef() as it is no more needed.
Returns
MEDCouplingMesh * - a new instance of MEDCouplingMesh. The caller is to delete this mesh using decrRef() as it is no more needed.
Exceptions
Ifthe spatial discretization of this field is NULL.
Ifthe mesh is not set.
See Also
buildSubMeshDataRange()

References _mesh, and _type.

MEDCouplingMesh * MEDCouplingField::buildSubMeshDataRange ( int  begin,
int  end,
int  step,
int &  beginOut,
int &  endOut,
int &  stepOut,
DataArrayInt *&  di 
) const

This method returns a submesh of 'mesh' instance constituting cell ids defined by a range given by the 3 following inputs begin, end and step.

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
MEDCouplingField::buildSubMeshData

References _mesh, and _type.

DataArrayInt * MEDCouplingField::computeTupleIdsToSelectFromCellIds ( const int *  startCellIds,
const int *  endCellIds 
) const

This method returns tuples ids implied by the mesh selection of the cell ids contained in array defined as an interval [start;end).

Returns
a newly allocated DataArrayInt instance containing tuples ids.

References _mesh, and _type.

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

MEDCouplingFieldDiscretization* MEDCoupling::MEDCouplingField::getDiscretization ( )

References _type.

int MEDCouplingField::getNumberOfTuplesExpected ( ) const

Returns number of tuples expected regarding the spatial discretization of this field and number of entities in the underlying mesh. This method behaves exactly as MEDCouplingFieldDouble::getNumberOfTuples.

Returns
int - the number of expected tuples.
Exceptions
Ifthe spatial discretization of this field is NULL.
Ifthe mesh is not set.

References _mesh, and _type.

Referenced by MEDCoupling::MEDCouplingRemapper::reverseTransfer().

int MEDCouplingField::getNumberOfMeshPlacesExpected ( ) const

Returns number of mesh entities in the underlying mesh of this field regarding the spatial discretization.

Returns
int - the number of mesh entities porting the field values.
Exceptions
Ifthe spatial discretization of this field is NULL.
Ifthe mesh is not set.

References _mesh, and _type.

void MEDCouplingField::setGaussLocalizationOnType ( INTERP_KERNEL::NormalizedCellType  type,
const std::vector< double > &  refCoo,
const std::vector< double > &  gsCoo,
const std::vector< double > &  wg 
)

Sets localization of Gauss points for a given geometric type of cell.

Parameters
[in]type- the geometric type of cell for which the Gauss localization is set.
[in]refCoo- coordinates of points of the reference cell. Size of this vector must be nbOfNodesPerCell * dimOfType.
[in]gsCoo- coordinates of Gauss points on the reference cell. Size of this vector must be wg.size() * dimOfType.
[in]wg- the weights of Gauss points.
Exceptions
Ifthis field is not on Gauss points.
Ifthe spatial discretization of this field is NULL.
Ifthe mesh is not set.
Ifsize of any vector do not match the type.

References _mesh, and _type.

void MEDCouplingField::setGaussLocalizationOnCells ( const int *  begin,
const int *  end,
const std::vector< double > &  refCoo,
const std::vector< double > &  gsCoo,
const std::vector< double > &  wg 
)

Sets localization of Gauss points for given cells specified by their ids.

Parameters
[in]begin- an array of cell ids of interest.
[in]end- the end of begin, i.e. a pointer to its (last+1)-th element.
[in]refCoo- coordinates of points of the reference cell. Size of this vector must be nbOfNodesPerCell * dimOfType.
[in]gsCoo- coordinates of Gauss points on the reference cell. Size of this vector must be wg.size() * dimOfType.
[in]wg- the weights of Gauss points.
Exceptions
Ifthis field is not on Gauss points.
Ifthe spatial discretization of this field is NULL.
Ifthe mesh is not set.
Ifsize of any vector do not match the type of cell # begin[0].
Iftype of any cell in begin differs from that of cell # begin[0].
Ifthe range [begin,end) is empty.

References _mesh, and _type.

void MEDCouplingField::clearGaussLocalizations ( )

Clears data on Gauss points localization.

Exceptions
Ifthis field is not on Gauss points.
Ifthe spatial discretization of this field is NULL.

References _type.

MEDCouplingGaussLocalization & MEDCouplingField::getGaussLocalization ( int  locId)

Returns a reference to the Gauss localization object by its id.

Warning
This method is not const, so the returned object can be modified without any problem.
Parameters
[in]locId- the id of the Gauss localization object of interest. It must be in range 0 <= locId < getNbOfGaussLocalization() .
Returns
MEDCouplingGaussLocalization & - the Gauss localization object.
Exceptions
Ifthis field is not on Gauss points.
IflocId is not within the valid range.
Ifthe spatial discretization of this field is NULL.

References _type.

int MEDCouplingField::getGaussLocalizationIdOfOneType ( INTERP_KERNEL::NormalizedCellType  type) const

Returns an id of the Gauss localization object corresponding to a given cell type.

Parameters
[in]type- the cell type of interest.
Returns
int - the id of the Gauss localization object.
Exceptions
Ifthis field is not on Gauss points.
Ifthe spatial discretization of this field is NULL.
Ifno Gauss localization object found for the given cell type.
Ifmore than one Gauss localization object found for the given cell type.

References _type.

std::set< int > MEDCouplingField::getGaussLocalizationIdsOfOneType ( INTERP_KERNEL::NormalizedCellType  type) const

Returns ids of Gauss localization objects corresponding to a given cell type.

Parameters
[in]type- the cell type of interest.
Returns
std::set<int> - ids of the Gauss localization object.
Exceptions
Ifthis field is not on Gauss points.
Ifthe spatial discretization of this field is NULL

References _type.

int MEDCouplingField::getNbOfGaussLocalization ( ) const

Returns number of Gauss localization objects available. Implicitly all ids in [0,getNbOfGaussLocalization()) are valid Gauss localization ids.

Returns
int - the number of available Gauss localization objects.
Exceptions
Ifthis field is not on Gauss points.
Ifthe spatial discretization of this field is NULL.

References _type.

int MEDCouplingField::getGaussLocalizationIdOfOneCell ( int  cellId) const

Returns an id of the Gauss localization object corresponding to a type of a given cell.

Parameters
[in]cellId- an id of the cell of interest.
Returns
int - the id of the Gauss localization object.
Exceptions
Ifthis field is not on Gauss points.
Ifthe spatial discretization of this field is NULL.
Ifno Gauss localization object found for the given cell.

References _type.

void MEDCouplingField::getCellIdsHavingGaussLocalization ( int  locId,
std::vector< int > &  cellIds 
) const

Returns ids of cells that share the same Gauss localization given by its id.

Parameters
[in]locId- the id of the Gauss localization object of interest. It must be in range 0 <= locId < getNbOfGaussLocalization() .
[in,out]cellIds- a vector returning ids of found cells. It is cleared before filling in. It remains empty if no cells found.
Exceptions
Ifthis field is not on Gauss points.
IflocId is not within the valid range.
Ifthe spatial discretization of this field is NULL.

References _type.

const MEDCouplingGaussLocalization & MEDCouplingField::getGaussLocalization ( int  locId) const

Returns a reference to the Gauss localization object by its id.

Warning
This method is const, so the returned object is not apt for modification.
Parameters
[in]locId- the id of the Gauss localization object of interest. It must be in range 0 <= locId < getNbOfGaussLocalization() .
Returns
const MEDCouplingGaussLocalization & - the Gauss localization object.
Exceptions
Ifthis field is not on Gauss points.
IflocId is not within the valid range.
Ifthe spatial discretization of this field is NULL.

References _type.

void MEDCouplingField::updateTime ( ) const
virtual

This method should be called on high level classes as Field or Mesh to take into acount modifications done in aggregates objects.

Implements MEDCoupling::TimeLabel.

Reimplemented in MEDCoupling::MEDCouplingFieldDouble.

References _mesh, _type, and MEDCoupling::TimeLabel::updateTimeWith().

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

std::size_t MEDCouplingField::getHeapMemorySizeWithoutChildren ( ) const
virtual
std::vector< const BigMemoryObject * > MEDCouplingField::getDirectChildrenWithNull ( ) const
virtual
int MEDCouplingField::getNumberOfTuplesExpectedRegardingCode ( const std::vector< int > &  code,
const std::vector< const DataArrayInt * > &  idsPerType 
) const

This method computes the number of tuples a DataArrayDouble instance should have to build a correct MEDCouplingFieldDouble instance starting from a submesh of a virtual mesh on which a substraction per type had been applied regarding the spatial discretization in this.

For spatial discretization not equal to ON_GAUSS_NE this method will make the hypothesis that any positive entity id in code idsPerType is valid. So in those cases attribute _mesh of this is ignored.

For spatial discretization equal to ON_GAUSS_NE _mesh attribute will be taken into account.

The input code is those implemented in MEDCouplingUMesh::splitProfilePerType.

Parameters
[in]code- a code with format described above.
[in]idsPerType- a list of subparts
Exceptions
Ifthis has no spatial discretization set.
Ifinput code point to invalid zones in spatial discretization.
Ifspatial discretization in this requires a mesh and those mesh is invalid (null,...)

References _type, and MEDCoupling::MEDCouplingFieldDiscretization::getNumberOfTuplesExpectedRegardingCode().

Referenced by MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::setFieldProfile().

virtual void MEDCoupling::MEDCouplingField::reprQuickOverview ( std::ostream &  stream) const
pure virtual

Member Data Documentation

const MEDCouplingMesh* MEDCoupling::MEDCouplingField::_mesh
protected

Referenced by MEDCoupling::MEDCouplingFieldDouble::advancedRepr(), MEDCoupling::MEDCouplingFieldDouble::applyFunc(), areCompatibleForMerge(), areStrictlyCompatible(), areStrictlyCompatibleForMulDiv(), buildMeasureField(), buildSubMeshData(), buildSubMeshDataRange(), MEDCoupling::MEDCouplingFieldDouble::buildSubPart(), MEDCoupling::MEDCouplingFieldDouble::buildSubPartRange(), MEDCoupling::MEDCouplingFieldDouble::changeUnderlyingMesh(), checkConsistencyLight(), MEDCoupling::MEDCouplingFieldTemplate::checkConsistencyLight(), computeTupleIdsToSelectFromCellIds(), MEDCoupling::MEDCouplingFieldDouble::fillFromAnalytic(), MEDCoupling::MEDCouplingFieldDouble::fillFromAnalyticCompo(), MEDCoupling::MEDCouplingFieldDouble::fillFromAnalyticNamedCompo(), getDirectChildrenWithNull(), MEDCoupling::MEDCouplingFieldDouble::getIJK(), getLocalizationOfDiscr(), getMesh(), getNumberOfMeshPlacesExpected(), MEDCoupling::MEDCouplingFieldDouble::getNumberOfTuples(), getNumberOfTuplesExpected(), MEDCoupling::MEDCouplingFieldDouble::getValueOn(), MEDCoupling::MEDCouplingFieldDouble::getValueOnMulti(), MEDCoupling::MEDCouplingFieldDouble::getValueOnPos(), MEDCoupling::MEDCouplingFieldDouble::integral(), isEqualIfNotWhy(), isEqualWithoutConsideringStr(), MEDCouplingField(), MEDCoupling::MEDCouplingFieldDouble::mergeNodes(), MEDCoupling::MEDCouplingFieldDouble::mergeNodesCenter(), MEDCoupling::MEDCouplingFieldDouble::normL1(), MEDCoupling::MEDCouplingFieldDouble::normL2(), MEDCoupling::MEDCouplingFieldDouble::operator=(), MEDCoupling::MEDCouplingFieldDouble::renumberCells(), MEDCoupling::MEDCouplingFieldDouble::renumberCellsWithoutMesh(), MEDCoupling::MEDCouplingFieldDouble::renumberNodes(), MEDCoupling::MEDCouplingFieldTemplate::reprQuickOverview(), setGaussLocalizationOnCells(), setGaussLocalizationOnType(), setMesh(), MEDCoupling::MEDCouplingFieldTemplate::simpleRepr(), MEDCoupling::MEDCouplingFieldDouble::simplexize(), MEDCoupling::MEDCouplingFieldDouble::synchronizeTimeWithSupport(), updateTime(), MEDCoupling::MEDCouplingFieldDouble::zipConnectivity(), MEDCoupling::MEDCouplingFieldDouble::zipCoords(), and ~MEDCouplingField().

MCAuto<MEDCouplingFieldDiscretization> MEDCoupling::MEDCouplingField::_type
protected

Referenced by MEDCoupling::MEDCouplingFieldDouble::AddFields(), MEDCoupling::MEDCouplingFieldDouble::advancedRepr(), MEDCoupling::MEDCouplingFieldDouble::applyFunc(), areCompatibleForMerge(), areStrictlyCompatible(), areStrictlyCompatibleForMulDiv(), buildMeasureField(), MEDCoupling::MEDCouplingFieldDouble::buildNewTimeReprFromThis(), buildSubMeshData(), buildSubMeshDataRange(), MEDCoupling::MEDCouplingFieldDouble::buildSubPart(), MEDCoupling::MEDCouplingFieldDouble::buildSubPartRange(), checkConsistencyLight(), MEDCoupling::MEDCouplingFieldDouble::checkForUnserialization(), clearGaussLocalizations(), computeTupleIdsToSelectFromCellIds(), MEDCoupling::MEDCouplingFieldDouble::computeVectorFieldCyl(), MEDCoupling::MEDCouplingFieldDouble::CrossProductFields(), MEDCoupling::MEDCouplingFieldDouble::determinant(), MEDCoupling::MEDCouplingFieldDouble::deviator(), MEDCoupling::MEDCouplingFieldDouble::DivideFields(), MEDCoupling::MEDCouplingFieldDouble::DotFields(), MEDCoupling::MEDCouplingFieldDouble::doublyContractedProduct(), MEDCoupling::MEDCouplingFieldDouble::eigenValues(), MEDCoupling::MEDCouplingFieldDouble::eigenVectors(), MEDCoupling::MEDCouplingFieldDouble::fillFromAnalytic(), MEDCoupling::MEDCouplingFieldDouble::fillFromAnalyticCompo(), MEDCoupling::MEDCouplingFieldDouble::fillFromAnalyticNamedCompo(), MEDCoupling::MEDCouplingFieldTemplate::finishUnserialization(), MEDCoupling::MEDCouplingFieldDouble::finishUnserialization(), getCellIdsHavingGaussLocalization(), getDirectChildrenWithNull(), getDiscretization(), getGaussLocalization(), getGaussLocalizationIdOfOneCell(), getGaussLocalizationIdOfOneType(), getGaussLocalizationIdsOfOneType(), MEDCoupling::MEDCouplingFieldDouble::getIJK(), getLocalizationOfDiscr(), getNbOfGaussLocalization(), getNumberOfMeshPlacesExpected(), MEDCoupling::MEDCouplingFieldDouble::getNumberOfTuples(), getNumberOfTuplesExpected(), getNumberOfTuplesExpectedRegardingCode(), MEDCoupling::MEDCouplingFieldTemplate::getTinySerializationDbleInformation(), MEDCoupling::MEDCouplingFieldDouble::getTinySerializationDbleInformation(), MEDCoupling::MEDCouplingFieldTemplate::getTinySerializationIntInformation(), MEDCoupling::MEDCouplingFieldDouble::getTinySerializationIntInformation(), getTypeOfField(), MEDCoupling::MEDCouplingFieldDouble::getValueOn(), MEDCoupling::MEDCouplingFieldDouble::getValueOnMulti(), MEDCoupling::MEDCouplingFieldDouble::getValueOnPos(), MEDCoupling::MEDCouplingFieldDouble::integral(), MEDCoupling::MEDCouplingFieldDouble::inverse(), isEqualIfNotWhy(), isEqualWithoutConsideringStr(), MEDCoupling::MEDCouplingFieldDouble::keepSelectedComponents(), MEDCoupling::MEDCouplingFieldDouble::magnitude(), MEDCoupling::MEDCouplingFieldDouble::MaxFields(), MEDCoupling::MEDCouplingFieldDouble::maxPerTuple(), MEDCouplingField(), MEDCoupling::MEDCouplingFieldDouble::MeldFields(), MEDCoupling::MEDCouplingFieldDouble::MergeFields(), MEDCoupling::MEDCouplingFieldDouble::mergeNodes(), MEDCoupling::MEDCouplingFieldDouble::mergeNodesCenter(), MEDCoupling::MEDCouplingFieldDouble::MinFields(), MEDCoupling::MEDCouplingFieldDouble::MultiplyFields(), MEDCoupling::MEDCouplingFieldDouble::negate(), MEDCoupling::MEDCouplingFieldDouble::normL1(), MEDCoupling::MEDCouplingFieldDouble::normL2(), MEDCoupling::MEDCouplingFieldDouble::operator=(), MEDCoupling::MEDCouplingFieldDouble::PowFields(), MEDCoupling::MEDCouplingFieldDouble::renumberCellsWithoutMesh(), MEDCoupling::MEDCouplingFieldDouble::renumberNodesWithoutMesh(), MEDCoupling::MEDCouplingFieldTemplate::reprQuickOverview(), MEDCoupling::MEDCouplingFieldTemplate::resizeForUnserialization(), MEDCoupling::MEDCouplingFieldDouble::resizeForUnserialization(), MEDCoupling::MEDCouplingFieldTemplate::serialize(), MEDCoupling::MEDCouplingFieldDouble::serialize(), setDiscretization(), setGaussLocalizationOnCells(), setGaussLocalizationOnType(), setNature(), MEDCoupling::MEDCouplingFieldTemplate::simpleRepr(), MEDCoupling::MEDCouplingFieldDouble::simplexize(), MEDCoupling::MEDCouplingFieldDouble::SubstractFields(), MEDCoupling::MEDCouplingFieldDouble::trace(), updateTime(), MEDCoupling::MEDCouplingFieldDouble::zipConnectivity(), and MEDCoupling::MEDCouplingFieldDouble::zipCoords().