0021347: [CEA 497] Visualisation into SMESH and VISU of hexagonal prism cells (MED_OCTA12)

0021380: EDF 1937 SMESH: Take into account QUAD9 and HEXA27
This commit is contained in:
eap 2011-12-16 09:07:56 +00:00
parent 41ed515a46
commit 88d5f149b9
13 changed files with 272 additions and 112 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -13,6 +13,7 @@
<li>\ref adding_polygons_anchor "Polygons"</li>
<li>\ref adding_tetrahedrons_anchor "Tetrahedrons"</li>
<li>\ref adding_hexahedrons_anchor "Hexahedrons"</li>
<li>\ref adding_octahedrons_anchor "Hexagonal prism"</li>
<li>\ref adding_polyhedrons_anchor "Polyhedrons"</li>
</ul>
@ -147,6 +148,16 @@ the \b Apply or <b>Apply and Close</b> button. Your hexahedron will be created:
\image html image71.jpg
<br>
\anchor adding_octahedrons_anchor
<h2>Adding hexagonal prism</h2>
In the Add Hexagonal Prism dialog box specify the nodes which will
form your hexagonal prism by selecting them in the 3D viewer with pressed Shift button and click
the \b Apply or <b>Apply and Close</b> button. Your hexagonal prism will be created:
\image html image_octa12.png
<br>
\anchor adding_polyhedrons_anchor
<h2>Adding polyhedrons</h2>

View File

@ -36,6 +36,7 @@ dist_salomeres_DATA = \
mesh_area.png \
mesh_aspect.png \
mesh_aspect_3d.png \
mesh_biquad_quadrangle.png \
mesh_clear.png \
mesh_compute.png \
mesh_diagonal.png \
@ -65,6 +66,7 @@ dist_salomeres_DATA = \
mesh_line_n.png \
mesh_line.png \
mesh_move_node.png \
mesh_octahedron.png \
mesh_orientation.png \
mesh.png \
mesh_polygon.png \
@ -102,6 +104,7 @@ dist_salomeres_DATA = \
mesh_tree_importedmesh.png \
mesh_tree_mesh_warn.png \
mesh_triangle_n.png \
mesh_triquad_hexahedron.png \
mesh_triangle.png \
mesh_update.png \
mesh_vertex_n.png \
@ -149,6 +152,7 @@ dist_salomeres_DATA = \
select1.png \
StdMeshers.xml \
mesh_pattern.png \
mesh_pentahedron.png \
pattern_sample_2d.png \
pattern_sample_3D.png \
mesh_add.png \

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 936 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

View File

@ -52,14 +52,17 @@ int SMDS_Downward::getCellDimension(unsigned char cellType)
_cellDimension[VTK_QUADRATIC_TRIANGLE] = 2;
_cellDimension[VTK_QUAD] = 2;
_cellDimension[VTK_QUADRATIC_QUAD] = 2;
_cellDimension[VTK_BIQUADRATIC_QUAD] = 2;
_cellDimension[VTK_TETRA] = 3;
_cellDimension[VTK_QUADRATIC_TETRA] = 3;
_cellDimension[VTK_HEXAHEDRON] = 3;
_cellDimension[VTK_QUADRATIC_HEXAHEDRON] = 3;
_cellDimension[VTK_TRIQUADRATIC_HEXAHEDRON] = 3;
_cellDimension[VTK_WEDGE] = 3;
_cellDimension[VTK_QUADRATIC_WEDGE] = 3;
_cellDimension[VTK_PYRAMID] = 3;
_cellDimension[VTK_QUADRATIC_PYRAMID] = 3;
_cellDimension[VTK_HEXAGONAL_PRISM] = 3;
}
return _cellDimension[cellType];
}
@ -79,23 +82,7 @@ SMDS_Downward::SMDS_Downward(SMDS_UnstructuredGrid *grid, int nbDownCells) :
this->_cellIds.clear();
this->_cellTypes.clear();
if (_cellDimension.empty())
{
_cellDimension.resize(VTK_MAXTYPE + 1, 0);
_cellDimension[VTK_LINE] = 1;
_cellDimension[VTK_QUADRATIC_EDGE] = 1;
_cellDimension[VTK_TRIANGLE] = 2;
_cellDimension[VTK_QUADRATIC_TRIANGLE] = 2;
_cellDimension[VTK_QUAD] = 2;
_cellDimension[VTK_QUADRATIC_QUAD] = 2;
_cellDimension[VTK_TETRA] = 3;
_cellDimension[VTK_QUADRATIC_TETRA] = 3;
_cellDimension[VTK_HEXAHEDRON] = 3;
_cellDimension[VTK_QUADRATIC_HEXAHEDRON] = 3;
_cellDimension[VTK_WEDGE] = 3;
_cellDimension[VTK_QUADRATIC_WEDGE] = 3;
_cellDimension[VTK_PYRAMID] = 3;
_cellDimension[VTK_QUADRATIC_PYRAMID] = 3;
}
getCellDimension( VTK_LINE );
}
SMDS_Downward::~SMDS_Downward()

View File

@ -183,6 +183,28 @@ public:
const SMDS_MeshNode * n34,
const SMDS_MeshNode * n41);
virtual SMDS_MeshFace* AddFaceWithID(int n1, int n2, int n3, int n4,
int n12,int n23,int n34,int n41, int nCenter, int ID);
virtual SMDS_MeshFace* AddFaceWithID(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n2,
const SMDS_MeshNode * n3,
const SMDS_MeshNode * n4,
const SMDS_MeshNode * n12,
const SMDS_MeshNode * n23,
const SMDS_MeshNode * n34,
const SMDS_MeshNode * n41,
const SMDS_MeshNode * nCenter,
int ID);
virtual SMDS_MeshFace* AddFace(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n2,
const SMDS_MeshNode * n3,
const SMDS_MeshNode * n4,
const SMDS_MeshNode * n12,
const SMDS_MeshNode * n23,
const SMDS_MeshNode * n34,
const SMDS_MeshNode * n41,
const SMDS_MeshNode * nCenter);
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4, int ID);
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n2,
@ -277,6 +299,36 @@ public:
const SMDS_MeshFace * f5,
const SMDS_MeshFace * f6);
// hexagonal prism
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4, int n5, int n6,
int n7, int n8, int n9, int n10, int n11, int n12,
int ID);
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n2,
const SMDS_MeshNode * n3,
const SMDS_MeshNode * n4,
const SMDS_MeshNode * n5,
const SMDS_MeshNode * n6,
const SMDS_MeshNode * n7,
const SMDS_MeshNode * n8,
const SMDS_MeshNode * n9,
const SMDS_MeshNode * n10,
const SMDS_MeshNode * n11,
const SMDS_MeshNode * n12,
int ID);
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n2,
const SMDS_MeshNode * n3,
const SMDS_MeshNode * n4,
const SMDS_MeshNode * n5,
const SMDS_MeshNode * n6,
const SMDS_MeshNode * n7,
const SMDS_MeshNode * n8,
const SMDS_MeshNode * n9,
const SMDS_MeshNode * n10,
const SMDS_MeshNode * n11,
const SMDS_MeshNode * n12);
// 2d order tetrahedron of 10 nodes
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4,
int n12,int n23,int n31,
@ -424,27 +476,92 @@ public:
const SMDS_MeshNode * n37,
const SMDS_MeshNode * n48);
virtual SMDS_MeshFace* AddPolygonalFaceWithID (std::vector<int> nodes_ids,
const int ID);
// 2d oreder Hexahedrons with 27 nodes
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4,
int n5, int n6, int n7, int n8,
int n12,int n23,int n34,int n41,
int n56,int n67,int n78,int n85,
int n15,int n26,int n37,int n48,
int n1234,int n1256,int n2367,int n3478,
int n1458,int n5678,int nCenter,
int ID);
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n2,
const SMDS_MeshNode * n3,
const SMDS_MeshNode * n4,
const SMDS_MeshNode * n5,
const SMDS_MeshNode * n6,
const SMDS_MeshNode * n7,
const SMDS_MeshNode * n8,
const SMDS_MeshNode * n12,
const SMDS_MeshNode * n23,
const SMDS_MeshNode * n34,
const SMDS_MeshNode * n41,
const SMDS_MeshNode * n56,
const SMDS_MeshNode * n67,
const SMDS_MeshNode * n78,
const SMDS_MeshNode * n85,
const SMDS_MeshNode * n15,
const SMDS_MeshNode * n26,
const SMDS_MeshNode * n37,
const SMDS_MeshNode * n48,
const SMDS_MeshNode * n1234,
const SMDS_MeshNode * n1256,
const SMDS_MeshNode * n2367,
const SMDS_MeshNode * n3478,
const SMDS_MeshNode * n1458,
const SMDS_MeshNode * n5678,
const SMDS_MeshNode * nCenter,
int ID);
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
const SMDS_MeshNode * n2,
const SMDS_MeshNode * n3,
const SMDS_MeshNode * n4,
const SMDS_MeshNode * n5,
const SMDS_MeshNode * n6,
const SMDS_MeshNode * n7,
const SMDS_MeshNode * n8,
const SMDS_MeshNode * n12,
const SMDS_MeshNode * n23,
const SMDS_MeshNode * n34,
const SMDS_MeshNode * n41,
const SMDS_MeshNode * n56,
const SMDS_MeshNode * n67,
const SMDS_MeshNode * n78,
const SMDS_MeshNode * n85,
const SMDS_MeshNode * n15,
const SMDS_MeshNode * n26,
const SMDS_MeshNode * n37,
const SMDS_MeshNode * n48,
const SMDS_MeshNode * n1234,
const SMDS_MeshNode * n1256,
const SMDS_MeshNode * n2367,
const SMDS_MeshNode * n3478,
const SMDS_MeshNode * n1458,
const SMDS_MeshNode * n5678,
const SMDS_MeshNode * nCenter);
virtual SMDS_MeshFace* AddPolygonalFaceWithID (std::vector<const SMDS_MeshNode*> nodes,
const int ID);
virtual SMDS_MeshFace* AddPolygonalFaceWithID (const std::vector<int> & nodes_ids,
const int ID);
virtual SMDS_MeshFace* AddPolygonalFace (std::vector<const SMDS_MeshNode*> nodes);
virtual SMDS_MeshFace* AddPolygonalFaceWithID (const std::vector<const SMDS_MeshNode*> & nodes,
const int ID);
virtual SMDS_MeshFace* AddPolygonalFace (const std::vector<const SMDS_MeshNode*> & nodes);
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
(std::vector<int> nodes_ids,
std::vector<int> quantities,
const int ID);
(const std::vector<int> & nodes_ids,
const std::vector<int> & quantities,
const int ID);
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
(std::vector<const SMDS_MeshNode*> nodes,
std::vector<int> quantities,
const int ID);
(const std::vector<const SMDS_MeshNode*> & nodes,
const std::vector<int> & quantities,
const int ID);
virtual SMDS_MeshVolume* AddPolyhedralVolume
(std::vector<const SMDS_MeshNode*> nodes,
std::vector<int> quantities);
(const std::vector<const SMDS_MeshNode*> & nodes,
const std::vector<int> & quantities);
virtual SMDS_MeshVolume* AddVolumeFromVtkIds(const std::vector<vtkIdType>& vtkNodeIds);

View File

@ -44,9 +44,11 @@ public:
int Nb0DElements() const { return myNb0DElements; }
inline int NbEdges (SMDSAbs_ElementOrder order = ORDER_ANY) const;
inline int NbFaces (SMDSAbs_ElementOrder order = ORDER_ANY) const;
inline int NbTriangles (SMDSAbs_ElementOrder order = ORDER_ANY) const;
inline int NbQuadrangles(SMDSAbs_ElementOrder order = ORDER_ANY) const;
int NbBiQuadQuadrangles() const { return myNbBiQuadQuadrangles; }
int NbPolygons() const { return myNbPolygons; }
inline int NbVolumes (SMDSAbs_ElementOrder order = ORDER_ANY) const;
@ -54,6 +56,8 @@ public:
inline int NbHexas (SMDSAbs_ElementOrder order = ORDER_ANY) const;
inline int NbPyramids(SMDSAbs_ElementOrder order = ORDER_ANY) const;
inline int NbPrisms (SMDSAbs_ElementOrder order = ORDER_ANY) const;
inline int NbHexPrisms(SMDSAbs_ElementOrder order = ORDER_ANY) const;
int NbTriQuadHexas() const { return myNbTriQuadHexas; }
int NbPolyhedrons() const { return myNbPolyhedrons; }
protected:
@ -76,13 +80,14 @@ private:
int myNb0DElements;
int myNbEdges , myNbQuadEdges ;
int myNbTriangles , myNbQuadTriangles ;
int myNbQuadrangles, myNbQuadQuadrangles;
int myNbQuadrangles, myNbQuadQuadrangles, myNbBiQuadQuadrangles;
int myNbPolygons;
int myNbTetras , myNbQuadTetras ;
int myNbHexas , myNbQuadHexas ;
int myNbHexas , myNbQuadHexas, myNbTriQuadHexas;
int myNbPyramids, myNbQuadPyramids;
int myNbPrisms , myNbQuadPrisms ;
int myNbHexPrism;
int myNbPolyhedrons;
std::vector<int*> myNb; // pointers to myNb... fields
@ -90,16 +95,17 @@ private:
};
inline SMDS_MeshInfo::SMDS_MeshInfo():
myNbNodes(0),
myNb0DElements(0),
myNbNodes (0),
myNb0DElements (0),
myNbEdges (0), myNbQuadEdges (0),
myNbTriangles (0), myNbQuadTriangles (0),
myNbQuadrangles(0), myNbQuadQuadrangles(0),
myNbPolygons(0),
myNbTetras (0), myNbQuadTetras (0),
myNbHexas (0), myNbQuadHexas (0),
myNbPyramids(0), myNbQuadPyramids(0),
myNbPrisms (0), myNbQuadPrisms (0),
myNbQuadrangles(0), myNbQuadQuadrangles(0), myNbBiQuadQuadrangles(0),
myNbPolygons (0),
myNbTetras (0), myNbQuadTetras (0),
myNbHexas (0), myNbQuadHexas (0), myNbTriQuadHexas(0),
myNbPyramids (0), myNbQuadPyramids(0),
myNbPrisms (0), myNbQuadPrisms (0),
myNbHexPrism (0),
myNbPolyhedrons(0)
{
// Number of nodes in standard element types (. - actual nb, * - after the shift)
@ -108,8 +114,8 @@ inline SMDS_MeshInfo::SMDS_MeshInfo():
// d l c g d
// e e e e
// s
// -----------------
// 0 - DON't USE 0!!!
// =================
// 0 --------------- - DON't USE 0!!!
// 1 . *
// 2 .
// 3 . *
@ -118,27 +124,34 @@ inline SMDS_MeshInfo::SMDS_MeshInfo():
// 6 * .
// 7 *
// 8 * .
// 9 *
// 9 . *
// 10 *
// 11 *
// 12 *
// 11
// 12 *
// 13 *
// 14 *
// 14
// 15 *
// 16 *
// 17
// 17 *
// 18
// 19
// 19 *
// 20 *
// 21 *
// 22 *
// 23
// 24
// 25
// 26
// 27 *
//
// So to have a unique index for each type basing on nb of nodes, we use a shift:
myShift.resize(SMDSAbs_NbElementTypes, 0);
myShift[ SMDSAbs_Face ] = +8; // 3->11, 4->12, 6->14, 8->16
myShift[ SMDSAbs_Face ] = +13;// 3->16, 4->17, 6->19, 8->21, 9->22
myShift[ SMDSAbs_Edge ] = +5; // 2->7, 4->9
myShift[ SMDSAbs_0DElement ] = +2; // 1->3
myNb.resize( index( SMDSAbs_Volume,20 ) + 1, NULL);
myNb.resize( index( SMDSAbs_Volume,27 ) + 1, NULL);
myNb[ index( SMDSAbs_Node,1 )] = & myNbNodes;
@ -151,15 +164,18 @@ inline SMDS_MeshInfo::SMDS_MeshInfo():
myNb[ index( SMDSAbs_Face,4 )] = & myNbQuadrangles;
myNb[ index( SMDSAbs_Face,6 )] = & myNbQuadTriangles;
myNb[ index( SMDSAbs_Face,8 )] = & myNbQuadQuadrangles;
myNb[ index( SMDSAbs_Face,9 )] = & myNbBiQuadQuadrangles;
myNb[ index( SMDSAbs_Volume, 4)] = & myNbTetras;
myNb[ index( SMDSAbs_Volume, 5)] = & myNbPyramids;
myNb[ index( SMDSAbs_Volume, 6)] = & myNbPrisms;
myNb[ index( SMDSAbs_Volume, 8)] = & myNbHexas;
myNb[ index( SMDSAbs_Volume, 10)] = & myNbQuadTetras;
myNb[ index( SMDSAbs_Volume, 12)] = & myNbHexPrism;
myNb[ index( SMDSAbs_Volume, 13)] = & myNbQuadPyramids;
myNb[ index( SMDSAbs_Volume, 15)] = & myNbQuadPrisms;
myNb[ index( SMDSAbs_Volume, 20)] = & myNbQuadHexas;
myNb[ index( SMDSAbs_Volume, 27)] = & myNbTriQuadHexas;
}
inline SMDS_MeshInfo& // operator=
@ -222,11 +238,11 @@ SMDS_MeshInfo::NbTriangles (SMDSAbs_ElementOrder order) const
inline int // NbQuadrangles
SMDS_MeshInfo::NbQuadrangles(SMDSAbs_ElementOrder order) const
{ return order == ORDER_ANY ? myNbQuadrangles+myNbQuadQuadrangles : order == ORDER_LINEAR ? myNbQuadrangles : myNbQuadQuadrangles; }
{ return order == ORDER_ANY ? myNbQuadrangles+myNbQuadQuadrangles+myNbBiQuadQuadrangles : order == ORDER_LINEAR ? myNbQuadrangles : myNbQuadQuadrangles+myNbBiQuadQuadrangles; }
inline int // NbVolumes
SMDS_MeshInfo::NbVolumes (SMDSAbs_ElementOrder order) const
{ return NbTetras(order) + NbHexas(order) + NbPyramids(order) + NbPrisms(order) + (order == ORDER_QUADRATIC ? 0 : myNbPolyhedrons); }
{ return NbTetras(order) + NbHexas(order) + NbPyramids(order) + NbPrisms(order) + NbHexPrisms(order) + (order == ORDER_QUADRATIC ? 0 : myNbPolyhedrons); }
inline int // NbTetras
SMDS_MeshInfo::NbTetras (SMDSAbs_ElementOrder order) const
@ -234,7 +250,7 @@ SMDS_MeshInfo::NbTetras (SMDSAbs_ElementOrder order) const
inline int // NbHexas
SMDS_MeshInfo::NbHexas (SMDSAbs_ElementOrder order) const
{ return order == ORDER_ANY ? myNbHexas+myNbQuadHexas : order == ORDER_LINEAR ? myNbHexas : myNbQuadHexas; }
{ return order == ORDER_ANY ? myNbHexas+myNbQuadHexas+myNbTriQuadHexas : order == ORDER_LINEAR ? myNbHexas : myNbQuadHexas+myNbTriQuadHexas; }
inline int // NbPyramids
SMDS_MeshInfo::NbPyramids(SMDSAbs_ElementOrder order) const
@ -244,6 +260,10 @@ inline int // NbPrisms
SMDS_MeshInfo::NbPrisms (SMDSAbs_ElementOrder order) const
{ return order == ORDER_ANY ? myNbPrisms+myNbQuadPrisms : order == ORDER_LINEAR ? myNbPrisms : myNbQuadPrisms; }
inline int // NbHexPrisms
SMDS_MeshInfo::NbHexPrisms (SMDSAbs_ElementOrder order) const
{ return order == ORDER_ANY ? myNbHexPrism : order == ORDER_LINEAR ? myNbHexPrism : 0; }
inline int // NbElements
SMDS_MeshInfo::NbElements(SMDSAbs_ElementType type) const
{
@ -254,11 +274,13 @@ SMDS_MeshInfo::NbElements(SMDSAbs_ElementType type) const
nb += myNbPolygons + myNbPolyhedrons;
break;
case SMDSAbs_Volume:
nb = myNbTetras+ myNbPyramids+ myNbPrisms+ myNbHexas+
myNbQuadTetras+ myNbQuadPyramids+ myNbQuadPrisms+ myNbQuadHexas+myNbPolyhedrons;
nb = myNbTetras+ myNbPyramids+ myNbPrisms+ myNbHexas+ myNbHexPrism+
myNbQuadTetras+ myNbQuadPyramids+ myNbQuadPrisms+ myNbQuadHexas+ myNbTriQuadHexas+
myNbPolyhedrons;
break;
case SMDSAbs_Face:
nb = myNbTriangles+ myNbQuadrangles+ myNbQuadTriangles+ myNbQuadQuadrangles + myNbPolygons;
nb = myNbTriangles+ myNbQuadrangles+
myNbQuadTriangles+ myNbQuadQuadrangles+ myNbBiQuadQuadrangles+ myNbPolygons;
break;
case SMDSAbs_Edge:
nb = myNbEdges + myNbQuadEdges;
@ -275,7 +297,7 @@ SMDS_MeshInfo::NbElements(SMDSAbs_ElementType type) const
}
int // NbEntities
SMDS_MeshInfo::NbEntities(SMDSAbs_EntityType type) const
SMDS_MeshInfo::NbEntities(SMDSAbs_EntityType type) const
{
switch (type) {
case SMDSEntity_Node:
@ -302,6 +324,9 @@ SMDS_MeshInfo::NbEntities(SMDSAbs_EntityType type) const
case SMDSEntity_Quad_Quadrangle:
return myNbQuadQuadrangles;
break;
case SMDSEntity_BiQuad_Quadrangle:
return myNbBiQuadQuadrangles;
break;
case SMDSEntity_Polygon:
return myNbPolygons;
break;
@ -323,12 +348,18 @@ SMDS_MeshInfo::NbEntities(SMDSAbs_EntityType type) const
case SMDSEntity_Quad_Hexa:
return myNbQuadHexas;
break;
case SMDSEntity_TriQuad_Hexa:
return myNbTriQuadHexas;
break;
case SMDSEntity_Penta:
return myNbPrisms;
break;
case SMDSEntity_Quad_Penta:
return myNbQuadPrisms;
break;
case SMDSEntity_Hexagonal_Prism:
return myNbHexPrism;
break;
case SMDSEntity_Polyhedra:
return myNbPolyhedrons;
break;

View File

@ -372,73 +372,83 @@ void SMDS_UnstructuredGrid::BuildDownwardConnectivity(bool withEdges)
// --- create SMDS_Downward structures (in _downArray vector[vtkCellType])
_downArray.resize(VTK_MAXTYPE + 1, 0); // --- max. type value = VTK_QUADRATIC_PYRAMID
_downArray.resize(VTK_MAXTYPE + 1, 0);
_downArray[VTK_LINE] = new SMDS_DownEdge(this);
_downArray[VTK_QUADRATIC_EDGE] = new SMDS_DownQuadEdge(this);
_downArray[VTK_TRIANGLE] = new SMDS_DownTriangle(this);
_downArray[VTK_QUADRATIC_TRIANGLE] = new SMDS_DownQuadTriangle(this);
_downArray[VTK_QUAD] = new SMDS_DownQuadrangle(this);
_downArray[VTK_QUADRATIC_QUAD] = new SMDS_DownQuadQuadrangle(this);
_downArray[VTK_TETRA] = new SMDS_DownTetra(this);
_downArray[VTK_QUADRATIC_TETRA] = new SMDS_DownQuadTetra(this);
_downArray[VTK_PYRAMID] = new SMDS_DownPyramid(this);
_downArray[VTK_QUADRATIC_PYRAMID] = new SMDS_DownQuadPyramid(this);
_downArray[VTK_WEDGE] = new SMDS_DownPenta(this);
_downArray[VTK_QUADRATIC_WEDGE] = new SMDS_DownQuadPenta(this);
_downArray[VTK_HEXAHEDRON] = new SMDS_DownHexa(this);
_downArray[VTK_QUADRATIC_HEXAHEDRON] = new SMDS_DownQuadHexa(this);
_downArray[VTK_LINE] = new SMDS_DownEdge(this);
_downArray[VTK_QUADRATIC_EDGE] = new SMDS_DownQuadEdge(this);
_downArray[VTK_TRIANGLE] = new SMDS_DownTriangle(this);
_downArray[VTK_QUADRATIC_TRIANGLE] = new SMDS_DownQuadTriangle(this);
_downArray[VTK_QUAD] = new SMDS_DownQuadrangle(this);
_downArray[VTK_QUADRATIC_QUAD] = new SMDS_DownQuadQuadrangle(this);
_downArray[VTK_BIQUADRATIC_QUAD] = new SMDS_DownQuadQuadrangle(this);
_downArray[VTK_TETRA] = new SMDS_DownTetra(this);
_downArray[VTK_QUADRATIC_TETRA] = new SMDS_DownQuadTetra(this);
_downArray[VTK_PYRAMID] = new SMDS_DownPyramid(this);
_downArray[VTK_QUADRATIC_PYRAMID] = new SMDS_DownQuadPyramid(this);
_downArray[VTK_WEDGE] = new SMDS_DownPenta(this);
_downArray[VTK_QUADRATIC_WEDGE] = new SMDS_DownQuadPenta(this);
_downArray[VTK_HEXAHEDRON] = new SMDS_DownHexa(this);
_downArray[VTK_QUADRATIC_HEXAHEDRON] = new SMDS_DownQuadHexa(this);
_downArray[VTK_TRIQUADRATIC_HEXAHEDRON] = new SMDS_DownQuadHexa(this);
_downArray[VTK_HEXAGONAL_PRISM] = new SMDS_DownPenta(this);
// --- get detailed info of number of cells of each type, allocate SMDS_downward structures
const SMDS_MeshInfo &meshInfo = _mesh->GetMeshInfo();
int nbLinTetra = meshInfo.NbTetras(ORDER_LINEAR);
int nbQuadTetra = meshInfo.NbTetras(ORDER_QUADRATIC);
int nbLinPyra = meshInfo.NbPyramids(ORDER_LINEAR);
int nbQuadPyra = meshInfo.NbPyramids(ORDER_QUADRATIC);
int nbLinPrism = meshInfo.NbPrisms(ORDER_LINEAR);
int nbQuadPrism = meshInfo.NbPrisms(ORDER_QUADRATIC);
int nbLinHexa = meshInfo.NbHexas(ORDER_LINEAR);
int nbQuadHexa = meshInfo.NbHexas(ORDER_QUADRATIC);
int nbLinTetra = meshInfo.NbTetras (ORDER_LINEAR);
int nbQuadTetra = meshInfo.NbTetras (ORDER_QUADRATIC);
int nbLinPyra = meshInfo.NbPyramids(ORDER_LINEAR);
int nbQuadPyra = meshInfo.NbPyramids(ORDER_QUADRATIC);
int nbLinPrism = meshInfo.NbPrisms (ORDER_LINEAR);
int nbQuadPrism = meshInfo.NbPrisms (ORDER_QUADRATIC);
int nbLinHexa = meshInfo.NbHexas (ORDER_LINEAR);
int nbQuadHexa = meshInfo.NbHexas (ORDER_QUADRATIC);
int nbHexPrism = meshInfo.NbHexPrisms();
int nbLineGuess = int((4.0 / 3.0) * nbLinTetra + 2 * nbLinPrism + 2.5 * nbLinPyra + 3 * nbLinHexa);
int nbLineGuess = int((4.0 / 3.0) * nbLinTetra + 2 * nbLinPrism + 2.5 * nbLinPyra + 3 * nbLinHexa);
int nbQuadEdgeGuess = int((4.0 / 3.0) * nbQuadTetra + 2 * nbQuadPrism + 2.5 * nbQuadPyra + 3 * nbQuadHexa);
int nbLinTriaGuess = 2 * nbLinTetra + nbLinPrism + 2 * nbLinPyra;
int nbLinTriaGuess = 2 * nbLinTetra + nbLinPrism + 2 * nbLinPyra;
int nbQuadTriaGuess = 2 * nbQuadTetra + nbQuadPrism + 2 * nbQuadPyra;
int nbLinQuadGuess = int((2.0 / 3.0) * nbLinPrism + (1.0 / 2.0) * nbLinPyra + 3 * nbLinHexa);
int nbLinQuadGuess = int((2.0 / 3.0) * nbLinPrism + (1.0 / 2.0) * nbLinPyra + 3 * nbLinHexa);
int nbQuadQuadGuess = int((2.0 / 3.0) * nbQuadPrism + (1.0 / 2.0) * nbQuadPyra + 3 * nbQuadHexa);
int GuessSize[VTK_QUADRATIC_TETRA];
GuessSize[VTK_LINE] = nbLineGuess;
GuessSize[VTK_QUADRATIC_EDGE] = nbQuadEdgeGuess;
GuessSize[VTK_TRIANGLE] = nbLinTriaGuess;
GuessSize[VTK_QUADRATIC_TRIANGLE] = nbQuadTriaGuess;
GuessSize[VTK_QUAD] = nbLinQuadGuess;
GuessSize[VTK_QUADRATIC_QUAD] = nbQuadQuadGuess;
GuessSize[VTK_TETRA] = nbLinTetra;
GuessSize[VTK_QUADRATIC_TETRA] = nbQuadTetra;
GuessSize[VTK_PYRAMID] = nbLinPyra;
GuessSize[VTK_QUADRATIC_PYRAMID] = nbQuadPyra;
GuessSize[VTK_WEDGE] = nbLinPrism;
GuessSize[VTK_QUADRATIC_WEDGE] = nbQuadPrism;
GuessSize[VTK_HEXAHEDRON] = nbLinHexa;
GuessSize[VTK_QUADRATIC_HEXAHEDRON] = nbQuadHexa;
int GuessSize[VTK_MAXTYPE];
GuessSize[VTK_LINE] = nbLineGuess;
GuessSize[VTK_QUADRATIC_EDGE] = nbQuadEdgeGuess;
GuessSize[VTK_TRIANGLE] = nbLinTriaGuess;
GuessSize[VTK_QUADRATIC_TRIANGLE] = nbQuadTriaGuess;
GuessSize[VTK_QUAD] = nbLinQuadGuess;
GuessSize[VTK_QUADRATIC_QUAD] = nbQuadQuadGuess;
GuessSize[VTK_BIQUADRATIC_QUAD] = nbQuadQuadGuess;
GuessSize[VTK_TETRA] = nbLinTetra;
GuessSize[VTK_QUADRATIC_TETRA] = nbQuadTetra;
GuessSize[VTK_PYRAMID] = nbLinPyra;
GuessSize[VTK_QUADRATIC_PYRAMID] = nbQuadPyra;
GuessSize[VTK_WEDGE] = nbLinPrism;
GuessSize[VTK_QUADRATIC_WEDGE] = nbQuadPrism;
GuessSize[VTK_HEXAHEDRON] = nbLinHexa;
GuessSize[VTK_QUADRATIC_HEXAHEDRON] = nbQuadHexa;
GuessSize[VTK_TRIQUADRATIC_HEXAHEDRON] = nbQuadHexa;
GuessSize[VTK_HEXAGONAL_PRISM] = nbHexPrism;
_downArray[VTK_LINE]->allocate(nbLineGuess);
_downArray[VTK_QUADRATIC_EDGE]->allocate(nbQuadEdgeGuess);
_downArray[VTK_TRIANGLE]->allocate(nbLinTriaGuess);
_downArray[VTK_QUADRATIC_TRIANGLE]->allocate(nbQuadTriaGuess);
_downArray[VTK_QUAD]->allocate(nbLinQuadGuess);
_downArray[VTK_QUADRATIC_QUAD]->allocate(nbQuadQuadGuess);
_downArray[VTK_TETRA]->allocate(nbLinTetra);
_downArray[VTK_QUADRATIC_TETRA]->allocate(nbQuadTetra);
_downArray[VTK_PYRAMID]->allocate(nbLinPyra);
_downArray[VTK_QUADRATIC_PYRAMID]->allocate(nbQuadPyra);
_downArray[VTK_WEDGE]->allocate(nbLinPrism);
_downArray[VTK_QUADRATIC_WEDGE]->allocate(nbQuadPrism);
_downArray[VTK_HEXAHEDRON]->allocate(nbLinHexa);
_downArray[VTK_QUADRATIC_HEXAHEDRON]->allocate(nbQuadHexa);
_downArray[VTK_LINE] ->allocate(nbLineGuess);
_downArray[VTK_QUADRATIC_EDGE] ->allocate(nbQuadEdgeGuess);
_downArray[VTK_TRIANGLE] ->allocate(nbLinTriaGuess);
_downArray[VTK_QUADRATIC_TRIANGLE] ->allocate(nbQuadTriaGuess);
_downArray[VTK_QUAD] ->allocate(nbLinQuadGuess);
_downArray[VTK_QUADRATIC_QUAD] ->allocate(nbQuadQuadGuess);
_downArray[VTK_BIQUADRATIC_QUAD] ->allocate(nbQuadQuadGuess);
_downArray[VTK_TETRA] ->allocate(nbLinTetra);
_downArray[VTK_QUADRATIC_TETRA] ->allocate(nbQuadTetra);
_downArray[VTK_PYRAMID] ->allocate(nbLinPyra);
_downArray[VTK_QUADRATIC_PYRAMID] ->allocate(nbQuadPyra);
_downArray[VTK_WEDGE] ->allocate(nbLinPrism);
_downArray[VTK_QUADRATIC_WEDGE] ->allocate(nbQuadPrism);
_downArray[VTK_HEXAHEDRON] ->allocate(nbLinHexa);
_downArray[VTK_QUADRATIC_HEXAHEDRON] ->allocate(nbQuadHexa);
_downArray[VTK_TRIQUADRATIC_HEXAHEDRON]->allocate(nbQuadHexa);
_downArray[VTK_HEXAGONAL_PRISM] ->allocate(nbHexPrism);
// --- iteration on vtkUnstructuredGrid cells, only faces
// for each vtk face: