v0.14.0
Public Member Functions | Public Attributes | List of all members
DataFromBc Struct Reference

Data from Cubit blocksets. More...

#include <users_modules/basic_finite_elements/src/DirichletBC.hpp>

Collaboration diagram for DataFromBc:
[legend]

Public Member Functions

 DataFromBc ()
 
MoFEMErrorCode getBcData (DisplacementCubitBcData &mydata, const MoFEM::CubitMeshSets *it)
 
MoFEMErrorCode getBcData (std::vector< double > &mydata, const MoFEM::CubitMeshSets *it)
 
MoFEMErrorCode getEntitiesFromBc (MoFEM::Interface &mField, const MoFEM::CubitMeshSets *it)
 

Public Attributes

VectorDouble scaled_values
 
VectorDouble initial_values
 
VectorInt bc_flags
 
Range bc_ents [3]
 
bool is_rotation
 
FTensor::Tensor1< double, 3 > t_normal
 
FTensor::Tensor1< double, 3 > t_centr
 
double theta
 

Detailed Description

Data from Cubit blocksets.

Definition at line 31 of file DirichletBC.hpp.

Constructor & Destructor Documentation

◆ DataFromBc()

DataFromBc::DataFromBc ( )
inline

Definition at line 43 of file DirichletBC.hpp.

44  : scaled_values(3), initial_values(3), bc_flags(3), is_rotation(false) {}

Member Function Documentation

◆ getBcData() [1/2]

MoFEMErrorCode DataFromBc::getBcData ( DisplacementCubitBcData mydata,
const MoFEM::CubitMeshSets it 
)

Definition at line 729 of file DirichletBC.cpp.

730  {
732  // get data structure for boundary condition
733  CHKERR it->getBcDataStructure(mydata);
734  this->scaled_values[0] = mydata.data.value1;
735  this->scaled_values[1] = mydata.data.value2;
736  this->scaled_values[2] = mydata.data.value3;
737  this->initial_values = this->scaled_values;
738  this->bc_flags[0] = (int)mydata.data.flag1;
739  this->bc_flags[1] = (int)mydata.data.flag2;
740  this->bc_flags[2] = (int)mydata.data.flag3;
742 }

◆ getBcData() [2/2]

MoFEMErrorCode DataFromBc::getBcData ( std::vector< double > &  mydata,
const MoFEM::CubitMeshSets it 
)

Definition at line 744 of file DirichletBC.cpp.

745  {
747  CHKERR it->getAttributes(mydata);
748  if (mydata.size() < 6) {
749  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
750  "six attributes are required for given BC blockset (3 values + "
751  "3 flags)");
752  }
753  for (unsigned int ii = 0; ii < 3; ii++) {
754  this->initial_values[ii] = mydata[ii];
755  this->bc_flags[ii] = (int)mydata[ii + 3];
756  }
759 }

◆ getEntitiesFromBc()

MoFEMErrorCode DataFromBc::getEntitiesFromBc ( MoFEM::Interface mField,
const MoFEM::CubitMeshSets it 
)

Definition at line 761 of file DirichletBC.cpp.

762  {
764  for (int dim = 0; dim < 3; dim++) {
766  bc_ents[dim], true);
767  if (dim > 1) {
768  Range edges;
769  CHKERR mField.get_moab().get_adjacencies(bc_ents[dim], 1, false, edges,
770  moab::Interface::UNION);
771  bc_ents[1].insert(edges.begin(), edges.end());
772  }
773  if (dim > 0) {
774  Range nodes;
775  CHKERR mField.get_moab().get_connectivity(bc_ents[dim], nodes, true);
776  bc_ents[0].insert(nodes.begin(), nodes.end());
777  }
778  }
780 }

Member Data Documentation

◆ bc_ents

Range DataFromBc::bc_ents[3]

Definition at line 35 of file DirichletBC.hpp.

◆ bc_flags

VectorInt DataFromBc::bc_flags

Definition at line 34 of file DirichletBC.hpp.

◆ initial_values

VectorDouble DataFromBc::initial_values

Definition at line 33 of file DirichletBC.hpp.

◆ is_rotation

bool DataFromBc::is_rotation

Definition at line 38 of file DirichletBC.hpp.

◆ scaled_values

VectorDouble DataFromBc::scaled_values

Definition at line 32 of file DirichletBC.hpp.

◆ t_centr

FTensor::Tensor1<double, 3> DataFromBc::t_centr

Definition at line 40 of file DirichletBC.hpp.

◆ t_normal

FTensor::Tensor1<double, 3> DataFromBc::t_normal

Definition at line 39 of file DirichletBC.hpp.

◆ theta

double DataFromBc::theta

Definition at line 41 of file DirichletBC.hpp.


The documentation for this struct was generated from the following files:
DataFromBc::bc_ents
Range bc_ents[3]
Definition: DirichletBC.hpp:35
MoFEM::CubitMeshSets::getBcDataStructure
MoFEMErrorCode getBcDataStructure(CUBIT_BC_DATA_TYPE &data) const
Definition: BCMultiIndices.hpp:296
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
DataFromBc::is_rotation
bool is_rotation
Definition: DirichletBC.hpp:38
DataFromBc::scaled_values
VectorDouble scaled_values
Definition: DirichletBC.hpp:32
MoFEM::DisplacementCubitBcData::data
_data_ data
Definition: BCData.hpp:99
DataFromBc::bc_flags
VectorInt bc_flags
Definition: DirichletBC.hpp:34
Range
MoFEM::CubitMeshSets::getAttributes
MoFEMErrorCode getAttributes(std::vector< double > &attributes) const
get Cubit block attributes
Definition: BCMultiIndices.cpp:290
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
DataFromBc::initial_values
VectorDouble initial_values
Definition: DirichletBC.hpp:33
MoFEM::CubitMeshSets::getMeshsetIdEntitiesByDimension
MoFEMErrorCode getMeshsetIdEntitiesByDimension(Interface &moab, const int dimension, Range &entities, const bool recursive=false) const
get entities form meshset
convert.int
int
Definition: convert.py:64
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359