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

change meshset name More...

#include <src/multi_indices/BCMultiIndices.hpp>

Collaboration diagram for MoFEM::CubitMeshSets_change_name:
[legend]

Public Member Functions

 CubitMeshSets_change_name (Interface &moab, const std::string &name)
 
void operator() (CubitMeshSets &e)
 

Public Attributes

InterfacemOab
 
std::string nAme
 

Detailed Description

change meshset name

Definition at line 420 of file BCMultiIndices.hpp.

Constructor & Destructor Documentation

◆ CubitMeshSets_change_name()

MoFEM::CubitMeshSets_change_name::CubitMeshSets_change_name ( Interface moab,
const std::string &  name 
)

Definition at line 423 of file BCMultiIndices.hpp.

423  :
424  mOab(moab),
425  nAme(name) {
426  };

Member Function Documentation

◆ operator()()

void MoFEM::CubitMeshSets_change_name::operator() ( CubitMeshSets e)

Definition at line 677 of file BCMultiIndices.cpp.

677  {
678 
679  switch (e.cubitBcType.to_ulong()) {
680  case BLOCKSET:
681  {
682  nAme.resize(NAME_TAG_SIZE);
683  rval = mOab.tag_set_data(e.entityNameTag,&e.meshset,1,nAme.c_str()); MOAB_THROW(rval);
684  rval = mOab.tag_get_by_ptr(e.entityNameTag,&e.meshset,1,(const void **)&e.tagName); MOAB_THROW(rval);
685 
686  CubitBCType type;
687  ierr = e.getTypeFromName(type); if(ierr>0) THROW_MESSAGE("unrecognized Cubit name type");
688  e.cubitBcType |= type;
689  }; break;
690  case NODESET:
691  case SIDESET:
692  {
693  nAme.resize(NAME_TAG_SIZE);
694  rval = mOab.tag_set_data(e.entityNameTag,&e.meshset,1,nAme.c_str()); MOAB_THROW(rval);
695  rval = mOab.tag_get_by_ptr(e.entityNameTag,&e.meshset,1,(const void **)&e.tagName); MOAB_THROW(rval);
696  }; break;
697  default:
698  THROW_MESSAGE("not implemented for this CubitBC type");
699  }
700 }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:638
#define MOAB_THROW(a)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:620
std::bitset< 32 > CubitBCType
Definition: Common.hpp:200
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78

Member Data Documentation

◆ mOab

Interface& MoFEM::CubitMeshSets_change_name::mOab

Definition at line 421 of file BCMultiIndices.hpp.

◆ nAme

std::string MoFEM::CubitMeshSets_change_name::nAme

Definition at line 422 of file BCMultiIndices.hpp.


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