{
}
+std::size_t MEDCouplingMesh::getHeapMemorySize() const
+{
+ return _name.capacity()+_description.capacity()+_time_unit.capacity();
+}
+
/*!
* This method is only for ParaMEDMEM in ParaFIELD constructor.
*/
* This method checks geo equivalence between two meshes : 'this' and 'other'.
* If no exception is throw 'this' and 'other' are geometrically equivalent regarding 'levOfCheck' level.
* This method is typically used to change the mesh of a field "safely" depending the 'levOfCheck' level considered.
+ * So in case of success cell \c other[i] is equal to cell \c this[cellCor[i]]. If \a cellCor is null it means that for all i cell \c other[i] is equal to cell \c this[i].
*
* @param levOfCheck input that specifies the level of check specified. The possible values are listed below.
* @param prec input that specifies precision for double float data used for comparison in meshes.
*/
MEDCouplingFieldDouble *MEDCouplingMesh::fillFromAnalytic(TypeOfField t, int nbOfComp, FunctionToEvaluate func) const
{
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=MEDCouplingFieldDouble::New(t,NO_TIME);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=MEDCouplingFieldDouble::New(t,ONE_TIME);
ret->setMesh(this);
ret->fillFromAnalytic(nbOfComp,func);
- ret->incrRef();
- return ret;
+ ret->synchronizeTimeWithSupport();
+ return ret.retn();
}
/*!
*/
MEDCouplingFieldDouble *MEDCouplingMesh::fillFromAnalytic(TypeOfField t, int nbOfComp, const char *func) const
{
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=MEDCouplingFieldDouble::New(t,NO_TIME);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=MEDCouplingFieldDouble::New(t,ONE_TIME);
ret->setMesh(this);
ret->fillFromAnalytic(nbOfComp,func);
- ret->incrRef();
- return ret;
+ ret->synchronizeTimeWithSupport();
+ return ret.retn();
}
/*!
*/
MEDCouplingFieldDouble *MEDCouplingMesh::fillFromAnalytic2(TypeOfField t, int nbOfComp, const char *func) const
{
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=MEDCouplingFieldDouble::New(t,NO_TIME);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=MEDCouplingFieldDouble::New(t,ONE_TIME);
ret->setMesh(this);
ret->fillFromAnalytic2(nbOfComp,func);
- ret->incrRef();
- return ret;
+ ret->synchronizeTimeWithSupport();
+ return ret.retn();
}
/*!
*/
MEDCouplingFieldDouble *MEDCouplingMesh::fillFromAnalytic3(TypeOfField t, int nbOfComp, const std::vector<std::string>& varsOrder, const char *func) const
{
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=MEDCouplingFieldDouble::New(t,NO_TIME);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=MEDCouplingFieldDouble::New(t,ONE_TIME);
ret->setMesh(this);
ret->fillFromAnalytic3(nbOfComp,varsOrder,func);
- ret->incrRef();
- return ret;
+ ret->synchronizeTimeWithSupport();
+ return ret.retn();
}
/*!
return (int) cm.getDimension();
}
+/*!
+ * \param [in] type the geometric type for which the representation is asked.
+ * \return the string representation corresponding to the input geometric type \a type.
+ *
+ * \throw if type is equal to \c INTERP_KERNEL::NORM_ERROR or to an unexisting geometric type.
+ */
+const char *MEDCouplingMesh::GetReprOfGeometricType(INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception)
+{
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
+ return cm.getRepr();
+}
+
void MEDCouplingMesh::getCellsContainingPoint(const double *pos, double eps, std::vector<int>& elts) const
{
int ret=getCellContainingPoint(pos,eps);