<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>
\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>
mesh_area.png \
mesh_aspect.png \
mesh_aspect_3d.png \
+ mesh_biquad_quadrangle.png \
mesh_clear.png \
mesh_compute.png \
mesh_diagonal.png \
mesh_line_n.png \
mesh_line.png \
mesh_move_node.png \
+ mesh_octahedron.png \
mesh_orientation.png \
mesh.png \
mesh_polygon.png \
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 \
select1.png \
StdMeshers.xml \
mesh_pattern.png \
+ mesh_pentahedron.png \
pattern_sample_2d.png \
pattern_sample_3D.png \
mesh_add.png \
_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];
}
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()
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,
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,
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 (const std::vector<int> & nodes_ids,
+ const int ID);
- virtual SMDS_MeshFace* AddPolygonalFaceWithID (std::vector<const SMDS_MeshNode*> nodes,
- const int ID);
+ virtual SMDS_MeshFace* AddPolygonalFaceWithID (const std::vector<const SMDS_MeshNode*> & nodes,
+ const int ID);
- virtual SMDS_MeshFace* AddPolygonalFace (std::vector<const SMDS_MeshNode*> nodes);
+ 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);
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;
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:
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
};
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)
// d l c g d
// e e e e
// s
- // -----------------
- // 0 - DON't USE 0!!!
+ // =================
+ // 0 --------------- - DON't USE 0!!!
// 1 . *
// 2 .
// 3 . *
// 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;
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=
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
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
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
{
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;
}
int // NbEntities
-SMDS_MeshInfo::NbEntities(SMDSAbs_EntityType type) const
+SMDS_MeshInfo::NbEntities(SMDSAbs_EntityType type) const
{
switch (type) {
case SMDSEntity_Node:
case SMDSEntity_Quad_Quadrangle:
return myNbQuadQuadrangles;
break;
+ case SMDSEntity_BiQuad_Quadrangle:
+ return myNbBiQuadQuadrangles;
+ break;
case SMDSEntity_Polygon:
return myNbPolygons;
break;
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;
// --- create SMDS_Downward structures (in _downArray vector[vtkCellType])
- _downArray.resize(VTK_MAXTYPE + 1, 0); // --- max. type value = VTK_QUADRATIC_PYRAMID
-
- _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.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_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 nbLineGuess = int((4.0 / 3.0) * nbLinTetra + 2 * nbLinPrism + 2.5 * nbLinPyra + 3 * nbLinHexa);
+ 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 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;
-
- _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);
+ 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_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: