Version: 8.3.0
DriverMED_Family Class Reference

#include <DriverMED_Family.h>

Public Member Functions

 DriverMED_Family ()
 Default constructor. More...
 
MED::PFamilyInfo GetFamilyInfo (const MED::PWrapper &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 std::set
< SMDSAbs_ElementType > & 
GetTypes () const
 
bool MemberOf (std::string theGroupName) const
 
int GetGroupAttributVal () const
 
void SetGroupAttributVal (int theValue)
 

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
 
std::set< SMDSAbs_ElementTypemyTypes
 

Constructor & Destructor Documentation

DriverMED_Family::DriverMED_Family ( )

Default constructor.

Member Function Documentation

void DriverMED_Family::AddElement ( const SMDS_MeshElement theElement)
void DriverMED_Family::AddGroupName ( std::string  theGroupName)
const ElementsSet & DriverMED_Family::GetElements ( ) const

Returns elements of this family.

MED::PFamilyInfo DriverMED_Family::GetFamilyInfo ( const MED::PWrapper theWrapper,
const MED::PMeshInfo theMeshInfo 
) const

Create TFamilyInfo for this family.

int DriverMED_Family::GetGroupAttributVal ( ) const
const MED::TStringSet & DriverMED_Family::GetGroupNames ( ) const
int DriverMED_Family::GetId ( ) const

Returns a family ID.

SMDSAbs_ElementType DriverMED_Family::GetType ( )
const std::set< SMDSAbs_ElementType > & DriverMED_Family::GetTypes ( ) const
bool DriverMED_Family::IsEmpty ( ) const
private

Check, if this family has empty list of elements.

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

bool DriverMED_Family::MemberOf ( std::string  theGroupName) const
void DriverMED_Family::SetGroupAttributVal ( int  theValue)
void DriverMED_Family::SetId ( const int  theId)

Sets a family ID.

void DriverMED_Family::SetType ( const SMDSAbs_ElementType  theType)
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.

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

ElementsSet DriverMED_Family::myElements
private
int DriverMED_Family::myGroupAttributVal
private
MED::TStringSet DriverMED_Family::myGroupNames
private
int DriverMED_Family::myId
private
SMDSAbs_ElementType DriverMED_Family::myType
private
std::set<SMDSAbs_ElementType> DriverMED_Family::myTypes
private