void MEDCouplingField::setNature(NatureOfField nat)
{
MEDCouplingNatureOfField::GetRepr(nat);//generate a throw if nat not recognized
+ if(_type)
+ _type->checkCompatibilityWithNature(nat);
_nature=nat;
}
return ret;
}
-/*!
- * Sets \ref NatureOfField.
- * \param [in] nat - an item of enum MEDCoupling::NatureOfField.
- */
-void MEDCouplingFieldDouble::setNature(NatureOfField nat)
-{
- MEDCouplingField::setNature(nat);
- if(_type)
- _type->checkCompatibilityWithNature(nat);
-}
-
-
-
/*!
* Returns a value of \a this field of type either
* \ref MEDCoupling::ON_GAUSS_PT "ON_GAUSS_PT" or
MEDCOUPLING_EXPORT MEDCouplingFieldDouble *nodeToCellDiscretization() const;
MEDCOUPLING_EXPORT MEDCouplingFieldDouble *cellToNodeDiscretization() const;
MEDCOUPLING_EXPORT TypeOfTimeDiscretization getTimeDiscretization() const;
- MEDCOUPLING_EXPORT void setNature(NatureOfField nat);
MEDCOUPLING_EXPORT double getIJK(int cellId, int nodeIdInCell, int compoId) const;
MEDCOUPLING_EXPORT double accumulate(int compId) const;
MEDCOUPLING_EXPORT void accumulate(double *res) const;