From: ageay Date: Wed, 7 Aug 2013 09:17:45 +0000 (+0000) Subject: Generalization of unstructured grid supported by the remapper. X-Git-Tag: V7_3_1b1~215 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ffe6d640bbaae9d66ac15d1015761d047a495ede;p=tools%2Fmedcoupling.git Generalization of unstructured grid supported by the remapper. --- diff --git a/src/MEDCoupling/MEDCoupling1GTUMesh.cxx b/src/MEDCoupling/MEDCoupling1GTUMesh.cxx index d65031154..484ed7aea 100644 --- a/src/MEDCoupling/MEDCoupling1GTUMesh.cxx +++ b/src/MEDCoupling/MEDCoupling1GTUMesh.cxx @@ -2079,7 +2079,11 @@ int MEDCoupling1DGTUMesh::getNumberOfNodesInCell(int cellId) const throw(INTERP_ { int nbOfCells(getNumberOfCells());//performs checks if(cellId>=0 && cellIdgetIJ(cellId+1,0)-_conn_indx->getIJ(cellId,0); + { + const int *conn(_conn->begin()); + int strt=_conn_indx->getIJ(cellId,0),stp=_conn_indx->getIJ(cellId+1,0); + return stp-strt-std::count(conn+strt,conn+stp,-1); + } else { std::ostringstream oss; oss << "MEDCoupling1DGTUMesh::getNumberOfNodesInCell : request for cellId #" << cellId << " must be in [0," << nbOfCells << ") !";