Salome HOME
Merge from V6_3_BR 06/06/2011
[modules/smesh.git] / src / SMDS / SMDS_Downward.cxx
index 19ca4b24e6399e1c6ffe7d0543e241300617bfcb..87e773898d1ac78ace3240cde2572e6559d2e34a 100644 (file)
@@ -1,9 +1,25 @@
-/*
- * SMDS_Downward.cxx
- *
- *  Created on: Jun 3, 2010
- *      Author: prascle
- */
+// Copyright (C) 2010-2011  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// File: SMDS_Downward.cxx
+// Created: Jun 3, 2010
+// Author: prascle
 
 #include "SMDS_Downward.hxx"
 #include "SMDS_Mesh.hxx"
@@ -800,7 +816,6 @@ void SMDS_Down3D::getNodeIds(int cellId, std::set<int>& nodeSet)
 int SMDS_Down3D::FindFaceByNodes(int cellId, ElemByNodesType& faceByNodes)
 {
   int *faces = &_cellIds[_nbDownCells * cellId];
-  int faceNodeSet[10];
   int npoints = 0;
 
   for (int i = 0; i < _nbDownCells; i++)
@@ -808,11 +823,7 @@ int SMDS_Down3D::FindFaceByNodes(int cellId, ElemByNodesType& faceByNodes)
       if ((faces[i] >= 0) && (faceByNodes.vtkType == _cellTypes[i]))
         {
           if (npoints == 0)
-            {
-              for (int j = 0; j < faceByNodes.nbNodes; j++)
-                faceNodeSet[j] = faceByNodes.nodeIds[j];
-              npoints = faceByNodes.nbNodes;
-            }
+            npoints = faceByNodes.nbNodes;
 
           int nodeSet[10];
           int npts = this->_grid->getDownArray(faceByNodes.vtkType)->getNodeSet(faces[i], nodeSet);