Container of xD mesh elements substituting other ones in the input mesh of an (x+1)D algorithm. More...
#include <SMESH_ProxyMesh.hxx>

Data Structures | |
| class | SubMesh |
| Proxy sub-mesh. More... | |
Public Types | |
| typedef boost::shared_ptr< SMESH_ProxyMesh > | Ptr |
| typedef std::map< const SMDS_MeshNode *, const SMDS_MeshNode *, TIDCompare > | TN2NMap |
Public Member Functions | |
| SMESH_ProxyMesh () | |
| Constructor; mesh must be set by a descendant class. More... | |
| SMESH_ProxyMesh (std::vector< SMESH_ProxyMesh::Ptr > &components) | |
| Make a proxy mesh from components. More... | |
| SMESH_ProxyMesh (const SMESH_Mesh &mesh) | |
| Constructor. More... | |
| virtual | ~SMESH_ProxyMesh () |
| Destructor deletes proxy submeshes and tmp elements. More... | |
| const SMESHDS_SubMesh * | GetSubMesh (const TopoDS_Shape &shape) const |
| Returns the submesh of a shape; it can be a proxy sub-mesh. More... | |
| const SMESHDS_SubMesh * | GetSubMesh (const int shapeID) const |
| Return a sub-mesh by a shape ID; it can be a proxy sub-mesh. More... | |
| const SubMesh * | GetProxySubMesh (const TopoDS_Shape &shape) const |
| Returns the proxy sub-mesh of a shape; it can be NULL. More... | |
| const SMDS_MeshNode * | GetProxyNode (const SMDS_MeshNode *node) const |
| Returns the proxy node of a node; the input node is returned if no proxy exists. More... | |
| int | NbProxySubMeshes () const |
| Returns number of proxy sub-meshes. More... | |
| SMDS_ElemIteratorPtr | GetFaces () const |
| Returns iterator on all faces of the mesh taking into account substitutions To be used in case of mesh without shape. More... | |
| SMDS_ElemIteratorPtr | GetFaces (const TopoDS_Shape &face) const |
| Returns iterator on all faces on the shape taking into account substitutions. More... | |
| smIdType | NbFaces () const |
| Return total nb of faces taking into account substitutions. More... | |
| bool | IsTemporary (const SMDS_MeshElement *elem) const |
| Return true if the element is a temporary one. More... | |
| SMDS_ElemIteratorPtr | GetInverseElementIterator (const SMDS_MeshNode *node, SMDSAbs_ElementType type) const |
| Return iterator on inverse elements of a node that may be a proxy one. More... | |
| SMESH_Mesh * | GetMesh () const |
| SMESHDS_Mesh * | GetMeshDS () const |
| Returns mesh DS. More... | |
Static Public Member Functions | |
| static bool | HasPrismsOnTwoSides (SMESHDS_SubMesh *faceSM) |
| Check if a FACE has prisms on its both sides. More... | |
Protected Member Functions | |
| void | setMesh (const SMESH_Mesh &mesh) |
| Set mesh. More... | |
| int | shapeIndex (const TopoDS_Shape &shape) const |
| Returns index of a shape. More... | |
| virtual SubMesh * | newSubmesh (int index=0) const |
| Create a SubMesh. More... | |
| SubMesh * | findProxySubMesh (int shapeIndex=0) const |
| Returns a proxy sub-mesh. More... | |
| SubMesh * | getProxySubMesh (int shapeIndex) |
| Returns a proxy sub-mesh; it is created if not yet exists. More... | |
| SubMesh * | getProxySubMesh (const TopoDS_Shape &shape=TopoDS_Shape()) |
| Returns a proxy sub-mesh; it is created if not yet exists. More... | |
| bool | takeProxySubMesh (const TopoDS_Shape &shape, SMESH_ProxyMesh *proxyMesh) |
| Move proxy sub-mesh from other proxy mesh to this, returns true if sub-mesh found. More... | |
| void | takeTmpElemsInMesh (SMESH_ProxyMesh *proxyMesh) |
| Move tmp elements residing the _mesh from other proxy mesh to this. More... | |
| void | removeTmpElement (const SMDS_MeshElement *elem) |
| Removes tmp elements from the _mesh. More... | |
| void | storeTmpElement (const SMDS_MeshElement *elem) |
| Stores tmp element residing the _mesh. More... | |
| void | setNode2Node (const SMDS_MeshNode *srcNode, const SMDS_MeshNode *proxyNode, const SubMesh *subMesh) |
| Set node-node correspondence. More... | |
Protected Attributes | |
| std::vector< SMDSAbs_EntityType > | _allowedTypes |
Private Types | |
| typedef NCollection_DataMap< const SMDS_MeshNode *, std::vector< const SMDS_MeshElement * >, SMESH_Hasher > | TNodeElemVecMap |
Private Attributes | |
| const SMESH_Mesh * | _mesh |
| std::vector< SubMesh * > | _subMeshes |
| std::set< const SMDS_MeshElement * > | _elemsInMesh |
| TNodeElemVecMap | _inverseElements |
| SubMesh * | _subContainer |
Container of xD mesh elements substituting other ones in the input mesh of an (x+1)D algorithm.
| typedef boost::shared_ptr<SMESH_ProxyMesh> SMESH_ProxyMesh::Ptr |
| typedef std::map<const SMDS_MeshNode*, const SMDS_MeshNode*, TIDCompare > SMESH_ProxyMesh::TN2NMap |
|
private |
| SMESH_ProxyMesh::SMESH_ProxyMesh | ( | ) |
Constructor; mesh must be set by a descendant class.
| SMESH_ProxyMesh::SMESH_ProxyMesh | ( | std::vector< SMESH_ProxyMesh::Ptr > & | components | ) |
Make a proxy mesh from components.
Components become empty
References _allowedTypes, _mesh, _subMeshes, setMesh(), and takeTmpElemsInMesh().
| SMESH_ProxyMesh::SMESH_ProxyMesh | ( | const SMESH_Mesh & | mesh | ) |
Constructor.
|
virtual |
Destructor deletes proxy submeshes and tmp elements.
References _elemsInMesh, _subContainer, _subMeshes, GetMeshDS(), and SMESHDS_Mesh::RemoveFreeElement().
|
protected |
Returns a proxy sub-mesh.
References _subMeshes, and shapeIndex().
Referenced by StdMeshers_QuadToTriaAdaptor::Compute2ndPart(), VISCOUS_3D::_MeshOfSolid::getFaceSubM(), GetProxyNode(), and takeProxySubMesh().
| SMDS_ElemIteratorPtr SMESH_ProxyMesh::GetFaces | ( | ) | const |
Returns iterator on all faces of the mesh taking into account substitutions To be used in case of mesh without shape.
References _allowedTypes, _mesh, _subContainer, _subMeshes, SMESHDS_SubMesh::AddSubMesh(), SMDS_Mesh::elementsIterator(), GetMeshDS(), SMESH_Mesh::HasShapeToMesh(), NbFaces(), SMESH_Mesh::NbFaces(), SMESHDS_SubMesh::NbSubMeshes(), SMESHDS_SubMesh::RemoveAllSubmeshes(), and SMDSAbs_Face.
Referenced by StdMeshers_QuadToTriaAdaptor::Compute(), VISCOUS_3D::_ViscousBuilder::computeGeomSize(), and VISCOUS_3D::_ViscousBuilder::smoothAndCheck().
| SMDS_ElemIteratorPtr SMESH_ProxyMesh::GetFaces | ( | const TopoDS_Shape & | face | ) | const |
Returns iterator on all faces on the shape taking into account substitutions.
References _mesh, _subContainer, SMESHDS_SubMesh::AddSubMesh(), GetSubMesh(), SMESH_Mesh::HasShapeToMesh(), and SMESHDS_SubMesh::RemoveAllSubmeshes().
| SMDS_ElemIteratorPtr SMESH_ProxyMesh::GetInverseElementIterator | ( | const SMDS_MeshNode * | node, |
| SMDSAbs_ElementType | type | ||
| ) | const |
Return iterator on inverse elements of a node that may be a proxy one.
References _inverseElements, _subMeshes, SMDS_MeshNode::GetInverseElementIterator(), NbProxySubMeshes(), and SMDS_MeshElement::nodeIterator().
| SMESH_Mesh * SMESH_ProxyMesh::GetMesh | ( | ) | const |
| SMESHDS_Mesh * SMESH_ProxyMesh::GetMeshDS | ( | ) | const |
Returns mesh DS.
References _mesh, and SMESH_Mesh::GetMeshDS().
Referenced by StdMeshers_QuadToTriaAdaptor::Compute2ndPart(), SMESH_2D_Algo::FixInternalNodes(), GetFaces(), GetProxyNode(), GetSubMesh(), VISCOUS_3D::_ViscousBuilder::MakeN2NMap(), StdMeshers_QuadToTriaAdaptor::MergePiramids(), NbFaces(), newSubmesh(), VISCOUS_2D::_ProxyMeshOfFace::newSubmesh(), removeTmpElement(), setMesh(), shapeIndex(), _FaceSide::StoreNodes(), and ~SMESH_ProxyMesh().
| const SMDS_MeshNode * SMESH_ProxyMesh::GetProxyNode | ( | const SMDS_MeshNode * | node | ) | const |
Returns the proxy node of a node; the input node is returned if no proxy exists.
References _mesh, findProxySubMesh(), SMESH_Mesh::GetAncestors(), GetMeshDS(), SMDS_MeshNode::GetPosition(), SMDS_MeshElement::getshapeId(), SMESH_MesherHelper::GetSubShapeByNode(), shapeIndex(), and SMDS_TOP_FACE.
Referenced by _FaceSide::GetNbSegments(), SMESH_MesherHelper::LoadNodeColumns(), and _FaceSide::StoreNodes().
| const SMESH_ProxyMesh::SubMesh * SMESH_ProxyMesh::GetProxySubMesh | ( | const TopoDS_Shape & | shape | ) | const |
Returns the proxy sub-mesh of a shape; it can be NULL.
References _subMeshes, and shapeIndex().
Referenced by VISCOUS_3D::_ViscousBuilder::makeGroupOfLE(), and VISCOUS_3D::_ViscousBuilder::MakeN2NMap().
|
protected |
Returns a proxy sub-mesh; it is created if not yet exists.
References getProxySubMesh(), and shapeIndex().
|
protected |
Returns a proxy sub-mesh; it is created if not yet exists.
References _subMeshes, and newSubmesh().
Referenced by StdMeshers_QuadToTriaAdaptor::Compute(), VISCOUS_2D::_ProxyMeshOfFace::GetEdgeSubMesh(), VISCOUS_3D::_MeshOfSolid::getFaceSubM(), and getProxySubMesh().
| const SMESHDS_SubMesh * SMESH_ProxyMesh::GetSubMesh | ( | const int | shapeID | ) | const |
Return a sub-mesh by a shape ID; it can be a proxy sub-mesh.
References _subMeshes, GetMeshDS(), and SMESHDS_Mesh::MeshElements().
| const SMESHDS_SubMesh * SMESH_ProxyMesh::GetSubMesh | ( | const TopoDS_Shape & | shape | ) | const |
Returns the submesh of a shape; it can be a proxy sub-mesh.
References GetSubMesh(), and shapeIndex().
Referenced by StdMeshers_QuadToTriaAdaptor::Compute(), ComputePentahedralMesh(), SMESH_2D_Algo::FixInternalNodes(), GetFaces(), _FaceSide::GetNbSegments(), GetSubMesh(), _QuadFaceGrid::LoadGrid(), SMESH_MesherHelper::LoadNodeColumns(), and NbFaces().
|
static |
Check if a FACE has prisms on its both sides.
| [in] | smFace | - sub-mesh of the FACE. NOT a proxy sub-mesh! |
References SMDS_MeshElement::begin_nodes(), SMDS_MeshElement::end_nodes(), SMESHDS_SubMesh::GetElements(), SMDS_Mesh::GetElementsByNodes(), SMDS_MeshElement::NbCornerNodes(), SMESHDS_SubMesh::NbElements(), and SMDSAbs_Volume.
Referenced by StdMeshers_QuadToTriaAdaptor::Compute().
| bool SMESH_ProxyMesh::IsTemporary | ( | const SMDS_MeshElement * | elem | ) | const |
Return true if the element is a temporary one.
References _elemsInMesh, and SMDS_MeshElement::GetID().
Referenced by _QuadFaceGrid::LoadGrid(), and SMESH_MesherHelper::LoadNodeColumns().
| smIdType SMESH_ProxyMesh::NbFaces | ( | ) | const |
Return total nb of faces taking into account substitutions.
References _allowedTypes, _mesh, _subMeshes, GetMeshDS(), SMDS_Mesh::GetMeshInfo(), SMESH_Mesh::GetShapeToMesh(), GetSubMesh(), SMESH_Mesh::HasShapeToMesh(), SMDS_MeshInfo::NbEntities(), SMDS_Mesh::NbFaces(), SMDSEntity_Quad_Quadrangle, and SMDSEntity_Triangle.
Referenced by GetFaces().
| int SMESH_ProxyMesh::NbProxySubMeshes | ( | ) | const |
Returns number of proxy sub-meshes.
References _subMeshes.
Referenced by GetInverseElementIterator().
|
protectedvirtual |
Create a SubMesh.
| [ino] | index - shape index |
Reimplemented in VISCOUS_2D::_ProxyMeshOfFace.
References GetMeshDS().
Referenced by getProxySubMesh().
|
protected |
Removes tmp elements from the _mesh.
References _elemsInMesh, SMDS_MeshElement::begin_nodes(), SMDS_MeshElement::end_nodes(), SMDS_MeshElement::GetID(), GetMeshDS(), SMESHDS_Mesh::RemoveFreeElement(), and SMESHDS_Mesh::RemoveFreeNode().
Referenced by StdMeshers_QuadToTriaAdaptor::Compute(), and StdMeshers_QuadToTriaAdaptor::MergePiramids().
|
protected |
Set mesh.
References _mesh, _subContainer, and GetMeshDS().
Referenced by VISCOUS_3D::_MeshOfSolid::_MeshOfSolid(), StdMeshers_QuadToTriaAdaptor::Compute(), and SMESH_ProxyMesh().
|
protected |
Set node-node correspondence.
References SMESH_ProxyMesh::SubMesh::_n2n.
Referenced by VISCOUS_3D::_MeshOfSolid::setNode2Node().
|
protected |
Returns index of a shape.
References _mesh, GetMeshDS(), and SMESH_Mesh::HasShapeToMesh().
Referenced by findProxySubMesh(), VISCOUS_3D::_MeshOfSolid::getFaceSubM(), GetProxyNode(), GetProxySubMesh(), getProxySubMesh(), GetSubMesh(), and takeProxySubMesh().
|
protected |
Stores tmp element residing the _mesh.
References _elemsInMesh.
Referenced by StdMeshers_QuadToTriaAdaptor::Compute().
|
protected |
Move proxy sub-mesh from other proxy mesh to this, returns true if sub-mesh found.
References _mesh, _subMeshes, findProxySubMesh(), and shapeIndex().
Referenced by StdMeshers_QuadToTriaAdaptor::Compute().
|
protected |
Move tmp elements residing the _mesh from other proxy mesh to this.
References _elemsInMesh.
Referenced by StdMeshers_QuadToTriaAdaptor::Compute(), and SMESH_ProxyMesh().
|
protected |
Referenced by StdMeshers_QuadToTriaAdaptor::Compute(), GetFaces(), NbFaces(), and SMESH_ProxyMesh().
|
private |
Referenced by IsTemporary(), removeTmpElement(), storeTmpElement(), takeTmpElemsInMesh(), and ~SMESH_ProxyMesh().
|
private |
Referenced by GetInverseElementIterator().
|
private |
Referenced by GetFaces(), GetMesh(), GetMeshDS(), GetProxyNode(), NbFaces(), setMesh(), shapeIndex(), SMESH_ProxyMesh(), and takeProxySubMesh().
|
mutableprivate |
Referenced by GetFaces(), setMesh(), and ~SMESH_ProxyMesh().
|
private |