Version: 9.12.0
DriverMED_Family Class Reference

#include <DriverMED_Family.h>

Public Member Functions

 DriverMED_Family ()
 Default constructor. More...
 
template<class LowLevelWriter >
MED::PFamilyInfo GetFamilyInfo (const LowLevelWriter &theWrapper, const MED::PMeshInfo &theMeshInfo) const
 Create TFamilyInfo for this family. More...
 
const ElementsSetGetElements () const
 Returns elements of this family. More...
 
int GetId () const
 Returns a family ID. More...
 
void SetId (const int theId)
 Sets a family ID. More...
 
void AddElement (const SMDS_MeshElement *theElement)
 
const MED::TStringSetGetGroupNames () const
 
void AddGroupName (std::string theGroupName)
 
void SetType (const SMDSAbs_ElementType theType)
 
SMDSAbs_ElementType GetType ()
 
const ElemTypeSetGetTypes () const
 
bool MemberOf (std::string theGroupName) const
 
int GetGroupAttributVal () const
 
void SetGroupAttributVal (int theValue)
 
size_t NbElements (SMDSAbs_ElementType) const
 Return a number of elements of a given type. More...
 

Static Public Member Functions

static DriverMED_FamilyPtrList MakeFamilies (SMESHDS_SubMeshIteratorPtr theSubMeshes, const SMESHDS_GroupBasePtrList &theGroups, const bool doGroupOfNodes, const bool doGroupOfEdges, const bool doGroupOfFaces, const bool doGroupOfVolumes, const bool doGroupOf0DElems, const bool doGroupOfBalls, const bool doAllInGroups)
 Methods for groups storing to MED. More...
 

Private Member Functions

void Init (SMESHDS_GroupBase *group)
 Initialize the tool by SMESHDS_GroupBase. More...
 
void Split (DriverMED_FamilyPtr by, DriverMED_FamilyPtr common)
 Remove from <Elements> elements, common with <by>, Remove from <by> elements, common with <Elements>, Create family <common> from common elements, with combined groups list. More...
 
bool IsEmpty () const
 Check, if this family has empty list of elements. More...
 

Static Private Member Functions

static DriverMED_FamilyPtrList SplitByType (SMESHDS_SubMesh *theSubMesh, const int theId)
 Split <theSubMesh> on some parts (families) on the basis of the elements type. More...
 

Private Attributes

int myId
 
SMDSAbs_ElementType myType
 
ElementsSet myElements
 
MED::TStringSet myGroupNames
 
int myGroupAttributVal
 
ElemTypeSet myTypes
 

Constructor & Destructor Documentation

◆ DriverMED_Family()

DriverMED_Family::DriverMED_Family ( )

Default constructor.

Member Function Documentation

◆ AddElement()

void DriverMED_Family::AddElement ( const SMDS_MeshElement theElement)

◆ AddGroupName()

void DriverMED_Family::AddGroupName ( std::string  theGroupName)

◆ GetElements()

const ElementsSet & DriverMED_Family::GetElements ( ) const

Returns elements of this family.

◆ GetFamilyInfo()

template<class LowLevelWriter >
MED::PFamilyInfo DriverMED_Family::GetFamilyInfo ( const LowLevelWriter &  theWrapper,
const MED::PMeshInfo theMeshInfo 
) const

Create TFamilyInfo for this family.

References MED::GetNOMLength(), myGroupAttributVal, myGroupNames, and myId.

◆ GetGroupAttributVal()

int DriverMED_Family::GetGroupAttributVal ( ) const

◆ GetGroupNames()

const MED::TStringSet & DriverMED_Family::GetGroupNames ( ) const

◆ GetId()

int DriverMED_Family::GetId ( ) const

Returns a family ID.

◆ GetType()

SMDSAbs_ElementType DriverMED_Family::GetType ( )

◆ GetTypes()

const ElemTypeSet & DriverMED_Family::GetTypes ( ) const

◆ Init()

◆ IsEmpty()

bool DriverMED_Family::IsEmpty ( ) const
private

Check, if this family has empty list of elements.

◆ MakeFamilies()

DriverMED_FamilyPtrList DriverMED_Family::MakeFamilies ( SMESHDS_SubMeshIteratorPtr  theSubMeshes,
const SMESHDS_GroupBasePtrList theGroups,
const bool  doGroupOfNodes,
const bool  doGroupOfEdges,
const bool  doGroupOfFaces,
const bool  doGroupOfVolumes,
const bool  doGroupOf0DElems,
const bool  doGroupOfBalls,
const bool  doAllInGroups 
)
static

Methods for groups storing to MED.

Split each group from list <aGroups> on some parts (families) on the basis of the elements membership in other groups from this list.

Split each group from list <theGroups> and each sub-mesh from list <theSubMeshes> on some parts (families) on the basis of the elements membership in other groups from <theGroups> and other sub-meshes from <theSubMeshes>. Resulting families have no common elements.

Resulting families have no common elements.

References FIRST_ELEM_FAMILY, FIRST_NODE_FAMILY, SMESHDS_SubMesh::GetID(), SMESHDS_SubMesh::IsComplexSubmesh(), NIG_EDGES_FAMILY, NIG_FACES_FAMILY, NIG_GROUP_PREFIX, NIG_VOLS_FAMILY, REST_0DELEM_FAMILY, REST_BALL_FAMILY, REST_EDGES_FAMILY, REST_FACES_FAMILY, REST_NODES_FAMILY, REST_VOLUMES_FAMILY, SMDSAbs_0DElement, SMDSAbs_All, SMDSAbs_Ball, SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Node, and SMDSAbs_Volume.

Referenced by DriverMED_W_SMESHDS_Mesh::PerformInternal().

◆ MemberOf()

bool DriverMED_Family::MemberOf ( std::string  theGroupName) const

◆ NbElements()

size_t DriverMED_Family::NbElements ( SMDSAbs_ElementType  theType) const

Return a number of elements of a given type.

◆ SetGroupAttributVal()

void DriverMED_Family::SetGroupAttributVal ( int  theValue)

◆ SetId()

void DriverMED_Family::SetId ( const int  theId)

Sets a family ID.

◆ SetType()

void DriverMED_Family::SetType ( const SMDSAbs_ElementType  theType)

◆ Split()

void DriverMED_Family::Split ( DriverMED_FamilyPtr  by,
DriverMED_FamilyPtr  common 
)
private

Remove from <Elements> elements, common with <by>, Remove from <by> elements, common with <Elements>, Create family <common> from common elements, with combined groups list.

Remove from <myElements> elements, common with <by>, Remove from <by> elements, common with <myElements>, Create family <common> from common elements, with combined groups list.

◆ SplitByType()

DriverMED_FamilyPtrList DriverMED_Family::SplitByType ( SMESHDS_SubMesh theSubMesh,
const int  theId 
)
staticprivate

Split <theSubMesh> on some parts (families) on the basis of the elements type.

References SMESHDS_SubMesh::GetElements(), SMESHDS_SubMesh::GetNodes(), SMDS_MeshElement::GetType(), SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Node, and SMDSAbs_Volume.

Field Documentation

◆ myElements

ElementsSet DriverMED_Family::myElements
private

◆ myGroupAttributVal

int DriverMED_Family::myGroupAttributVal
private

Referenced by GetFamilyInfo().

◆ myGroupNames

MED::TStringSet DriverMED_Family::myGroupNames
private

Referenced by GetFamilyInfo().

◆ myId

int DriverMED_Family::myId
private

Referenced by GetFamilyInfo().

◆ myType

SMDSAbs_ElementType DriverMED_Family::myType
private

◆ myTypes

ElemTypeSet DriverMED_Family::myTypes
private