Salome HOME
Merge from V6_3_BR 06/06/2011
[modules/smesh.git] / src / SMDS / SMDS_UnstructuredGrid.hxx
index f69012f02dcae6b7a1bb82a61197657558c92ad3..02bbf5f85446d4da6564b636d652dec91d670724 100644 (file)
@@ -1,12 +1,28 @@
-/* 
- * File:   SMDS_UnstructuredGrid.hxx
- * Author: prascle
- *
- * Created on September 16, 2009, 10:28 PM
- */
+// 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_UnstructuredGrid.hxx
+// Author:  prascle
+// Created: September 16, 2009, 10:28 PM
 
 #ifndef _SMDS_UNSTRUCTUREDGRID_HXX
-#define        _SMDS_UNSTRUCTUREDGRID_HXX
+#define _SMDS_UNSTRUCTUREDGRID_HXX
 
 #include <vtkUnstructuredGrid.h>
 #include <vtkCellLinks.h>
@@ -18,7 +34,7 @@
 
 //#define VTK_HAVE_POLYHEDRON
 //#ifdef VTK_HAVE_POLYHEDRON
-  #define VTK_MAXTYPE VTK_POLYHEDRON
+#define VTK_MAXTYPE VTK_POLYHEDRON
 //#else
 //  #define VTK_MAXTYPE VTK_QUADRATIC_PYRAMID
 //#endif
@@ -30,6 +46,7 @@
 
 class SMDS_Downward;
 class SMDS_Mesh;
+class SMDS_MeshVolume;
 
 class SMDS_CellLinks: public vtkCellLinks
 {
@@ -54,18 +71,24 @@ public:
   virtual void UpdateInformation();
   virtual vtkPoints *GetPoints();
 
-//#ifdef VTK_HAVE_POLYHEDRON
+  //#ifdef VTK_HAVE_POLYHEDRON
   int InsertNextLinkedCell(int type, int npts, vtkIdType *pts);
-//#endif
+  //#endif
 
   int CellIdToDownId(int vtkCellId);
   void setCellIdToDownId(int vtkCellId, int downId);
+  void CleanDownwardConnectivity();
   void BuildDownwardConnectivity(bool withEdges);
   int GetNeighbors(int* neighborsVtkIds, int* downIds, unsigned char* downTypes, int vtkId);
+  int GetParentVolumes(int* volVtkIds, int vtkId);
+  int GetParentVolumes(int* volVtkIds, int downId, unsigned char downType);
   void GetNodeIds(std::set<int>& nodeSet, int downId, unsigned char downType);
   void ModifyCellNodes(int vtkVolId, std::map<int, int> localClonedNodeIds);
   int getOrderedNodesOfFace(int vtkVolId, std::vector<vtkIdType>& orderedNodes);
   void BuildLinks();
+  SMDS_MeshVolume* extrudeVolumeFromFace(int vtkVolId, int domain1, int domain2, std::set<int>& originalNodes,
+                                         std::map<int, std::map<int, int> >& nodeDomains,
+                                         std::map<int, std::map<long,int> >& nodeQuadDomains);
   vtkCellLinks* GetLinks()
   {
     return Links;
@@ -89,5 +112,5 @@ protected:
   std::vector<SMDS_Downward*> _downArray;
 };
 
-#endif /* _SMDS_UNSTRUCTUREDGRID_HXX */
+#endif  /* _SMDS_UNSTRUCTUREDGRID_HXX */