v0.5.86
Files | Classes | Macros | Functions
Managing boundary conditions and materials

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

Collaboration diagram for Managing boundary conditions and materials:

Files

file  MeshsetsManager.hpp
 MeshsetsManager interface.
 

Classes

struct  MoFEM::MeshsetsManager
 Interface for managing meshsets containing materials and boundary conditions. More...
 
struct  MoFEM::CubitMeshSets
 this struct keeps basic methods for moab meshset about material and boundary conditions More...
 
struct  MoFEM::GenericCubitBcData
 Generic bc data structure. More...
 
struct  MoFEM::DisplacementCubitBcData
 Definition of the displacement bc data structure. More...
 
struct  MoFEM::ForceCubitBcData
 Definition of the force bc data structure. More...
 
struct  MoFEM::VelocityCubitBcData
 Definition of the velocity bc data structure. More...
 
struct  MoFEM::AccelerationCubitBcData
 Definition of the acceleration bc data structure. More...
 
struct  MoFEM::TemperatureCubitBcData
 Definition of the temperature bc data structure. More...
 
struct  MoFEM::PressureCubitBcData
 Definition of the pressure bc data structure. More...
 
struct  MoFEM::HeatFluxCubitBcData
 Definition of the heat flux bc data structure. More...
 
struct  MoFEM::CfgCubitBcData
 Definition of the cfd_bc data structure. 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...
 
PetscErrorCode MoFEM::MeshsetsManager::addMeshset (const CubitBCType cubit_bc_tyep, const int ms_id, const std::string name="")
 add cubit meshset More...
 
PetscErrorCode MoFEM::MeshsetsManager::getCubitMeshsetPtr (const int ms_id, const CubitBCType cubit_bc_type, const CubitMeshSets **cubit_meshset_ptr)
 get cubit meshset More...
 
PetscErrorCode MoFEM::MeshsetsManager::getCubitMeshsetPtr (const string name, const CubitMeshSets **cubit_meshset_ptr)
 get cubit meshset More...
 
PetscErrorCode MoFEM::MeshsetsManager::getEntitiesByDimension (const int ms_id, const unsigned int cubit_bc_type, const int dimension, Range &entities, const bool recursive=false)
 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...
 
PetscErrorCode MoFEM::MeshsetsManager::getEntitiesByDimension (const int ms_id, const unsigned int cubit_bc_type, Range &entities, const bool recursive=false)
 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...
 
PetscErrorCode MoFEM::MeshsetsManager::getMeshset (const int ms_id, const unsigned int cubit_bc_type, EntityHandle &meshset)
 get meshset from CUBIT Id and CUBIT type More...
 
PetscErrorCode 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.

Definition at line 54 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_NANE",it) {
...
}

Definition at line 90 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, elasticity.cpp, MagneticElement.hpp, unsaturated_transport.cpp, and UnsaturatedFlow.hpp.

Definition at line 72 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:
unsaturated_transport.cpp.

Definition at line 41 of file MeshsetsManager.hpp.

Function Documentation

◆ addMeshset()

PetscErrorCode MoFEM::MeshsetsManager::addMeshset ( const CubitBCType  cubit_bc_tyep,
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 258 of file MeshsetsManager.cpp.

258  {
259  MoFEM::Interface &m_field = cOre;
260  moab::Interface &moab = m_field.get_moab();
261  PetscFunctionBegin;
262  if(checkMeshset(ms_id,cubit_bc_type)) {
263  SETERRQ1(PETSC_COMM_SELF,MOFEM_DATA_INCONSISTENCY,"such cubit meshset is already there",ms_id);
264  }
265  try {
266  CubitMeshSets cmeshset(moab,cubit_bc_type,ms_id);
267  if((cmeshset.cubitBcType&CubitBCType(NODESET|SIDESET|BLOCKSET)).any()) {
268  std::pair<CubitMeshSet_multiIndex::iterator,bool> p = cubitMeshsets.insert(cmeshset);
269  if(!p.second) {
270  SETERRQ(PETSC_COMM_SELF,MOFEM_OPERATION_UNSUCCESSFUL,"meshset not inserted");
271  }
272  if(name.size()>0) {
273  bool success = cubitMeshsets.modify(p.first,CubitMeshSets_change_name(moab,name));
274  if(!success) {
275  SETERRQ(PETSC_COMM_SELF,MOFEM_OPERATION_UNSUCCESSFUL,"name to cubit meshset can not be set");
276  }
277  }
278  }
279  } catch (MoFEMException const &e) {
280  SETERRQ(PETSC_COMM_SELF,e.errorCode,e.errorMessage);
281  }
282  PetscFunctionReturn(0);
283  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets
virtual moab::Interface & get_moab()=0
std::bitset< 32 > CubitBCType
Definition: Common.hpp:125
InterfaceThis interface is used by user to:
Definition: Interface.hpp:38
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.

Definition at line 235 of file MeshsetsManager.cpp.

235  {
236  CubitMeshSet_multiIndex::index<Composite_Cubit_msId_And_MeshSetType_mi_tag>::type::iterator
237  miit = cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(boost::make_tuple(ms_id,cubit_bc_type.to_ulong()));
238  if(miit!=cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().end()) {
239  return true;
240  }
241  return false;
242  }
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 247 of file MeshsetsManager.hpp.

247 { return cubitMeshsets.begin(); }
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 272 of file MeshsetsManager.hpp.

272  {
273  return cubitMeshsets.get<CubitMeshSets_mi_tag>().lower_bound(cubit_bc_type);
274  }
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 336 of file MeshsetsManager.hpp.

336  {
337  return cubitMeshsets.get<CubitMeshSets_name>().lower_bound(name);
338  }
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 304 of file MeshsetsManager.hpp.

304  {
305  return cubitMeshsets.get<CubitMeshSets_mask_meshset_mi_tag>().lower_bound(cubit_bc_type);
306  }
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 320 of file MeshsetsManager.hpp.

320  {
321  return cubitMeshsets.get<CubitMeshSets_mask_meshset_mi_tag>().upper_bound(cubit_bc_type);
322  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets

◆ getCubitMeshsetPtr() [1/2]

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

get cubit meshset

Definition at line 398 of file MeshsetsManager.cpp.

402  {
403  MoFEM::Interface &m_field = cOre;
404  PetscFunctionBegin;
405  CubitMeshSet_multiIndex::index<Composite_Cubit_msId_And_MeshSetType_mi_tag>::type::iterator
406  miit = cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(
407  boost::make_tuple(ms_id,cubit_bc_type.to_ulong())
408  );
409  if(miit!=cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().end()) {
410  *cubit_meshset_ptr = &*miit;
411  } else {
412  SETERRQ1(m_field.get_comm(),MOFEM_DATA_INCONSISTENCY,"msId = %d is not there",ms_id);
413  }
414  PetscFunctionReturn(0);
415  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets
InterfaceThis interface is used by user to:
Definition: Interface.hpp:38
virtual MPI_Comm & get_comm() const =0

◆ getCubitMeshsetPtr() [2/2]

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

258 { return cubitMeshsets.end(); }
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 288 of file MeshsetsManager.hpp.

288  {
289  return cubitMeshsets.get<CubitMeshSets_mi_tag>().upper_bound(cubit_bc_type);
290  }
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 352 of file MeshsetsManager.hpp.

352  {
353  return cubitMeshsets.get<CubitMeshSets_name>().upper_bound(name);
354  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets

◆ getEntitiesByDimension() [1/2]

PetscErrorCode MoFEM::MeshsetsManager::getEntitiesByDimension ( const int  ms_id,
const unsigned int  cubit_bc_type,
const int  dimension,
Range &  entities,
const bool  recursive = false 
)

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

Definition at line 445 of file MeshsetsManager.cpp.

447  {
448 
449  MoFEM::Interface &m_field = cOre;
450  moab::Interface &moab = m_field.get_moab();
451  PetscFunctionBegin;
452  CubitMeshSet_multiIndex::index<Composite_Cubit_msId_And_MeshSetType_mi_tag>::type::iterator
453  miit = cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(boost::make_tuple(msId,cubit_bc_type));
454  if(miit!=cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().end()) {
455  ierr = miit->getMeshsetIdEntitiesByDimension(moab,dimension,entities,recursive); CHKERRQ(ierr);
456  } else {
457  SETERRQ1(m_field.get_comm(),MOFEM_DATA_INCONSISTENCY,"msId = %d is not there",msId);
458  }
459  PetscFunctionReturn(0);
460  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets
static PetscErrorCode ierr
Definition: Common.hpp:26
virtual moab::Interface & get_moab()=0
CHKERRQ(ierr)
InterfaceThis interface is used by user to:
Definition: Interface.hpp:38
virtual MPI_Comm & get_comm() const =0

◆ getEntitiesByDimension() [2/2]

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

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

464  {
465  MoFEM::Interface &m_field = cOre;
466  moab::Interface &moab = m_field.get_moab();
467  PetscFunctionBegin;
468  CubitMeshSet_multiIndex::index<Composite_Cubit_msId_And_MeshSetType_mi_tag>::type::iterator
469  miit = cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(boost::make_tuple(ms_id,cubit_bc_type));
470  if(miit!=cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().end()) {
471  ierr = miit->getMeshsetIdEntitiesByDimension(moab,entities,recursive); CHKERRQ(ierr);
472  } else {
473  SETERRQ1(m_field.get_comm(),MOFEM_DATA_INCONSISTENCY,"ms_id = %d is not there",ms_id);
474  }
475  PetscFunctionReturn(0);
476  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets
static PetscErrorCode ierr
Definition: Common.hpp:26
virtual moab::Interface & get_moab()=0
CHKERRQ(ierr)
InterfaceThis interface is used by user to:
Definition: Interface.hpp:38
virtual MPI_Comm & get_comm() const =0

◆ getMeshset()

PetscErrorCode 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

Definition at line 478 of file MeshsetsManager.cpp.

478  {
479  MoFEM::Interface &m_field = cOre;
480  PetscFunctionBegin;
481  CubitMeshSet_multiIndex::index<Composite_Cubit_msId_And_MeshSetType_mi_tag>::type::iterator
482  miit = cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().find(boost::make_tuple(ms_id,cubit_bc_type));
483  if(miit!=cubitMeshsets.get<Composite_Cubit_msId_And_MeshSetType_mi_tag>().end()) {
484  meshset = miit->meshset;
485  } else {
486  SETERRQ1(m_field.get_comm(),MOFEM_DATA_INCONSISTENCY,"ms_id = %d is not there",ms_id);
487  }
488  PetscFunctionReturn(0);
489  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets
InterfaceThis interface is used by user to:
Definition: Interface.hpp:38
virtual MPI_Comm & get_comm() const =0

◆ getMeshsetsByType()

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

491  {
492  PetscFunctionBegin;
493  CubitMeshsetByType::iterator
494  miit = cubitMeshsets.get<CubitMeshSets_mi_tag>().lower_bound(cubit_bc_type);
495  CubitMeshsetByType::iterator
496  hi_miit = cubitMeshsets.get<CubitMeshSets_mi_tag>().upper_bound(cubit_bc_type);
497  for(;miit!=hi_miit;miit++) {
498  meshsets.insert(miit->meshset);
499  }
500  PetscFunctionReturn(0);
501  }
CubitMeshSet_multiIndex cubitMeshsets
cubit meshsets