v0.8.4
Public Member Functions | Public Attributes | List of all members
MoFEM::CubitMeshSets_change_bc_data_structure Struct Reference

#include <src/multi_indices/BCMultiIndices.hpp>

Collaboration diagram for MoFEM::CubitMeshSets_change_bc_data_structure:
[legend]

Public Member Functions

 CubitMeshSets_change_bc_data_structure (Interface &moab, const GenericCubitBcData &bc_data)
 
void operator() (CubitMeshSets &e)
 

Public Attributes

InterfacemOab
 
const GenericCubitBcDatabcData
 

Detailed Description

change meshset attributes for material data structure

Definition at line 459 of file BCMultiIndices.hpp.

Constructor & Destructor Documentation

◆ CubitMeshSets_change_bc_data_structure()

MoFEM::CubitMeshSets_change_bc_data_structure::CubitMeshSets_change_bc_data_structure ( Interface moab,
const GenericCubitBcData bc_data 
)

Definition at line 462 of file BCMultiIndices.hpp.

464  :
465  mOab(moab),
466  bcData(bc_data) {}

Member Function Documentation

◆ operator()()

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

Definition at line 727 of file BCMultiIndices.cpp.

727  {
728 
729 
730  // Need to run this to set tag size, don;t know nothing about structure
731  int tag_size[] = { (int)bcData.getSizeOfData() };
732  void const* tag_data[] = { bcData.getDataPtr() };
733  if((e.cubitBcType&CubitBCType(NODESET)).any()) {
734  rval = mOab.tag_set_by_ptr( e.nsTag_data,&e.meshset,1,tag_data,tag_size
735  ); MOAB_THROW(rval);
736  rval = mOab.tag_get_by_ptr(
737  e.nsTag_data,&e.meshset,1,(const void **)&e.tag_bc_data,&e.tag_bc_size
738  ); MOAB_THROW(rval);
739  } else if((e.cubitBcType&CubitBCType(SIDESET)).any()) {
740  rval = mOab.tag_set_by_ptr(
741  e.ssTag_data,&e.meshset,1,tag_data,tag_size
742  ); MOAB_THROW(rval);
743  rval = mOab.tag_get_by_ptr(
744  e.ssTag_data,&e.meshset,1,(const void **)&e.tag_bc_data,&e.tag_bc_size
745  ); MOAB_THROW(rval);
746  } else {
747  THROW_MESSAGE("You have to have NODESET or SIDESET to apply BC data on it");
748  }
749  // Here I know about structure
750  ierr = e.setBcDataStructure(bcData);
751  if(ierr>0) THROW_MESSAGE("Attributes not changed");
752  // Get Type form BC data
753  ierr = e.getTypeFromBcData(e.cubitBcType); if(ierr>0) THROW_MESSAGE("unrecognized bc_data type");
754 }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:641
#define MOAB_THROW(a)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:623
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
virtual std::size_t getSizeOfData() const =0
get data structure size
virtual const void * getDataPtr() const =0
get pointer to data structure

Member Data Documentation

◆ bcData

const GenericCubitBcData& MoFEM::CubitMeshSets_change_bc_data_structure::bcData

Definition at line 461 of file BCMultiIndices.hpp.

◆ mOab

Interface& MoFEM::CubitMeshSets_change_bc_data_structure::mOab

Definition at line 460 of file BCMultiIndices.hpp.


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