v0.11.0
Files | Macros | Functions
MeshsetsManager

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

Collaboration diagram for MeshsetsManager:

Files

file  MeshsetsManager.hpp
 MeshsetsManager interface.
 

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) const
 get cubit meshset More...
 
MoFEMErrorCode MoFEM::MeshsetsManager::getCubitMeshsetPtr (const string name, const CubitMeshSets **cubit_meshset_ptr) const
 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) const
 get entities from CUBIT/meshset of a particular entity dimension More...
 
MoFEMErrorCode MoFEM::MeshsetsManager::getEntitiesByDimension (const int ms_id, const unsigned int cubit_bc_type, Range &entities, const bool recursive=true) const
 get entities related to CUBIT/meshset, More...
 
MoFEMErrorCode MoFEM::MeshsetsManager::getMeshset (const int ms_id, const unsigned int cubit_bc_type, EntityHandle &meshset) const
 get meshset from CUBIT Id and CUBIT type More...
 
MoFEMErrorCode MoFEM::MeshsetsManager::getMeshsetsByType (const unsigned int cubit_bc_type, Range &meshsets) const
 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
ElasticityMixedFormulation.hpp, HookeElement.cpp, add_cubit_meshsets.cpp, bone_adaptation.cpp, elasticity.cpp, nonlinear_dynamics.cpp, and simple_elasticity.cpp.

Definition at line 61 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) {
...
}
#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.

Definition at line 106 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:
...
}
@ NODESET
Definition: definitions.h:215
@ DISPLACEMENTSET
Definition: definitions.h:219
Examples
EshelbianPlasticity.cpp, MagneticElement.hpp, Remodeling.cpp, UnsaturatedFlow.hpp, add_cubit_meshsets.cpp, cell_forces.cpp, contact.cpp, continuity_check_on_contact_prism_side_ele.cpp, cubit_bc_test.cpp, dynamic_elastic.cpp, elasticity.cpp, forces_and_sources_testing_flat_prism_element.cpp, heat_equation.cpp, helmholtz.cpp, hertz_surface.cpp, mesh_cut.cpp, mesh_insert_interface_atom.cpp, navier_stokes.cpp, plastic.cpp, simple_contact.cpp, test_jacobian_of_simple_contact_element.cpp, unsaturated_transport.cpp, wave_equation.cpp, and wavy_surface.cpp.

Definition at line 83 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
add_cubit_meshsets.cpp, bone_adaptation.cpp, continuity_check_on_contact_prism_side_ele.cpp, forces_and_sources_testing_flat_prism_element.cpp, mesh_insert_interface_atom.cpp, simple_contact.cpp, split_sideset.cpp, and unsaturated_transport.cpp.

Definition at line 46 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

Definition at line 329 of file MeshsetsManager.cpp.

331  {
332  Interface &m_field = cOre;
333  moab::Interface &moab = m_field.get_moab();
335  if (checkMeshset(ms_id, cubit_bc_type)) {
336  SETERRQ1(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
337  "such cubit meshset is already there", ms_id);
338  }
339 
340  CubitMeshSets cmeshset(moab, cubit_bc_type, ms_id);
341  if ((cmeshset.cubitBcType & CubitBCType(NODESET | SIDESET | BLOCKSET))
342  .any()) {
343  auto p = cubitMeshsets.insert(cmeshset);
344  if (!p.second) {
345  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
346  "meshset not inserted");
347  }
348  if (name.size() > 0) {
349  bool success =
350  cubitMeshsets.modify(p.first, CubitMeshSets_change_name(moab, name));
351  if (!success) {
352  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
353  "name to cubit meshset can not be set");
354  }
355  }
356  }
357 
359 }
static Index< 'p', 3 > p
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415
@ SIDESET
Definition: definitions.h:216
@ BLOCKSET
Definition: definitions.h:217
@ MOFEM_OPERATION_UNSUCCESSFUL
Definition: definitions.h:126
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:123
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
bool checkMeshset(const int ms_id, const CubitBCType cubit_bc_type) const
check for CUBIT Id and CUBIT type
std::bitset< 32 > CubitBCType
Definition: Types.hpp:63
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1953
virtual moab::Interface & get_moab()=0
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets

◆ 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)

Definition at line 304 of file MeshsetsManager.cpp.

305  {
306  auto miit =
307  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
308  boost::make_tuple(ms_id, cubit_bc_type.to_ulong()));
309  if (miit !=
310  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().end()) {
311  return true;
312  }
313  return false;
314 }

◆ 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 258 of file MeshsetsManager.hpp.

258  {
259  return cubitMeshsets.begin();
260  }

◆ getBegin() [2/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 364 of file MeshsetsManager.hpp.

364  {
365  return cubitMeshsets.get<CubitMeshSets_name>().lower_bound(name);
366  }

◆ getBegin() [3/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 291 of file MeshsetsManager.hpp.

291  {
292  return cubitMeshsets.get<CubitMeshSets_mi_tag>().lower_bound(cubit_bc_type);
293  }

◆ 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 327 of file MeshsetsManager.hpp.

327  {
328  return cubitMeshsets.get<CubitMeshSets_mask_meshset_mi_tag>().lower_bound(
329  cubit_bc_type);
330  }

◆ 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 345 of file MeshsetsManager.hpp.

345  {
346  return cubitMeshsets.get<CubitMeshSets_mask_meshset_mi_tag>().upper_bound(
347  cubit_bc_type);
348  }

◆ getCubitMeshsetPtr() [1/2]

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

get cubit meshset

Definition at line 522 of file MeshsetsManager.cpp.

524  {
525  Interface &m_field = cOre;
527  auto miit =
528  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
529  boost::make_tuple(ms_id, cubit_bc_type.to_ulong()));
530  if (miit !=
531  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().end()) {
532  *cubit_meshset_ptr = &*miit;
533  } else {
534  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
535  "msId = %d is not there", ms_id);
536  }
538 }

◆ getCubitMeshsetPtr() [2/2]

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

get cubit meshset

Definition at line 540 of file MeshsetsManager.cpp.

541  {
542  Interface &m_field = cOre;
544  auto miit = cubitMeshsets.get<CubitMeshSets_name>().lower_bound(name);
545  auto hi_miit = cubitMeshsets.get<CubitMeshSets_name>().upper_bound(name);
546  if (std::distance(miit, hi_miit) == 0) {
547  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
548  "meshset name = %s is not there", name.c_str());
549  }
550  if (std::distance(miit, hi_miit) > 1) {
551  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
552  "meshset name = %s is not there", name.c_str());
553  }
554  *cubit_meshset_ptr = &*miit;
556 }

◆ 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 272 of file MeshsetsManager.hpp.

272  {
273  return cubitMeshsets.end();
274  }

◆ getEnd() [2/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 382 of file MeshsetsManager.hpp.

382  {
383  return cubitMeshsets.get<CubitMeshSets_name>().upper_bound(name);
384  }

◆ getEnd() [3/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 310 of file MeshsetsManager.hpp.

310  {
311  return cubitMeshsets.get<CubitMeshSets_mi_tag>().upper_bound(cubit_bc_type);
312  }

◆ 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 
) const

get entities from CUBIT/meshset of a particular entity dimension

Nodeset 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.

Definition at line 558 of file MeshsetsManager.cpp.

560  {
561  Interface &m_field = cOre;
562  moab::Interface &moab = m_field.get_moab();
564  auto miit =
565  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
566  boost::make_tuple(msId, cubit_bc_type));
567  if (miit !=
568  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().end()) {
569  CHKERR miit->getMeshsetIdEntitiesByDimension(moab, dimension, entities,
570  recursive);
571  } else {
572  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
573  "msId = %d is not there", msId);
574  }
576 }
#define CHKERR
Inline error check.
Definition: definitions.h:604

◆ getEntitiesByDimension() [2/2]

MoFEMErrorCode MoFEM::MeshsetsManager::getEntitiesByDimension ( const int  ms_id,
const unsigned int  cubit_bc_type,
Range &  entities,
const bool  recursive = true 
) const

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 578 of file MeshsetsManager.cpp.

580  {
581  Interface &m_field = cOre;
582  moab::Interface &moab = m_field.get_moab();
584  auto miit =
585  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
586  boost::make_tuple(ms_id, cubit_bc_type));
587  if (miit !=
588  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().end()) {
589  CHKERR miit->getMeshsetIdEntitiesByDimension(moab, entities, recursive);
590  } else {
591  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
592  "ms_id = %d is not there", ms_id);
593  }
595 }

◆ getMeshset()

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

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

Definition at line 597 of file MeshsetsManager.cpp.

599  {
600  Interface &m_field = cOre;
602  auto miit =
603  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
604  boost::make_tuple(ms_id, cubit_bc_type));
605  if (miit !=
606  cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().end()) {
607  meshset = miit->meshset;
608  } else {
609  SETERRQ1(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
610  "ms_id = %d is not there", ms_id);
611  }
613 }

◆ getMeshsetsByType()

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

get all CUBIT meshsets by CUBIT type

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

Definition at line 631 of file MeshsetsManager.cpp.

632  {
634  auto miit =
635  cubitMeshsets.get<CubitMeshSets_mi_tag>().lower_bound(cubit_bc_type);
636  auto hi_miit =
637  cubitMeshsets.get<CubitMeshSets_mi_tag>().upper_bound(cubit_bc_type);
638  for (; miit != hi_miit; miit++) {
639  meshsets.insert(miit->meshset);
640  }
642 }