X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCoupling1GTUMesh.cxx;h=7dda1671a544aeb7b8aa1848d581350bb3f5ae01;hb=b7e277ad50223814bc479c5bd64cf12abe8fc959;hp=5dafba902b7cf6050cdd25a670904fbc92a6cd93;hpb=1e36a6710aab710674e20fbd89f6a9a8f238c023;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCoupling1GTUMesh.cxx b/src/MEDCoupling/MEDCoupling1GTUMesh.cxx index 5dafba902..7dda1671a 100644 --- a/src/MEDCoupling/MEDCoupling1GTUMesh.cxx +++ b/src/MEDCoupling/MEDCoupling1GTUMesh.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -329,10 +329,19 @@ MEDCouplingFieldDouble *MEDCoupling1GTUMesh::getMeasureFieldOnNode(bool isAbs) c */ int MEDCoupling1GTUMesh::getCellContainingPoint(const double *pos, double eps) const { - MCAuto m=buildUnstructured(); + MCAuto m(buildUnstructured()); return m->getCellContainingPoint(pos,eps); } +/*! + * to improve perf ! + */ +void MEDCoupling1GTUMesh::getCellsContainingPoint(const double *pos, double eps, std::vector& elts) const +{ + MCAuto m(buildUnstructured()); + return m->getCellsContainingPoint(pos,eps,elts); +} + MEDCouplingFieldDouble *MEDCoupling1GTUMesh::buildOrthogonalField() const { MCAuto m=buildUnstructured(); @@ -2357,7 +2366,7 @@ void MEDCoupling1DGTUMesh::checkConsistencyOfConnectivity() const if(c1->getInfoOnComponent(0)!="") throw INTERP_KERNEL::Exception("Nodal connectivity index array is expected to have no info on its single component !"); int f=c1->front(),ll=c1->back(); - if(f<0 || f>=sz2) + if(f<0 || (sz2>0 && f>=sz2)) { std::ostringstream oss; oss << "Nodal connectivity index array first value (" << f << ") is expected to be exactly in [0," << sz2 << ") !"; throw INTERP_KERNEL::Exception(oss.str().c_str());