]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
0020634: [CEA 381] MEDMEM:REMAPPER : intersection error
authoreap <eap@opencascade.com>
Mon, 18 Jan 2010 10:16:31 +0000 (10:16 +0000)
committereap <eap@opencascade.com>
Mon, 18 Jan 2010 10:16:31 +0000 (10:16 +0000)
+    unsigned getNumberOfNodesConstituentTheSon2(unsigned sonId, const int *nodalConn, int lgth) const;

src/INTERP_KERNEL/CellModel.cxx
src/INTERP_KERNEL/CellModel.hxx

index 418936050d2def0b99c2273cea2177a4179ea97f..77a64858287616da2df2711a941cc1a06ea7b4b2 100644 (file)
@@ -313,4 +313,33 @@ namespace INTERP_KERNEL
           }
       }
   }
+
+  //================================================================================
+  /*!
+   * \brief Return number of nodes in sonId-th son of a Dynamic() cell
+   */
+  //================================================================================
+
+  unsigned CellModel::getNumberOfNodesConstituentTheSon2(unsigned sonId, const int *nodalConn, int lgth) const
+  {
+    if(!isDynamic())
+      return getNumberOfNodesConstituentTheSon(sonId);
+
+    if(_dim==2)//polygon
+      {
+        return 2;
+      }
+    else
+      {//polyedron
+        const int *where=nodalConn;
+        for(int i=0;i<sonId;i++)
+          {
+            where=std::find(where,nodalConn+lgth,-1);
+            where++;
+          }
+        const int *where2=std::find(where,nodalConn+lgth,-1);
+        return where2-where;
+      }
+  }
+
 }
index 5ca9d343b7d33505284c0f48c9061924807eca24..2acdc6ef64181cbea16f8f16956ede4700a806e3 100644 (file)
@@ -50,6 +50,7 @@ namespace INTERP_KERNEL
     unsigned getNumberOfSons() const { return _nb_of_sons; }
     unsigned getNumberOfSons2(const int *conn, int lgth) const;
     unsigned getNumberOfNodesConstituentTheSon(unsigned sonId) const { return _nb_of_sons_con[sonId]; }
+    unsigned getNumberOfNodesConstituentTheSon2(unsigned sonId, const int *nodalConn, int lgth) const;
     NormalizedCellType getSonType(unsigned sonId) const { return _sons_type[sonId]; }
     NormalizedCellType getSonType2(unsigned sonId) const;
     unsigned fillSonCellNodalConnectivity(int sonId, const int *nodalConn, int *sonNodalConn) const;