/*!
* Returns a type of \ref MEDCouplingSpatialDisc "spatial discretization" of \a this
* field in terms of enum ParaMEDMEM::TypeOfField.
- * \return ParaMEDMEM::TypeOfField - the type of \a this field.
+ * \return ParaMEDMEM::TypeOfField - the type of \a this field.
+ * \throw If the geometric type is empty.
*/
TypeOfField MEDCouplingField::getTypeOfField() const
{
+ if(!((const MEDCouplingFieldDiscretization *)_type))
+ throw INTERP_KERNEL::Exception("MEDCouplingField::getTypeOfField : spatial discretization is null !");
return _type->getEnum();
}
const MEDCouplingFieldDiscretization *t(_type);
if(!t)
throw INTERP_KERNEL::Exception("MEDCouplingField::getNumberOfTuplesExpectedRegardingCode : no spatial discretization set !");
- return t->getNumberOfTuplesExpectedRegardingCode(_mesh,code,idsPerType);
+ return t->getNumberOfTuplesExpectedRegardingCode(code,idsPerType);
}