From 855b69355eddeca5e643d7b985e6f06070ab0606 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 24 Aug 2016 11:27:34 +0200 Subject: [PATCH] A small debug --- src/MEDCoupling/MEDCouplingField.cxx | 2 ++ src/MEDCoupling/MEDCouplingFieldDouble.cxx | 13 ------------- src/MEDCoupling/MEDCouplingFieldDouble.hxx | 1 - 3 files changed, 2 insertions(+), 14 deletions(-) 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; -- 2.39.2