v0.8.13
Public Member Functions | Public Attributes | Protected Attributes | List of all members
MoFEM::MeshsetsManager Struct Reference

Interface for managing meshsets containing materials and boundary conditions. More...

#include <src/interfaces/MeshsetsManager.hpp>

Inheritance diagram for MoFEM::MeshsetsManager:
[legend]
Collaboration diagram for MoFEM::MeshsetsManager:
[legend]

Public Member Functions

MoFEMErrorCode query_interface (const MOFEMuuid &uuid, UnknownInterface **iface) const
 
 MeshsetsManager (const MoFEM::Core &core)
 
 ~MeshsetsManager ()
 
MoFEMErrorCode getTags (int verb=-1)
 get tags handlers used on meshsets More...
 
Tag get_nsTag () const
 get tag handle used to store "id" of NODESET More...
 
Tag get_ssTag () const
 get tag handle used to store "id" of SIDESET More...
 
Tag get_nsTag_data () const
 get tag handle used to store boundary data on NODESET More...
 
Tag get_ssTag_data () const
 get tag handle used to store boundary data on SIDESET More...
 
Tag get_bhTag () const
 get tag handle used to store "id" of BLOCKSET More...
 
Tag get_bhTag_header () const
 get tag handle used to store of block set header (Used by Cubit) More...
 
MeshsetsManagerget_meshsets_manager_ptr ()
 return pointer to meshset manager More...
 
const MeshsetsManagerget_meshsets_manager_ptr () const
 return pointer to meshset manager More...
 
MoFEMErrorCode clearMap ()
 clear multi-index container More...
 
MoFEMErrorCode initialiseDatabaseFromMesh (int verb=0)
 
template<class CUBIT_BC_DATA_TYPE >
MoFEMErrorCode printBcSet (CUBIT_BC_DATA_TYPE &data, unsigned long int type) const
 
MoFEMErrorCode printDisplacementSet () const
 print meshsets with displacement boundary conditions data structure More...
 
MoFEMErrorCode printPressureSet () const
 print meshsets with pressure boundary conditions data structure More...
 
MoFEMErrorCode printForceSet () const
 print meshsets with force boundary conditions data structure More...
 
MoFEMErrorCode printTemperatureSet () const
 print meshsets with temperature boundary conditions data structure More...
 
MoFEMErrorCode printHeatFluxSet () const
 print meshsets with heat flux boundary conditions data structure More...
 
MoFEMErrorCode printMaterialsSet () const
 print meshsets with material data structure set on it More...
 
CubitMeshSet_multiIndexgetMeshsetsMultindex ()
 
CubitMeshSet_multiIndex::iterator getBegin () const
 get begin iterator of cubit mehset of given type (instead you can use IT_CUBITMESHSETS_TYPE_FOR_LOOP(MFIELD,CUBITBCTYPE,IT) More...
 
CubitMeshSet_multiIndex::iterator getEnd () const
 get begin iterator of cubit mehset of given type (instead you can use IT_CUBITMESHSETS_TYPE_FOR_LOOP(MFIELD,CUBITBCTYPE,IT) More...
 
CubitMeshsetByType::iterator getBegin (const unsigned int cubit_bc_type) const
 get begin iterator of cubit mehset of given type (instead you can use IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP(MFIELD,CUBITBCTYPE,IT) More...
 
CubitMeshsetByType::iterator getEnd (const unsigned int cubit_bc_type) const
 get begin iterator of cubit mehset of given type (instead you can use IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP(MFIELD,CUBITBCTYPE,IT) More...
 
CubitMeshsetByMask::iterator getBySetTypeBegin (const unsigned int cubit_bc_type) const
 get end iterator of cubit meshset of given type (instead you can use IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP(MFIELD,CUBITBCTYPE,IT) More...
 
CubitMeshsetByMask::iterator getBySetTypeEnd (const unsigned int cubit_bc_type) const
 get end iterator of cubit mehset of given type (instead you can use IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP(MFIELD,CUBITBCTYPE,IT) More...
 
CubitMeshsetByName::iterator getBegin (const std::string &name) const
 get begin iterator of cubit mehset of given type (instead you can use IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP(MFIELD,CUBITBCTYPE,IT) More...
 
CubitMeshsetByName::iterator getEnd (const std::string &name) const
 get begin iterator of cubit mehset of given type (instead you can use IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP(MFIELD,CUBITBCTYPE,IT) More...
 
bool checkMeshset (const int ms_id, const CubitBCType cubit_bc_type) const
 check for CUBIT Id and CUBIT type More...
 
bool checkMeshset (const string name, int *const number_of_meshsets_ptr=NULL) const
 check if meshset of given name exist More...
 
MoFEMErrorCode addMeshset (const CubitBCType cubit_bc_type, const int ms_id, const std::string name="")
 add cubit meshset More...
 
MoFEMErrorCode addEntitiesToMeshset (const CubitBCType cubit_bc_type, const int ms_id, const Range &ents)
 add entities to cubit meshset More...
 
MoFEMErrorCode addEntitiesToMeshset (const CubitBCType cubit_bc_type, const int ms_id, const EntityHandle *ents, const int nb_ents)
 add entities to cubit meshset More...
 
MoFEMErrorCode setAtributes (const CubitBCType cubit_bc_type, const int ms_id, const std::vector< double > &attributes, const std::string name="")
 set attributes to cubit meshset More...
 
MoFEMErrorCode setAtributesByDataStructure (const CubitBCType cubit_bc_type, const int ms_id, const GenericAttributeData &data, const std::string name="")
 set (material) data structure to cubit meshset More...
 
MoFEMErrorCode setBcData (const CubitBCType cubit_bc_type, const int ms_id, const GenericCubitBcData &data)
 set boundary data structure to meshset More...
 
MoFEMErrorCode deleteMeshset (const CubitBCType cubit_bc_type, const int ms_id, const MoFEMTypes bh=MF_EXIST)
 delete cubit meshset More...
 
MoFEMErrorCode getCubitMeshsetPtr (const int ms_id, const CubitBCType cubit_bc_type, const CubitMeshSets **cubit_meshset_ptr)
 get cubit meshset More...
 
MoFEMErrorCode getCubitMeshsetPtr (const string name, const CubitMeshSets **cubit_meshset_ptr)
 get cubit meshset More...
 
MoFEMErrorCode getEntitiesByDimension (const int ms_id, const unsigned int cubit_bc_type, const int dimension, Range &entities, const bool recursive=true)
 get entities from CUBIT/meshset of a particular entity dimensionNodeset can contain nodes, edges, triangles and tets. This applies to other meshsets too. The nodeset's meshset contain the nodes in the MIDDLE of the surface or volume which is done by default in Cubit, Hence if all nodes on a particular nodeset are required, one should get all triangles or tetrahedrons for which the nodeset was create in Cubit, and get all the connectivities of tris/tets. More...
 
MoFEMErrorCode getEntitiesByDimension (const int ms_id, const unsigned int cubit_bc_type, Range &entities, const bool recursive=true)
 get entities related to CUBIT/meshset,NODESET will get Vertices only, even if the NODESET contains edges, tris and tets SIDESET will get Tris, BLOCKSET will get Tets, DISPLACEMENTSET and FORCESET are stored in NODESET, PRESSURESET is stored in Sideset. More...
 
MoFEMErrorCode getMeshset (const int ms_id, const unsigned int cubit_bc_type, EntityHandle &meshset)
 get meshset from CUBIT Id and CUBIT type More...
 
MoFEMErrorCode getMeshsetsByType (const unsigned int cubit_bc_type, Range &meshsets)
 get all CUBIT meshsets by CUBIT type More...
 
MoFEMErrorCode setMeshsetFromFile (const string file_name, const bool clean_file_options=true)
 add blocksets reading config file More...
 
MoFEMErrorCode setMeshsetFromFile ()
 get name of config file from line command '-meshsets_config' More...
 
boost::shared_ptr< boost::program_options::options_description > & getConfigFileOptionsPtr ()
 Get config file options, use with care. More...
 
MoFEMErrorCode updateAllMeshsetsByEntitiesChildren (const BitRefLevel &bit)
 
- Public Member Functions inherited from MoFEM::UnknownInterface
template<class IFACE >
MoFEMErrorCode registerInterface (const MOFEMuuid &uuid, bool error_if_registration_failed=true)
 Register interface. More...
 
template<class IFACE , bool VERIFY = false>
MoFEMErrorCode getInterface (const MOFEMuuid &uuid, IFACE *&iface) const
 Get interface by uuid and return reference to pointer of interface. More...
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE *&iface) const
 Get interface refernce to pointer of interface. More...
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE **const iface) const
 Get interface pointer to pointer of interface. More...
 
template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get interface pointer to pointer of interface. More...
 
template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get reference to interface. More...
 
template<class IFACE >
IFACE * getInterface () const
 Function returning pointer to interface. More...
 
virtual ~UnknownInterface ()
 
virtual MoFEMErrorCode getLibVersion (Version &version) const
 Get library version. More...
 
virtual const MoFEMErrorCode getFileVersion (moab::Interface &moab, Version &version) const
 Get database major version. More...
 
virtual MoFEMErrorCode getInterfaceVersion (Version &version) const
 Get database major version. More...
 
template<>
MoFEMErrorCode getInterface (const MOFEMuuid &uuid, UnknownInterface *&iface) const
 

Public Attributes

MoFEM::CorecOre
 

Protected Attributes

Tag nsTag
 
Tag ssTag
 
Tag nsTag_data
 
Tag ssTag_data
 
Tag bhTag
 
Tag bhTag_header
 
CubitMeshSet_multiIndex cubitMeshsets
 cubit meshsets More...
 
boost::shared_ptr< boost::program_options::options_description > configFileOptionsPtr
 config file options More...
 

Additional Inherited Members

- Protected Member Functions inherited from MoFEM::UnknownInterface
boost::typeindex::type_index getClassIdx (const MOFEMuuid &uid) const
 Get type name for interface Id. More...
 
MOFEMuuid getUId (const boost::typeindex::type_index &class_idx) const
 Get interface Id for class name. More...
 

Detailed Description

Interface for managing meshsets containing materials and boundary conditions.

Examples:
cell_forces.cpp, cubit_bc_test.cpp, elasticity.cpp, mesh_cut.cpp, mesh_smoothing.cpp, split_sideset.cpp, and unsaturated_transport.cpp.

Definition at line 118 of file MeshsetsManager.hpp.

Constructor & Destructor Documentation

◆ MeshsetsManager()

MoFEM::MeshsetsManager::MeshsetsManager ( const MoFEM::Core core)

Definition at line 43 of file MeshsetsManager.cpp.

44  : cOre(const_cast<Core &>(core)) {}

◆ ~MeshsetsManager()

MoFEM::MeshsetsManager::~MeshsetsManager ( )

Definition at line 125 of file MeshsetsManager.hpp.

125 {}

Member Function Documentation

◆ addEntitiesToMeshset() [1/2]

MoFEMErrorCode MoFEM::MeshsetsManager::addEntitiesToMeshset ( const CubitBCType  cubit_bc_type,
const int  ms_id,
const Range &  ents 
)

add entities to cubit meshset

Parameters
cubit_bc_typetype of meshset, f.e. NODESET, SIDESET or BLOCKSET
ms_idid of meshset
entsentities to add
Returns
error code
Examples:
mesh_cut.cpp.

Definition at line 274 of file MeshsetsManager.cpp.

275  {
276  Interface &m_field = cOre;
277  moab::Interface &moab = m_field.get_moab();
279  CubitMeshSet_multiIndex::index<
280  Composite_Cubit_msId_And_MeshSetType_mi_tag>::type::iterator cit =
281  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
282  boost::make_tuple(ms_id, cubit_bc_type.to_ulong()));
283  if (cit ==
284  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>()
285  .end()) {
286  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
287  "such cubit meshset is already there", ms_id);
288  }
289  EntityHandle meshset = cit->getMeshset();
290  rval = moab.add_entities(meshset, ents);
293  }
#define CHKERRQ_MOAB(a)
check error code of MoAB function
Definition: definitions.h:533
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78

◆ addEntitiesToMeshset() [2/2]

MoFEMErrorCode MoFEM::MeshsetsManager::addEntitiesToMeshset ( const CubitBCType  cubit_bc_type,
const int  ms_id,
const EntityHandle ents,
const int  nb_ents 
)

add entities to cubit meshset

Parameters
cubit_bc_typetype of meshset, f.e. NODESET, SIDESET or BLOCKSET
ms_idid of meshset
entspointer to entities array
nb_entsnumber of entities in array
Returns
error code

Definition at line 295 of file MeshsetsManager.cpp.

297  {
298  Interface &m_field = cOre;
299  moab::Interface &moab = m_field.get_moab();
301  CubitMeshSet_multiIndex::index<
302  Composite_Cubit_msId_And_MeshSetType_mi_tag>::type::iterator cit =
303  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
304  boost::make_tuple(ms_id, cubit_bc_type.to_ulong()));
305  if (cit ==
306  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>()
307  .end()) {
308  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
309  "such cubit meshset is already there", ms_id);
310  }
311  EntityHandle meshset = cit->getMeshset();
312  rval = moab.add_entities(meshset, ents, nb_ents);
315  }
#define CHKERRQ_MOAB(a)
check error code of MoAB function
Definition: definitions.h:533
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78

◆ checkMeshset()

bool MoFEM::MeshsetsManager::checkMeshset ( const string  name,
int *const  number_of_meshsets_ptr = NULL 
) const

check if meshset of given name exist

Parameters
namename of meshset
Returns
error code

◆ clearMap()

MoFEMErrorCode MoFEM::MeshsetsManager::clearMap ( )

clear multi-index container

Returns
error code

Definition at line 46 of file MeshsetsManager.cpp.

46  {
48  cubitMeshsets.clear();
50  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526

◆ deleteMeshset()

MoFEMErrorCode MoFEM::MeshsetsManager::deleteMeshset ( const CubitBCType  cubit_bc_type,
const int  ms_id,
const MoFEMTypes  bh = MF_EXIST 
)

delete cubit meshset

Parameters
seeCubitBC (NODESET, SIDESET or BLOCKSET and more)
ms_idid of the BLOCKSET/SIDESET/BLOCKSET: from CUBIT

Definition at line 408 of file MeshsetsManager.cpp.

409  {
410  Interface &m_field = cOre;
411  moab::Interface &moab = m_field.get_moab();
413  CubitMeshSet_multiIndex::index<
414  Composite_Cubit_msId_And_MeshSetType_mi_tag>::type::iterator miit =
415  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
416  boost::make_tuple(ms_id, cubit_bc_type.to_ulong()));
417  if (miit == cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>()
418  .end()) {
419  if (bh & MF_EXIST) {
420  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
421  "meshset not found", ms_id);
422  } else {
424  }
425  }
426  EntityHandle meshset = miit->getMeshset();
427  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().erase(
428  miit);
429  rval = moab.delete_entities(&meshset, 1);
432  }
#define CHKERRQ_MOAB(a)
check error code of MoAB function
Definition: definitions.h:533
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78

◆ get_bhTag()

Tag MoFEM::MeshsetsManager::get_bhTag ( ) const

get tag handle used to store "id" of BLOCKSET

Definition at line 163 of file MeshsetsManager.hpp.

163 { return bhTag; }

◆ get_bhTag_header()

Tag MoFEM::MeshsetsManager::get_bhTag_header ( ) const

get tag handle used to store of block set header (Used by Cubit)

Definition at line 168 of file MeshsetsManager.hpp.

◆ get_meshsets_manager_ptr() [1/2]

MeshsetsManager* MoFEM::MeshsetsManager::get_meshsets_manager_ptr ( )

return pointer to meshset manager

Definition at line 173 of file MeshsetsManager.hpp.

173 { return this; }

◆ get_meshsets_manager_ptr() [2/2]

const MeshsetsManager* MoFEM::MeshsetsManager::get_meshsets_manager_ptr ( ) const

return pointer to meshset manager

Definition at line 178 of file MeshsetsManager.hpp.

178 { return this; }

◆ get_nsTag()

Tag MoFEM::MeshsetsManager::get_nsTag ( ) const

get tag handle used to store "id" of NODESET

Definition at line 143 of file MeshsetsManager.hpp.

143 { return nsTag; }

◆ get_nsTag_data()

Tag MoFEM::MeshsetsManager::get_nsTag_data ( ) const

get tag handle used to store boundary data on NODESET

Definition at line 153 of file MeshsetsManager.hpp.

153 { return nsTag_data; }

◆ get_ssTag()

Tag MoFEM::MeshsetsManager::get_ssTag ( ) const

get tag handle used to store "id" of SIDESET

Definition at line 148 of file MeshsetsManager.hpp.

148 { return ssTag; }

◆ get_ssTag_data()

Tag MoFEM::MeshsetsManager::get_ssTag_data ( ) const

get tag handle used to store boundary data on SIDESET

Definition at line 158 of file MeshsetsManager.hpp.

158 { return ssTag_data; }

◆ getConfigFileOptionsPtr()

boost::shared_ptr<boost::program_options::options_description>& MoFEM::MeshsetsManager::getConfigFileOptionsPtr ( )

Get config file options, use with care.

Returns
error code

Definition at line 739 of file MeshsetsManager.hpp.

739  {
740  return configFileOptionsPtr;
741  }
boost::shared_ptr< boost::program_options::options_description > configFileOptionsPtr
config file options

◆ getMeshsetsMultindex()

CubitMeshSet_multiIndex& MoFEM::MeshsetsManager::getMeshsetsMultindex ( )
Examples:
split_sideset.cpp.

Definition at line 264 of file MeshsetsManager.hpp.

264  {
265  return cubitMeshsets;
266  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets

◆ getTags()

MoFEMErrorCode MoFEM::MeshsetsManager::getTags ( int  verb = -1)

get tags handlers used on meshsets

On meshsets range of tags in set. Depending on tag type and data on that tag type of meshset could be determined. This function get hanldes to tags.

Most of the tags are followinf convention used by MoAB or Cubit and other meshing softwares, f.e. gmesh.

Definition at line 80 of file MeshsetsManager.cpp.

80  {
82  Interface &m_field = cOre;
83  moab::Interface &moab = m_field.get_moab();
84  int default_val = -1;
85  rval =
86  moab.tag_get_handle(DIRICHLET_SET_TAG_NAME, 1, MB_TYPE_INTEGER, nsTag,
87  MB_TAG_SPARSE | MB_TAG_CREAT, &default_val);
89  rval = moab.tag_get_handle(NEUMANN_SET_TAG_NAME, 1, MB_TYPE_INTEGER, ssTag,
90  MB_TAG_SPARSE | MB_TAG_CREAT, &default_val);
92  const int def_bc_data_len = 0;
93  std::string tag_name = std::string(DIRICHLET_SET_TAG_NAME) + "__BC_DATA";
94  rval = moab.tag_get_handle(
95  tag_name.c_str(), def_bc_data_len, MB_TYPE_OPAQUE, nsTag_data,
96  MB_TAG_CREAT | MB_TAG_SPARSE | MB_TAG_BYTES | MB_TAG_VARLEN, NULL);
98  tag_name = std::string(NEUMANN_SET_TAG_NAME) + "__BC_DATA";
99  rval = moab.tag_get_handle(
100  tag_name.c_str(), def_bc_data_len, MB_TYPE_OPAQUE, ssTag_data,
101  MB_TAG_CREAT | MB_TAG_SPARSE | MB_TAG_BYTES | MB_TAG_VARLEN, NULL);
103  rval = moab.tag_get_handle(MATERIAL_SET_TAG_NAME, 1, MB_TYPE_INTEGER, bhTag,
104  MB_TAG_SPARSE | MB_TAG_CREAT, &default_val);
106  std::vector<unsigned int> def_uint_zero(3, 0);
107  rval = moab.tag_get_handle(
108  BLOCK_HEADER, 3 * sizeof(unsigned int), MB_TYPE_INTEGER, bhTag_header,
109  MB_TAG_CREAT | MB_TAG_SPARSE | MB_TAG_BYTES, &def_uint_zero[0]);
111  Tag block_attribs;
112  int def_Block_Attributes_length = 0;
113  rval = moab.tag_get_handle(
114  BLOCK_ATTRIBUTES, def_Block_Attributes_length, MB_TYPE_DOUBLE,
115  block_attribs, MB_TAG_CREAT | MB_TAG_SPARSE | MB_TAG_VARLEN, NULL);
117  Tag entity_name_tag;
118  rval = moab.tag_get_handle(NAME_TAG_NAME, NAME_TAG_SIZE, MB_TYPE_OPAQUE,
119  entity_name_tag, MB_TAG_SPARSE | MB_TAG_CREAT);
122  }
#define CHKERRQ_MOAB(a)
check error code of MoAB function
Definition: definitions.h:533
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78

◆ initialiseDatabaseFromMesh()

MoFEMErrorCode MoFEM::MeshsetsManager::initialiseDatabaseFromMesh ( int  verb = 0)

initialize container form data on mesh

Returns
[description]

Definition at line 52 of file MeshsetsManager.cpp.

52  {
53  Interface &m_field = cOre;
54  moab::Interface &moab = m_field.get_moab();
56  Range meshsets;
57  CHKERR moab.get_entities_by_type(0, MBENTITYSET, meshsets, false);
58  for (Range::iterator mit = meshsets.begin(); mit != meshsets.end(); mit++) {
59  // check if meshset is cubit meshset
60  CubitMeshSets base_meshset(moab, *mit);
61  if ((base_meshset.cubitBcType & CubitBCType(NODESET | SIDESET | BLOCKSET))
62  .any()) {
63  std::pair<CubitMeshSet_multiIndex::iterator, bool> p =
64  cubitMeshsets.insert(base_meshset);
65  if (!p.second) {
66  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
67  "meshset not inserted");
68  }
69  if (verb > QUIET) {
70  std::ostringstream ss;
71  ss << "read cubit " << base_meshset << std::endl;
72  // PetscSynchronizedPrintf(comm,ss.str().c_str());
73  PetscPrintf(m_field.get_comm(), ss.str().c_str());
74  }
75  }
76  }
78  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:495
std::bitset< 32 > CubitBCType
Definition: Common.hpp:200
#define CHKERR
Inline error check.
Definition: definitions.h:614
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:439

◆ printBcSet()

template<class CUBIT_BC_DATA_TYPE >
MoFEMErrorCode MoFEM::MeshsetsManager::printBcSet ( CUBIT_BC_DATA_TYPE &  data,
unsigned long int  type 
) const

Definition at line 193 of file MeshsetsManager.hpp.

194  {
195 
197  try {
198  const MoFEM::Interface &m_field = cOre;
199  const moab::Interface &moab = m_field.get_moab();
200  for (_IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP_((*this), type, it)) {
201  ierr = it->getBcDataStructure(data);
202  CHKERRG(ierr);
203  std::ostringstream ss;
204  ss << *it << std::endl;
205  ss << data << std::endl;
206  Range tets, tris, edges, nodes;
207  rval = moab.get_entities_by_type(it->meshset, MBTET, tets, true);
209  rval = moab.get_entities_by_type(it->meshset, MBTRI, tris, true);
211  rval = moab.get_entities_by_type(it->meshset, MBEDGE, edges, true);
213  rval = moab.get_entities_by_type(it->meshset, MBVERTEX, nodes, true);
215  ss << "name " << it->getName() << std::endl;
216  ss << "msId " << it->getMeshsetId() << " nb. tets " << tets.size()
217  << std::endl;
218  ss << "msId " << it->getMeshsetId() << " nb. tris " << tris.size()
219  << std::endl;
220  ss << "msId " << it->getMeshsetId() << " nb. edges " << edges.size()
221  << std::endl;
222  ss << "msId " << it->getMeshsetId() << " nb. nodes " << nodes.size()
223  << std::endl;
224  ss << std::endl;
225  PetscPrintf(m_field.get_comm(), ss.str().c_str());
226  }
227  } catch (MoFEMException const &e) {
228  SETERRQ(PETSC_COMM_SELF, e.errorCode, e.errorMessage);
229  }
231  }
#define CHKERRQ_MOAB(a)
check error code of MoAB function
Definition: definitions.h:533
virtual moab::Interface & get_moab()=0
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:562
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78
#define _IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet in a moFEM field.
virtual MPI_Comm & get_comm() const =0

◆ printDisplacementSet()

MoFEMErrorCode MoFEM::MeshsetsManager::printDisplacementSet ( ) const

print meshsets with displacement boundary conditions data structure

Examples:
cell_forces.cpp, and elasticity.cpp.

Definition at line 124 of file MeshsetsManager.cpp.

124  {
125  DisplacementCubitBcData mydata;
127  ierr = printBcSet(mydata, NODESET | mydata.tYpe.to_ulong());
128  CHKERRG(ierr);
130  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:562
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
MoFEMErrorCode printBcSet(CUBIT_BC_DATA_TYPE &data, unsigned long int type) const

◆ printForceSet()

MoFEMErrorCode MoFEM::MeshsetsManager::printForceSet ( ) const

print meshsets with force boundary conditions data structure

Examples:
cell_forces.cpp, and elasticity.cpp.

Definition at line 140 of file MeshsetsManager.cpp.

140  {
141  ForceCubitBcData mydata;
143  ierr = printBcSet(mydata, NODESET | mydata.tYpe.to_ulong());
144  CHKERRG(ierr);
146  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:562
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
MoFEMErrorCode printBcSet(CUBIT_BC_DATA_TYPE &data, unsigned long int type) const

◆ printHeatFluxSet()

MoFEMErrorCode MoFEM::MeshsetsManager::printHeatFluxSet ( ) const

print meshsets with heat flux boundary conditions data structure

Definition at line 156 of file MeshsetsManager.cpp.

156  {
157  HeatFluxCubitBcData mydata;
159  ierr = printBcSet(mydata, SIDESET | mydata.tYpe.to_ulong());
160  CHKERRG(ierr);
162  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:562
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
MoFEMErrorCode printBcSet(CUBIT_BC_DATA_TYPE &data, unsigned long int type) const

◆ printMaterialsSet()

MoFEMErrorCode MoFEM::MeshsetsManager::printMaterialsSet ( ) const

print meshsets with material data structure set on it

Examples:
cell_forces.cpp, and elasticity.cpp.

Definition at line 164 of file MeshsetsManager.cpp.

164  {
166  const Interface &m_field = cOre;
167  const moab::Interface &moab = m_field.get_moab();
169  (*this), BLOCKSET | MAT_ELASTICSET, it)) {
170  Mat_Elastic data;
171  ierr = it->getAttributeDataStructure(data);
172  CHKERRG(ierr);
173  std::ostringstream ss;
174  ss << *it << std::endl;
175  ss << data;
176  Range tets;
177  rval = moab.get_entities_by_type(it->meshset, MBTET, tets, true);
179  ss << "MAT_ELATIC msId " << it->getMeshsetId() << " nb. tets "
180  << tets.size() << std::endl;
181  ss << std::endl;
182  PetscPrintf(m_field.get_comm(), ss.str().c_str());
183  }
184 
186  m_field, BLOCKSET | MAT_THERMALSET, it)) {
187  Mat_Thermal data;
188  ierr = it->getAttributeDataStructure(data);
189  CHKERRG(ierr);
190  std::ostringstream ss;
191  ss << *it << std::endl;
192  ss << data;
193  PetscPrintf(m_field.get_comm(), ss.str().c_str());
194  }
195 
197  m_field, BLOCKSET | MAT_MOISTURESET, it)) {
198  Mat_Moisture data;
199  ierr = it->getAttributeDataStructure(data);
200  CHKERRG(ierr);
201  std::ostringstream ss;
202  ss << *it << std::endl;
203  ss << data;
204  PetscPrintf(m_field.get_comm(), ss.str().c_str());
205  }
207  }
#define CHKERRQ_MOAB(a)
check error code of MoAB function
Definition: definitions.h:533
block name is "MAT_MOISTURE"
Definition: definitions.h:234
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:562
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78
#define _IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet in a moFEM field.
block name is "MAT_THERMAL"
Definition: definitions.h:232
block name is "MAT_ELASTIC"
Definition: definitions.h:230

◆ printPressureSet()

MoFEMErrorCode MoFEM::MeshsetsManager::printPressureSet ( ) const

print meshsets with pressure boundary conditions data structure

Definition at line 132 of file MeshsetsManager.cpp.

132  {
133  PressureCubitBcData mydata;
135  ierr = printBcSet(mydata, SIDESET | mydata.tYpe.to_ulong());
136  CHKERRG(ierr);
138  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:562
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
MoFEMErrorCode printBcSet(CUBIT_BC_DATA_TYPE &data, unsigned long int type) const

◆ printTemperatureSet()

MoFEMErrorCode MoFEM::MeshsetsManager::printTemperatureSet ( ) const

print meshsets with temperature boundary conditions data structure

Definition at line 148 of file MeshsetsManager.cpp.

148  {
149  TemperatureCubitBcData mydata;
151  ierr = printBcSet(mydata, NODESET | mydata.tYpe.to_ulong());
152  CHKERRG(ierr);
154  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:562
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
MoFEMErrorCode printBcSet(CUBIT_BC_DATA_TYPE &data, unsigned long int type) const

◆ query_interface()

MoFEMErrorCode MoFEM::MeshsetsManager::query_interface ( const MOFEMuuid uuid,
UnknownInterface **  iface 
) const
virtual

Implements MoFEM::UnknownInterface.

Definition at line 31 of file MeshsetsManager.cpp.

32  {
34  *iface = NULL;
35  if (uuid == IDD_MOFEMMeshsetsManager) {
36  *iface = const_cast<MeshsetsManager *>(this);
38  }
39  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "unknown interface");
41  }
static const MOFEMuuid IDD_MOFEMMeshsetsManager
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
MeshsetsManager(const MoFEM::Core &core)

◆ setAtributes()

MoFEMErrorCode MoFEM::MeshsetsManager::setAtributes ( const CubitBCType  cubit_bc_type,
const int  ms_id,
const std::vector< double > &  attributes,
const std::string  name = "" 
)

set attributes to cubit meshset

Parameters
cubit_bc_typetype of meshset, see CubitBC, i.e. BLOCKSET, NODESET, SIDESET
ms_idid of meshset
attributesattributes
Returns
error code

Definition at line 317 of file MeshsetsManager.cpp.

319  {
320  Interface &m_field = cOre;
321  moab::Interface &moab = m_field.get_moab();
323  CubitMeshSet_multiIndex::index<
324  Composite_Cubit_msId_And_MeshSetType_mi_tag>::type::iterator cit =
325  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
326  boost::make_tuple(ms_id, cubit_bc_type.to_ulong()));
327  if (cit ==
328  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>()
329  .end()) {
330  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
331  "such cubit meshset is already there", ms_id);
332  }
333  if (name.size() > 0) {
334  bool success = cubitMeshsets.modify(
335  cubitMeshsets.project<0>(cit), CubitMeshSets_change_name(moab, name));
336  if (!success) {
337  SETERRQ(m_field.get_comm(), MOFEM_OPERATION_UNSUCCESSFUL,
338  "name to cubit meshset can not be set");
339  }
340  }
341  bool success =
342  cubitMeshsets.modify(cubitMeshsets.project<0>(cit),
343  CubitMeshSets_change_attributes(moab, attributes));
344  if (!success)
345  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
346  "modification unsuccessful");
348  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526

◆ setAtributesByDataStructure()

MoFEMErrorCode MoFEM::MeshsetsManager::setAtributesByDataStructure ( const CubitBCType  cubit_bc_type,
const int  ms_id,
const GenericAttributeData data,
const std::string  name = "" 
)

set (material) data structure to cubit meshset

Parameters
cubit_bc_typetype of meshset, see CubitBC, i.e. BLOCKSET, NODESET, SIDESET
ms_idid of meshset
attributesattributes
Returns
error code

Definition at line 350 of file MeshsetsManager.cpp.

352  {
353  Interface &m_field = cOre;
354  moab::Interface &moab = m_field.get_moab();
356  CubitMeshSet_multiIndex::index<
357  Composite_Cubit_msId_And_MeshSetType_mi_tag>::type::iterator cit =
358  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
359  boost::make_tuple(ms_id, cubit_bc_type.to_ulong()));
360  if (cit ==
361  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>()
362  .end()) {
363  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
364  "such cubit meshset is already there", ms_id);
365  }
366  if (name.size() > 0) {
367  bool success = cubitMeshsets.modify(
368  cubitMeshsets.project<0>(cit), CubitMeshSets_change_name(moab, name));
369  if (!success) {
370  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
371  "name to cubit meshset can not be set");
372  }
373  }
374  bool success = cubitMeshsets.modify(
375  cubitMeshsets.project<0>(cit),
376  CubitMeshSets_change_attributes_data_structure(moab, data));
377  if (!success)
378  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
379  "modification unsuccessful");
381  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526

◆ setBcData()

MoFEMErrorCode MoFEM::MeshsetsManager::setBcData ( const CubitBCType  cubit_bc_type,
const int  ms_id,
const GenericCubitBcData data 
)

set boundary data structure to meshset

Parameters
cubit_bc_typetype of meshset, see CubitBC, i.e. BLOCKSET, NODESET, SIDESET
ms_idid of meshset
datadata structure
Returns
error code

Definition at line 383 of file MeshsetsManager.cpp.

385  {
386  Interface &m_field = cOre;
387  moab::Interface &moab = m_field.get_moab();
389  CubitMeshSet_multiIndex::index<
390  Composite_Cubit_msId_And_MeshSetType_mi_tag>::type::iterator cit =
391  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
392  boost::make_tuple(ms_id, cubit_bc_type.to_ulong()));
393  if (cit ==
394  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>()
395  .end()) {
396  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
397  "such cubit meshset is already there", ms_id);
398  }
399  bool success = cubitMeshsets.modify(
400  cubitMeshsets.project<0>(cit),
401  CubitMeshSets_change_bc_data_structure(moab, data));
402  if (!success)
403  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
404  "modification unsuccessful");
406  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526

◆ setMeshsetFromFile() [1/2]

MoFEMErrorCode MoFEM::MeshsetsManager::setMeshsetFromFile ( const string  file_name,
const bool  clean_file_options = true 
)

add blocksets reading config file

Example of config file

[block_1001]
# Example applying attributes to blockset
id=2001
user1=1.0 # attribute value 1
user2=2.0 # you can set up to 10 attributes (if needed could be easily
extended to more, let us know)
user3=3.0
[block_1002]
# Example applying material block (isotropic elastic material)
id=2002
name=MAT_ELASTIC
young=10
poisson=0.25
thermalexpansion=0
[block_1003]
# Example applying displacement constrains
id=2003
# Each flag means that boundary consition on displacements is set.
disp_flag1=1 # Setting constrains in x- direction
disp_flag2=1 # Setting constrains in y- direction
disp_flag3=1 # Setting constrains in z- direction
disp_flag4=1 # Setting constrains on rotation over x- axis
disp_flag5=1 # Setting constrains on rotation over y- axis
disp_flag6=1 # Setting constrains on rotation over z-axis
disp_ux=1 # value of disp in x- direction
disp_uy=2
disp_uz=3
disp_rx=4 # value of rotation in y-direction
disp_ry=5
disp_rz=6
# Note above values could be interpreted differently if needed.
[block_1004]
# Example applying force boundary conditions
id=2004
force_magnitude=1
moment_magnitude=1
force_fx=1
force_fy=1
force_fz=1
moment_mx=1
moment_my=1
moment_mz=1
[block_1005]
# Example applying pressure boundary conditions
id=2005
pressure_flag2=1 # 0: Pressure is interpreted as pure pressure 1:
pressure is interpreted as total force
pressure_magnitude=1
# Example applying temperature boundary conditions
[block_1006]
id=2006
temperature_flag1=1 # 0: N/A, 1: temperature value applied
temperature_t=1
[block_1007]
id=2007
heatflux_flag1=1 # 0: N/A, 1: heat flux applied
heatflux_magnitude=1
[block_1008]
# Example applying material block (isotropic thermal material)
id=2008
name=MAT_THERMAL # Hast to be set for Thermal Mat
conductivity=1
capacity=1
[block_1009]
# Example applying interface
id=2009
interface_type=1
[block_1010]
# Example applying material block for interface element
id=2010
name=MAT_INTERF
interface_alpha = 1
interface_beta = 0
interface_ft = 1
interface_Gf = 1
Parameters
file_nameconfig file
Returns
error code
Examples:
unsaturated_transport.cpp.

◆ setMeshsetFromFile() [2/2]

MoFEMErrorCode MoFEM::MeshsetsManager::setMeshsetFromFile ( )

get name of config file from line command '-meshsets_config'

Returns
error code

Option is "-meshsets_config file_name.cfg"

Definition at line 955 of file MeshsetsManager.cpp.

955  {
956  Interface &m_field = cOre;
957  // moab::Interface &moab = m_field.get_moab();
958  PetscBool flg_file;
959  char meshset_file_name[255];
961  ierr = PetscOptionsBegin(m_field.get_comm(), "", "Set meshsets form file",
962  "none");
963  CHKERRG(ierr);
964  ierr = PetscOptionsString("-meshsets_config", "meshsets config file name",
965  "", "add_cubit_meshsets.in", meshset_file_name,
966  255, &flg_file);
967  CHKERRG(ierr);
968  if (flg_file == PETSC_TRUE) {
969  ifstream f(meshset_file_name);
970  if (!f.good()) {
971  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
972  "File configuring meshsets ( %s ) can not be open\n",
973  meshset_file_name);
974  }
975  ierr = setMeshsetFromFile(string(meshset_file_name));
976  CHKERRG(ierr);
977  }
978  ierr = PetscOptionsEnd();
979  CHKERRG(ierr);
981  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:519
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:562
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:526
MoFEMErrorCode setMeshsetFromFile()
get name of config file from line command &#39;-meshsets_config&#39;
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80

◆ updateAllMeshsetsByEntitiesChildren()

MoFEMErrorCode MoFEM::MeshsetsManager::updateAllMeshsetsByEntitiesChildren ( const BitRefLevel bit)

Definition at line 984 of file MeshsetsManager.cpp.

984  {
986  BitRefManager *bit_mng = cOre.getInterface<BitRefManager>();
987  for (_IT_CUBITMESHSETS_FOR_LOOP_((*this), iit)) {
988  EntityHandle meshset = iit->getMeshset();
989  ierr = bit_mng->updateMeshsetByEntitiesChildren(meshset, bit, meshset,
990  MBVERTEX, true);
991  CHKERRG(ierr);
992  ierr = bit_mng->updateMeshsetByEntitiesChildren(meshset, bit, meshset,
993  MBEDGE, true);
994  CHKERRG(ierr);
995  ierr = bit_mng->updateMeshsetByEntitiesChildren(meshset, bit, meshset,
996  MBTRI, true);
997  CHKERRG(ierr);
998  ierr = bit_mng->updateMeshsetByEntitiesChildren(meshset, bit, meshset,
999  MBTET, true);
1000  CHKERRG(ierr);
1001  ierr = bit_mng->updateMeshsetByEntitiesChildren(meshset, bit, meshset,
1002  MBPRISM, true);
1003  CHKERRG(ierr);
1004  }
1006  }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:495
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:562
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
MoFEMErrorCode getInterface(const MOFEMuuid &uuid, IFACE *&iface) const
Get interface by uuid and return reference to pointer of interface.
#define _IT_CUBITMESHSETS_FOR_LOOP_(MESHSET_MANAGER, IT)
Iterator that loops over all the Cubit MeshSets in a moFEM field.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:439

Member Data Documentation

◆ bhTag

Tag MoFEM::MeshsetsManager::bhTag
protected

Definition at line 750 of file MeshsetsManager.hpp.

◆ bhTag_header

Tag MoFEM::MeshsetsManager::bhTag_header
protected

Definition at line 751 of file MeshsetsManager.hpp.

◆ configFileOptionsPtr

boost::shared_ptr<boost::program_options::options_description> MoFEM::MeshsetsManager::configFileOptionsPtr
protected

config file options

Definition at line 756 of file MeshsetsManager.hpp.

◆ cOre

MoFEM::Core& MoFEM::MeshsetsManager::cOre

Definition at line 123 of file MeshsetsManager.hpp.

◆ cubitMeshsets

CubitMeshSet_multiIndex MoFEM::MeshsetsManager::cubitMeshsets
protected

cubit meshsets

Definition at line 754 of file MeshsetsManager.hpp.

◆ nsTag

Tag MoFEM::MeshsetsManager::nsTag
protected

Definition at line 746 of file MeshsetsManager.hpp.

◆ nsTag_data

Tag MoFEM::MeshsetsManager::nsTag_data
protected

Definition at line 748 of file MeshsetsManager.hpp.

◆ ssTag

Tag MoFEM::MeshsetsManager::ssTag
protected

Definition at line 747 of file MeshsetsManager.hpp.

◆ ssTag_data

Tag MoFEM::MeshsetsManager::ssTag_data
protected

Definition at line 749 of file MeshsetsManager.hpp.


The documentation for this struct was generated from the following files: