From: Anthony Geay Date: Wed, 24 Aug 2016 09:27:34 +0000 (+0200) Subject: A small debug X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=855b69355eddeca5e643d7b985e6f06070ab0606;p=tools%2Fmedcoupling.git A small debug --- diff --git a/src/MEDCoupling/MEDCouplingField.cxx b/src/MEDCoupling/MEDCouplingField.cxx index 293d8aede..4afc32168 100644 --- a/src/MEDCoupling/MEDCouplingField.cxx +++ b/src/MEDCoupling/MEDCouplingField.cxx @@ -236,6 +236,8 @@ NatureOfField MEDCouplingField::getNature() const void MEDCouplingField::setNature(NatureOfField nat) { MEDCouplingNatureOfField::GetRepr(nat);//generate a throw if nat not recognized + if(_type) + _type->checkCompatibilityWithNature(nat); _nature=nat; } diff --git a/src/MEDCoupling/MEDCouplingFieldDouble.cxx b/src/MEDCoupling/MEDCouplingFieldDouble.cxx index 7c2b1c6f5..e7c824d0c 100644 --- a/src/MEDCoupling/MEDCouplingFieldDouble.cxx +++ b/src/MEDCoupling/MEDCouplingFieldDouble.cxx @@ -1710,19 +1710,6 @@ std::vector MEDCouplingFieldDouble::getDirectChildrenWi 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 diff --git a/src/MEDCoupling/MEDCouplingFieldDouble.hxx b/src/MEDCoupling/MEDCouplingFieldDouble.hxx index e2520eb1a..871a0d5fa 100644 --- a/src/MEDCoupling/MEDCouplingFieldDouble.hxx +++ b/src/MEDCoupling/MEDCouplingFieldDouble.hxx @@ -53,7 +53,6 @@ namespace MEDCoupling 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;