Version: 8.3.0
SMESH_ProxyMesh Class Reference

Container of xD mesh elements substituting other ones in the input mesh of an (x+1)D algorithm. More...

#include <SMESH_ProxyMesh.hxx>

Inheritance diagram for SMESH_ProxyMesh:

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)
 
virtual ~SMESH_ProxyMesh ()
 Destructor deletes proxy submeshes and tmp elemens. More...
 
const SMESHDS_SubMeshGetSubMesh (const TopoDS_Shape &shape) const
 Returns the submesh of a shape; it can be a proxy sub-mesh. More...
 
const SubMeshGetProxySubMesh (const TopoDS_Shape &shape) const
 Returns the proxy sub-mesh of a shape; it can be NULL. More...
 
const SMDS_MeshNodeGetProxyNode (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...
 
int 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...
 
SMESH_MeshGetMesh () const
 
SMESHDS_MeshGetMeshDS () const
 Returns mesh DS. More...
 

Protected Member Functions

void setMesh (const SMESH_Mesh &mesh)
 
int shapeIndex (const TopoDS_Shape &shape) const
 Returns index of a shape. More...
 
virtual SubMeshnewSubmesh (int index=0) const
 
SubMeshfindProxySubMesh (int shapeIndex=0) const
 Returns a proxy sub-mesh. More...
 
SubMeshgetProxySubMesh (int shapeIndex)
 Returns a proxy sub-mesh; it is created if not yet exists. More...
 
SubMeshgetProxySubMesh (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 Attributes

const SMESH_Mesh_mesh
 
std::vector< SubMesh * > _subMeshes
 
std::set< const
SMDS_MeshElement * > 
_elemsInMesh
 
SubMesh _subContainer
 

Detailed Description

Container of xD mesh elements substituting other ones in the input mesh of an (x+1)D algorithm.

Member Typedef Documentation

typedef boost::shared_ptr<SMESH_ProxyMesh> SMESH_ProxyMesh::Ptr
typedef std::map<const SMDS_MeshNode*, const SMDS_MeshNode*, TIDCompare > SMESH_ProxyMesh::TN2NMap

Constructor & Destructor Documentation

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, if(), and takeTmpElemsInMesh().

SMESH_ProxyMesh::SMESH_ProxyMesh ( const SMESH_Mesh mesh)

References _mesh.

SMESH_ProxyMesh::~SMESH_ProxyMesh ( )
virtual

Destructor deletes proxy submeshes and tmp elemens.

References _elemsInMesh, _subMeshes, GetMeshDS(), and SMESHDS_Mesh::RemoveFreeElement().

Member Function Documentation

SMESH_ProxyMesh::SubMesh * SMESH_ProxyMesh::findProxySubMesh ( int  shapeIndex = 0) const
protected

Returns a proxy sub-mesh.

References _subMeshes.

Referenced by StdMeshers_QuadToTriaAdaptor::Compute2ndPart(), GetProxyNode(), and takeProxySubMesh().

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().

const SMDS_MeshNode * SMESH_ProxyMesh::GetProxyNode ( const SMDS_MeshNode node) const
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::MakeN2NMap().

SMESH_ProxyMesh::SubMesh * SMESH_ProxyMesh::getProxySubMesh ( int  shapeIndex)
protected

Returns a proxy sub-mesh; it is created if not yet exists.

References _subMeshes, and newSubmesh().

Referenced by StdMeshers_QuadToTriaAdaptor::Compute(), VISCOUS_3D::_MeshOfSolid::getFaceSubM(), and getProxySubMesh().

SMESH_ProxyMesh::SubMesh * SMESH_ProxyMesh::getProxySubMesh ( const TopoDS_Shape &  shape = TopoDS_Shape())
protected

Returns a proxy sub-mesh; it is created if not yet exists.

References getProxySubMesh(), and shapeIndex().

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 SMESH_MesherHelper::LoadNodeColumns().

int SMESH_ProxyMesh::NbProxySubMeshes ( ) const

Returns number of proxy sub-meshes.

References _subMeshes.

virtual SubMesh* SMESH_ProxyMesh::newSubmesh ( int  index = 0) const
protectedvirtual

Reimplemented in VISCOUS_2D::_ProxyMeshOfFace.

Referenced by getProxySubMesh().

void SMESH_ProxyMesh::removeTmpElement ( const SMDS_MeshElement elem)
protected
void SMESH_ProxyMesh::setMesh ( const SMESH_Mesh mesh)
protected
void SMESH_ProxyMesh::setNode2Node ( const SMDS_MeshNode srcNode,
const SMDS_MeshNode proxyNode,
const SubMesh subMesh 
)
protected

Set node-node correspondence.

References SMESH_ProxyMesh::SubMesh::_n2n.

Referenced by VISCOUS_3D::_MeshOfSolid::setNode2Node().

int SMESH_ProxyMesh::shapeIndex ( const TopoDS_Shape &  shape) const
protected
void SMESH_ProxyMesh::storeTmpElement ( const SMDS_MeshElement elem)
protected

Stores tmp element residing the _mesh.

References _elemsInMesh.

Referenced by StdMeshers_QuadToTriaAdaptor::Compute().

bool SMESH_ProxyMesh::takeProxySubMesh ( const TopoDS_Shape &  shape,
SMESH_ProxyMesh proxyMesh 
)
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().

void SMESH_ProxyMesh::takeTmpElemsInMesh ( SMESH_ProxyMesh proxyMesh)
protected

Move tmp elements residing the _mesh from other proxy mesh to this.

References _elemsInMesh.

Referenced by StdMeshers_QuadToTriaAdaptor::Compute(), and SMESH_ProxyMesh().

Field Documentation

std::vector< SMDSAbs_EntityType> SMESH_ProxyMesh::_allowedTypes
protected
std::set< const SMDS_MeshElement* > SMESH_ProxyMesh::_elemsInMesh
private
SubMesh SMESH_ProxyMesh::_subContainer
mutableprivate

Referenced by GetFaces().