v0.8.12
Files | Classes | Macros | Functions
MeshsetsManager

Interface for meshsets with entities with data and boundary conditions. More...

Collaboration diagram for MeshsetsManager:

Files

file  MeshsetsManager.hpp
 MeshsetsManager interface.
 

Classes

struct  MoFEM::MeshsetsManager
 Interface for managing meshsets containing materials and boundary conditions. More...
 

Macros

#define _IT_CUBITMESHSETS_FOR_LOOP_(MESHSET_MANAGER, IT)
 Iterator that loops over all the Cubit MeshSets in a moFEM field. More...
 
#define _IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
 Iterator that loops over a specific Cubit MeshSet in a moFEM field. More...
 
#define _IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
 Iterator that loops over a specific Cubit MeshSet having a particular BC meshset in a moFEM field. More...
 
#define _IT_CUBITMESHSETS_BY_NAME_FOR_LOOP_(MESHSET_MANAGER, NAME, IT)
 Iterator that loops over Cubit BlockSet having a particular name. More...
 

Functions

CubitMeshSet_multiIndex::iterator MoFEM::MeshsetsManager::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 MoFEM::MeshsetsManager::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 MoFEM::MeshsetsManager::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 MoFEM::MeshsetsManager::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 MoFEM::MeshsetsManager::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 MoFEM::MeshsetsManager::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 MoFEM::MeshsetsManager::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 MoFEM::MeshsetsManager::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 MoFEM::MeshsetsManager::checkMeshset (const int ms_id, const CubitBCType cubit_bc_type) const
 check for CUBIT Id and CUBIT type More...
 
MoFEMErrorCode MoFEM::MeshsetsManager::addMeshset (const CubitBCType cubit_bc_type, const int ms_id, const std::string name="")
 add cubit meshset More...
 
MoFEMErrorCode MoFEM::MeshsetsManager::getCubitMeshsetPtr (const int ms_id, const CubitBCType cubit_bc_type, const CubitMeshSets **cubit_meshset_ptr)
 get cubit meshset More...
 
MoFEMErrorCode MoFEM::MeshsetsManager::getCubitMeshsetPtr (const string name, const CubitMeshSets **cubit_meshset_ptr)
 get cubit meshset More...
 
MoFEMErrorCode MoFEM::MeshsetsManager::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 MoFEM::MeshsetsManager::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 MoFEM::MeshsetsManager::getMeshset (const int ms_id, const unsigned int cubit_bc_type, EntityHandle &meshset)
 get meshset from CUBIT Id and CUBIT type More...
 
MoFEMErrorCode MoFEM::MeshsetsManager::getMeshsetsByType (const unsigned int cubit_bc_type, Range &meshsets)
 get all CUBIT meshsets by CUBIT type More...
 

Detailed Description

Interface for meshsets with entities with data and boundary conditions.

Macro Definition Documentation

◆ _IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP_

#define _IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP_ (   MESHSET_MANAGER,
  CUBITBCTYPE,
  IT 
)
Value:
CubitMeshsetByType::iterator IT = \
MESHSET_MANAGER.get_meshsets_manager_ptr()->getBegin(CUBITBCTYPE); \
IT != MESHSET_MANAGER.get_meshsets_manager_ptr()->getEnd(CUBITBCTYPE); \
IT++

Iterator that loops over a specific Cubit MeshSet in a moFEM field.

Parameters
mFieldmoFEM Field
seeCubitBC (NODESET, SIDESET or BLOCKSET and more)
iterator
Examples:
elasticity.cpp, and simple_elasticity.cpp.

Definition at line 59 of file MeshsetsManager.hpp.

◆ _IT_CUBITMESHSETS_BY_NAME_FOR_LOOP_

#define _IT_CUBITMESHSETS_BY_NAME_FOR_LOOP_ (   MESHSET_MANAGER,
  NAME,
  IT 
)
Value:
CubitMeshsetByName::iterator IT = \
MESHSET_MANAGER.get_meshsets_manager_ptr()->getBegin(NAME); \
IT != MESHSET_MANAGER.get_meshsets_manager_ptr()->getEnd(NAME); \
IT++

Iterator that loops over Cubit BlockSet having a particular name.

Parameters
MESHSET_MANAGERmeshset manager (works as well with Interface)
NAMEname
ITiterator

Example:

for(_IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_(mField,"SOME_BLOCK_NAME",it) {
...
}

Definition at line 105 of file MeshsetsManager.hpp.

◆ _IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_

#define _IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_ (   MESHSET_MANAGER,
  CUBITBCTYPE,
  IT 
)
Value:
CubitMeshsetByMask::iterator IT = \
MESHSET_MANAGER.get_meshsets_manager_ptr()->getBySetTypeBegin( \
CUBITBCTYPE); \
IT != \
MESHSET_MANAGER.get_meshsets_manager_ptr()->getBySetTypeEnd( \
CUBITBCTYPE); \
IT++

Iterator that loops over a specific Cubit MeshSet having a particular BC meshset in a moFEM field.

Parameters
MESHSET_MANAGERmeshset manager (works as well with Interface)
seeCubitBC (NODESET, SIDESET or BLOCKSET and more)
iteratorExample:
Examples:
cell_forces.cpp, cubit_bc_test.cpp, elasticity.cpp, MagneticElement.hpp, mesh_cut.cpp, unsaturated_transport.cpp, and UnsaturatedFlow.hpp.

Definition at line 81 of file MeshsetsManager.hpp.

◆ _IT_CUBITMESHSETS_FOR_LOOP_

#define _IT_CUBITMESHSETS_FOR_LOOP_ (   MESHSET_MANAGER,
  IT 
)
Value:
CubitMeshSet_multiIndex::iterator IT = \
MESHSET_MANAGER.get_meshsets_manager_ptr()->getBegin(); \
IT != MESHSET_MANAGER.get_meshsets_manager_ptr()->getEnd(); \
IT++

Iterator that loops over all the Cubit MeshSets in a moFEM field.

Parameters
MESHSET_MANAGERmeshset manager (works as well with Interface)
iterator
Examples:
split_sideset.cpp, and unsaturated_transport.cpp.

Definition at line 44 of file MeshsetsManager.hpp.

Function Documentation

◆ addMeshset()

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

add cubit meshset

Parameters
seeCubitBC (NODESET, SIDESET or BLOCKSET and more)
ms_idid of the BLOCKSET/SIDESET/BLOCKSET
nameof set
Examples:
mesh_cut.cpp.

Definition at line 238 of file MeshsetsManager.cpp.

240  {
241  Interface &m_field = cOre;
242  moab::Interface &moab = m_field.get_moab();
244  if (checkMeshset(ms_id, cubit_bc_type)) {
245  SETERRQ1(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
246  "such cubit meshset is already there", ms_id);
247  }
248  try {
249  CubitMeshSets cmeshset(moab, cubit_bc_type, ms_id);
250  if ((cmeshset.cubitBcType & CubitBCType(NODESET | SIDESET | BLOCKSET))
251  .any()) {
252  std::pair<CubitMeshSet_multiIndex::iterator, bool> p =
253  cubitMeshsets.insert(cmeshset);
254  if (!p.second) {
255  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
256  "meshset not inserted");
257  }
258  if (name.size() > 0) {
259  bool success = cubitMeshsets.modify(
260  p.first, CubitMeshSets_change_name(moab, name));
261  if (!success) {
262  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
263  "name to cubit meshset can not be set");
264  }
265  }
266  }
267  } catch (MoFEMException const &e) {
268  SETERRQ(PETSC_COMM_SELF, e.errorCode, e.errorMessage);
269  }
271  }
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
std::bitset< 32 > CubitBCType
Definition: Common.hpp:200
bool checkMeshset(const int ms_id, const CubitBCType cubit_bc_type) const
check for CUBIT Id and CUBIT type

◆ checkMeshset()

bool MoFEM::MeshsetsManager::checkMeshset ( const int  ms_id,
const CubitBCType  cubit_bc_type 
) const

check for CUBIT Id and CUBIT type

Todo:
All cubit interface functions should be outsourced to dedicated interface
Parameters
ms_idid of the BLOCKSET/SIDESET/BLOCKSET: from CUBIT
seeCubitBC (NODESET, SIDESET or BLOCKSET and more)
Examples:
cell_forces.cpp, mesh_cut.cpp, and mesh_smoothing.cpp.

Definition at line 209 of file MeshsetsManager.cpp.

210  {
211  CubitMeshSet_multiIndex::index<
212  Composite_Cubit_msId_And_MeshSetType_mi_tag>::type::iterator miit =
213  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
214  boost::make_tuple(ms_id, cubit_bc_type.to_ulong()));
215  if (miit !=
216  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>()
217  .end()) {
218  return true;
219  }
220  return false;
221  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets

◆ getBegin() [1/3]

CubitMeshSet_multiIndex::iterator MoFEM::MeshsetsManager::getBegin ( ) const

get begin iterator of cubit mehset of given type (instead you can use IT_CUBITMESHSETS_TYPE_FOR_LOOP(MFIELD,CUBITBCTYPE,IT)

for(IT_CUBITMESHSETS_FOR_LOOP(mField,it) { ... }

Definition at line 278 of file MeshsetsManager.hpp.

278  {
279  return cubitMeshsets.begin();
280  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets

◆ getBegin() [2/3]

CubitMeshsetByType::iterator MoFEM::MeshsetsManager::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)

for(IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP(mField,NODESET|DISPLACEMENTSET,it) { ... }

Parameters
typeof meshset (NODESET, SIDESET or BLOCKSET and more)

Definition at line 311 of file MeshsetsManager.hpp.

311  {
312  return cubitMeshsets.get<CubitMeshSets_mi_tag>().lower_bound(cubit_bc_type);
313  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets

◆ getBegin() [3/3]

CubitMeshsetByName::iterator MoFEM::MeshsetsManager::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)

for(IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP(mField,NODESET|DISPLACEMENTSET,it) { ... }

Parameters
typeof meshset (NODESET, SIDESET or BLOCKSET and more)

Definition at line 384 of file MeshsetsManager.hpp.

384  {
385  return cubitMeshsets.get<CubitMeshSets_name>().lower_bound(name);
386  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets

◆ getBySetTypeBegin()

CubitMeshsetByMask::iterator MoFEM::MeshsetsManager::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)

for(IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP(mField,NODESET,it) { ... }

Parameters
typeof meshset (NODESET, SIDESET or BLOCKSET and more)

Definition at line 347 of file MeshsetsManager.hpp.

347  {
348  return cubitMeshsets.get<CubitMeshSets_mask_meshset_mi_tag>().lower_bound(
349  cubit_bc_type);
350  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets

◆ getBySetTypeEnd()

CubitMeshsetByMask::iterator MoFEM::MeshsetsManager::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)

for(IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP(mField,NODESET,it) { ... }

Parameters
typeof meshset (NODESET, SIDESET or BLOCKSET and more)

Definition at line 365 of file MeshsetsManager.hpp.

365  {
366  return cubitMeshsets.get<CubitMeshSets_mask_meshset_mi_tag>().upper_bound(
367  cubit_bc_type);
368  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets

◆ getCubitMeshsetPtr() [1/2]

MoFEMErrorCode MoFEM::MeshsetsManager::getCubitMeshsetPtr ( const int  ms_id,
const CubitBCType  cubit_bc_type,
const CubitMeshSets **  cubit_meshset_ptr 
)

get cubit meshset

Definition at line 435 of file MeshsetsManager.cpp.

437  {
438  Interface &m_field = cOre;
440  CubitMeshSet_multiIndex::index<
441  Composite_Cubit_msId_And_MeshSetType_mi_tag>::type::iterator miit =
442  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
443  boost::make_tuple(ms_id, cubit_bc_type.to_ulong()));
444  if (miit !=
445  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>()
446  .end()) {
447  *cubit_meshset_ptr = &*miit;
448  } else {
449  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
450  "msId = %d is not there", ms_id);
451  }
453  }
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

◆ getCubitMeshsetPtr() [2/2]

MoFEMErrorCode MoFEM::MeshsetsManager::getCubitMeshsetPtr ( const string  name,
const CubitMeshSets **  cubit_meshset_ptr 
)

get cubit meshset

◆ getEnd() [1/3]

CubitMeshSet_multiIndex::iterator MoFEM::MeshsetsManager::getEnd ( ) const

get begin iterator of cubit mehset of given type (instead you can use IT_CUBITMESHSETS_TYPE_FOR_LOOP(MFIELD,CUBITBCTYPE,IT)

for(IT_CUBITMESHSETS_FOR_LOOP(mField,it) { ... }

Definition at line 292 of file MeshsetsManager.hpp.

292  {
293  return cubitMeshsets.end();
294  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets

◆ getEnd() [2/3]

CubitMeshsetByType::iterator MoFEM::MeshsetsManager::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)

for(IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP(mField,NODESET|DISPLACEMENTSET,it) { ... }

Parameters
typeof meshset (NODESET, SIDESET or BLOCKSET and more)

Definition at line 330 of file MeshsetsManager.hpp.

330  {
331  return cubitMeshsets.get<CubitMeshSets_mi_tag>().upper_bound(cubit_bc_type);
332  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets

◆ getEnd() [3/3]

CubitMeshsetByName::iterator MoFEM::MeshsetsManager::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)

for(IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP(mField,NODESET|DISPLACEMENTSET,it) { ... }

Parameters
typeof meshset (NODESET, SIDESET or BLOCKSET and more)

Definition at line 402 of file MeshsetsManager.hpp.

402  {
403  return cubitMeshsets.get<CubitMeshSets_name>().upper_bound(name);
404  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets

◆ getEntitiesByDimension() [1/2]

MoFEMErrorCode MoFEM::MeshsetsManager::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.

Parameters
ms_idid of the BLOCKSET/SIDESET/BLOCKSET: from CUBIT
seeCubitBC (NODESET, SIDESET or BLOCKSET and more)
dimensions(0 - Nodes, 1 - Edges, 2 - Faces, 3 - Volume(tetrahedral))
Rangecontaining the retrieved entities
recursiveIf true, meshsets containing meshsets are queried recursively. Returns the contents of meshsets, but not the meshsets themselves if true.
Examples:
cell_forces.cpp, and mesh_cut.cpp.

Definition at line 476 of file MeshsetsManager.cpp.

478  {
479 
480  Interface &m_field = cOre;
481  moab::Interface &moab = m_field.get_moab();
483  CubitMeshSet_multiIndex::index<
484  Composite_Cubit_msId_And_MeshSetType_mi_tag>::type::iterator miit =
485  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
486  boost::make_tuple(msId, cubit_bc_type));
487  if (miit !=
488  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>()
489  .end()) {
490  ierr = miit->getMeshsetIdEntitiesByDimension(moab, dimension, entities,
491  recursive);
492  CHKERRG(ierr);
493  } else {
494  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
495  "msId = %d is not there", msId);
496  }
498  }
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 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

◆ getEntitiesByDimension() [2/2]

MoFEMErrorCode MoFEM::MeshsetsManager::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.

Parameters
ms_idid of the BLOCKSET/SIDESET/BLOCKSET: from CUBIT
seeCubitBC (NODESET, SIDESET or BLOCKSET and more)
Rangecontaining the retrieved entities related to the
recursiveIf true, meshsets containing meshsets are queried recursively. Returns the contents of meshsets, but not the meshsets themselves if true.

Definition at line 500 of file MeshsetsManager.cpp.

502  {
503  Interface &m_field = cOre;
504  moab::Interface &moab = m_field.get_moab();
506  CubitMeshSet_multiIndex::index<
507  Composite_Cubit_msId_And_MeshSetType_mi_tag>::type::iterator miit =
508  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
509  boost::make_tuple(ms_id, cubit_bc_type));
510  if (miit !=
511  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>()
512  .end()) {
513  ierr = miit->getMeshsetIdEntitiesByDimension(moab, entities, recursive);
514  CHKERRG(ierr);
515  } else {
516  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
517  "ms_id = %d is not there", ms_id);
518  }
520  }
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 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

◆ getMeshset()

MoFEMErrorCode MoFEM::MeshsetsManager::getMeshset ( const int  ms_id,
const unsigned int  cubit_bc_type,
EntityHandle meshset 
)

get meshset from CUBIT Id and CUBIT type

Parameters
ms_idid of the BLOCKSET/SIDESET/BLOCKSET: from CUBIT
seeCubitBC (NODESET, SIDESET or BLOCKSET and more)
meshsetwhere to store the retrieved entities
Examples:
mesh_cut.cpp.

Definition at line 522 of file MeshsetsManager.cpp.

524  {
525  Interface &m_field = cOre;
527  CubitMeshSet_multiIndex::index<
528  Composite_Cubit_msId_And_MeshSetType_mi_tag>::type::iterator miit =
529  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
530  boost::make_tuple(ms_id, cubit_bc_type));
531  if (miit !=
532  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>()
533  .end()) {
534  meshset = miit->meshset;
535  } else {
536  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
537  "ms_id = %d is not there", ms_id);
538  }
540  }
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

◆ getMeshsetsByType()

MoFEMErrorCode MoFEM::MeshsetsManager::getMeshsetsByType ( const unsigned int  cubit_bc_type,
Range &  meshsets 
)

get all CUBIT meshsets by CUBIT type

Parameters
seeCubitBC (NODESET, SIDESET or BLOCKSET and more).
meshsetsis range of meshsets

Definition at line 543 of file MeshsetsManager.cpp.

544  {
546  CubitMeshsetByType::iterator miit =
547  cubitMeshsets.get<CubitMeshSets_mi_tag>().lower_bound(cubit_bc_type);
548  CubitMeshsetByType::iterator hi_miit =
549  cubitMeshsets.get<CubitMeshSets_mi_tag>().upper_bound(cubit_bc_type);
550  for (; miit != hi_miit; miit++) {
551  meshsets.insert(miit->meshset);
552  }
554  }
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