X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingField.cxx;h=55b6e0b98a0a3d0cce69cd73f53268173194686e;hb=0c9d48870957c4a9f6f82fc8e2c569780a5f886b;hp=2931cac0a67037e3e9c2908c5e73a03ab0d42fa1;hpb=230f062fa8f37c95e25b47233f53b133dd699aef;p=modules%2Fmed.git diff --git a/src/MEDCoupling/MEDCouplingField.cxx b/src/MEDCoupling/MEDCouplingField.cxx index 2931cac0a..55b6e0b98 100644 --- a/src/MEDCoupling/MEDCouplingField.cxx +++ b/src/MEDCoupling/MEDCouplingField.cxx @@ -174,10 +174,13 @@ std::vector MEDCouplingField::getDirectChildren() const /*! * 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(); } @@ -587,8 +590,8 @@ void MEDCouplingField::copyTinyStringsFrom(const MEDCouplingField *other) { if(other) { - setName(other->_name.c_str()); - setDescription(other->_desc.c_str()); + setName(other->_name); + setDescription(other->_desc); } } @@ -614,5 +617,5 @@ int MEDCouplingField::getNumberOfTuplesExpectedRegardingCode(const std::vectorgetNumberOfTuplesExpectedRegardingCode(_mesh,code,idsPerType); + return t->getNumberOfTuplesExpectedRegardingCode(code,idsPerType); }