Version: 9.16.0
SMDS_MeshGroup Class Reference

#include <SMDS_MeshGroup.hxx>

Inheritance diagram for SMDS_MeshGroup:

Public Member Functions

 SMDS_MeshGroup (const SMDS_Mesh *theMesh, const SMDSAbs_ElementType theType=SMDSAbs_All)
 
void SetType (const SMDSAbs_ElementType theType)
 
void Clear ()
 
void Reserve (size_t)
 
bool Add (const SMDS_MeshElement *theElem)
 
bool Remove (const SMDS_MeshElement *theElem)
 
bool IsEmpty () const
 
smIdType Extent () const
 
int Tic () const
 
bool Contains (const SMDS_MeshElement *theElem) const
 
const SMDS_MeshGetMesh () const
 
SMDSAbs_ElementType GetType () const
 
SMDS_ElemIteratorPtr GetElements () const
 
void operator= (SMDS_MeshGroup &&other)
 

Protected Member Functions

virtual SMDS_ElemIteratorPtr getElements ()
 < the descendant object return its elements just before the mesh compacting More...
 
virtual void tmpClear ()
 the descendant object re-add its elements after the mesh compacting More...
 
virtual void add (const SMDS_MeshElement *element)
 the descendant squeeze its element storage after re-adding elements More...
 
virtual void compact ()
 allow the descendant treat its elements before mesh clearing More...
 

Private Types

typedef std::set< const SMDS_MeshElement * > TElementSet
 
typedef TElementSet::const_iterator TIterator
 

Private Member Functions

virtual void clear ()
 
void beforeCompacting ()
 store vtkIDs of elements More...
 
void restoreElements (const std::vector< smIdType > &idNodessOldToNew, const std::vector< smIdType > &idCellsOldToNew)
 restore pointers to elements More...
 

Private Attributes

const SMDS_MeshmyMesh
 
SMDSAbs_ElementType myType
 
TElementSet myElements
 
int myTic
 
std::vector< const SMDS_MeshElement * > myExternalElems
 elements not contained in the mesh More...
 
std::vector< vtkIdType > myVtkIDs
 vtk IDs of elements More...
 
std::vector< boolmyIsNode
 
std::set< SMDS_ElementHolder * >::iterator myPtrInMesh
 

Member Typedef Documentation

◆ TElementSet

typedef std::set< const SMDS_MeshElement* > SMDS_MeshGroup::TElementSet
private

◆ TIterator

typedef TElementSet::const_iterator SMDS_MeshGroup::TIterator
private

Constructor & Destructor Documentation

◆ SMDS_MeshGroup()

SMDS_MeshGroup::SMDS_MeshGroup ( const SMDS_Mesh theMesh,
const SMDSAbs_ElementType  theType = SMDSAbs_All 
)

Member Function Documentation

◆ add()

virtual void SMDS_MeshGroup::add ( const SMDS_MeshElement element)
protectedvirtual

the descendant squeeze its element storage after re-adding elements

Implements SMDS_ElementHolder.

References SMESHUtils::Add().

◆ Add()

◆ beforeCompacting()

◆ clear()

virtual void SMDS_ElementHolder::clear ( )
protectedvirtualinherited

◆ Clear()

void SMDS_MeshGroup::Clear ( )

References myElements, myTic, myType, and SMDSAbs_All.

Referenced by SMESHDS_Group::Clear().

◆ compact()

virtual void SMDS_MeshGroup::compact ( )
protectedvirtual

allow the descendant treat its elements before mesh clearing

Implements SMDS_ElementHolder.

◆ Contains()

bool SMDS_MeshGroup::Contains ( const SMDS_MeshElement theElem) const

◆ Extent()

smIdType SMDS_MeshGroup::Extent ( ) const

Referenced by SMESHDS_Group::Extent().

◆ getElements()

virtual SMDS_ElemIteratorPtr SMDS_MeshGroup::getElements ( )
protectedvirtual

< the descendant object return its elements just before the mesh compacting

the descendant object temporary remove its elements

Implements SMDS_ElementHolder.

◆ GetElements()

SMDS_ElemIteratorPtr SMDS_MeshGroup::GetElements ( ) const

References myElements.

Referenced by SMESHDS_Group::GetElements().

◆ GetMesh()

const SMDS_Mesh * SMDS_MeshGroup::GetMesh ( ) const

◆ GetType()

◆ IsEmpty()

bool SMDS_MeshGroup::IsEmpty ( ) const

◆ operator=()

void SMDS_MeshGroup::operator= ( SMDS_MeshGroup &&  other)

References myElements, myMesh, myTic, and myType.

◆ Remove()

◆ Reserve()

void SMDS_MeshGroup::Reserve ( size_t  )

◆ restoreElements()

void SMDS_ElementHolder::restoreElements ( const std::vector< smIdType > &  idNodessOldToNew,
const std::vector< smIdType > &  idCellsOldToNew 
)
privateinherited

◆ SetType()

void SMDS_MeshGroup::SetType ( const SMDSAbs_ElementType  theType)

References IsEmpty(), and myType.

Referenced by SMESHDS_Group::SetType().

◆ Tic()

int SMDS_MeshGroup::Tic ( ) const

Referenced by SMESHDS_Group::GetTic().

◆ tmpClear()

void SMDS_MeshGroup::tmpClear ( )
protectedvirtual

the descendant object re-add its elements after the mesh compacting

Implements SMDS_ElementHolder.

References myElements.

Field Documentation

◆ myElements

TElementSet SMDS_MeshGroup::myElements
private

◆ myExternalElems

std::vector<const SMDS_MeshElement*> SMDS_ElementHolder::myExternalElems
privateinherited

elements not contained in the mesh

Referenced by SMDS_ElementHolder::beforeCompacting(), and SMDS_ElementHolder::restoreElements().

◆ myIsNode

std::vector< bool > SMDS_ElementHolder::myIsNode
privateinherited

◆ myMesh

const SMDS_Mesh* SMDS_MeshGroup::myMesh
private

Referenced by operator=().

◆ myPtrInMesh

std::set<SMDS_ElementHolder*>::iterator SMDS_ElementHolder::myPtrInMesh
privateinherited

◆ myTic

int SMDS_MeshGroup::myTic
private

Referenced by Add(), Clear(), operator=(), and Remove().

◆ myType

SMDSAbs_ElementType SMDS_MeshGroup::myType
private

Referenced by Add(), Clear(), operator=(), Remove(), and SetType().

◆ myVtkIDs

std::vector< vtkIdType > SMDS_ElementHolder::myVtkIDs
privateinherited