From f3f39a70a16d74873e768599333e47abbe9f4f6d Mon Sep 17 00:00:00 2001 From: ageay Date: Wed, 7 Aug 2013 09:17:45 +0000 Subject: [PATCH] Generalization of unstructured grid supported by the remapper. --- src/MEDCoupling/MEDCoupling1GTUMesh.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 << ") !"; -- 2.39.2