]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
Generalization of unstructured grid supported by the remapper.
authorageay <ageay>
Wed, 7 Aug 2013 09:17:45 +0000 (09:17 +0000)
committerageay <ageay>
Wed, 7 Aug 2013 09:17:45 +0000 (09:17 +0000)
src/MEDCoupling/MEDCoupling1GTUMesh.cxx

index d65031154d9ff77b47f49f2c060c6da62d5210a2..484ed7aeab16fd68e23ceca625d94ad43a2d5eef 100644 (file)
@@ -2079,7 +2079,11 @@ int MEDCoupling1DGTUMesh::getNumberOfNodesInCell(int cellId) const throw(INTERP_
 {
   int nbOfCells(getNumberOfCells());//performs checks
   if(cellId>=0 && cellId<nbOfCells)
-    return _conn_indx->getIJ(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 << ") !";