v0.13.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 43 of file DirichletBC.hpp.

Constructor & Destructor Documentation

◆ DataFromBc()

DataFromBc::DataFromBc ( )

Definition at line 55 of file DirichletBC.hpp.

56  : scaled_values(3), initial_values(3), bc_flags(3), is_rotation(false) {}
VectorInt bc_flags
Definition: DirichletBC.hpp:46
VectorDouble scaled_values
Definition: DirichletBC.hpp:44
VectorDouble initial_values
Definition: DirichletBC.hpp:45
bool is_rotation
Definition: DirichletBC.hpp:50

Member Function Documentation

◆ getBcData() [1/2]

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

Definition at line 720 of file DirichletBC.cpp.

721  {
723  // get data structure for boundary condition
724  CHKERR it->getBcDataStructure(mydata);
725  this->scaled_values[0] = mydata.data.value1;
726  this->scaled_values[1] = mydata.data.value2;
727  this->scaled_values[2] = mydata.data.value3;
728  this->initial_values = this->scaled_values;
729  this->bc_flags[0] = (int)mydata.data.flag1;
730  this->bc_flags[1] = (int)mydata.data.flag2;
731  this->bc_flags[2] = (int)mydata.data.flag3;
733 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEMErrorCode getBcDataStructure(CUBIT_BC_DATA_TYPE &data) const

◆ getBcData() [2/2]

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

Definition at line 735 of file DirichletBC.cpp.

736  {
738  CHKERR it->getAttributes(mydata);
739  if (mydata.size() < 6) {
740  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
741  "six attributes are required for given BC blockset (3 values + "
742  "3 flags)");
743  }
744  for (unsigned int ii = 0; ii < 3; ii++) {
745  this->initial_values[ii] = mydata[ii];
746  this->bc_flags[ii] = (int)mydata[ii + 3];
747  }
750 }
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:44
MoFEMErrorCode getAttributes(std::vector< double > &attributes) const
get Cubit block attributes

◆ getEntitiesFromBc()

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

Definition at line 752 of file DirichletBC.cpp.

753  {
755  for (int dim = 0; dim < 3; dim++) {
757  bc_ents[dim], true);
758  if (dim > 1) {
759  Range edges;
760  CHKERR mField.get_moab().get_adjacencies(bc_ents[dim], 1, false, edges,
761  moab::Interface::UNION);
762  bc_ents[1].insert(edges.begin(), edges.end());
763  }
764  if (dim > 0) {
765  Range nodes;
766  CHKERR mField.get_moab().get_connectivity(bc_ents[dim], nodes, true);
767  bc_ents[0].insert(nodes.begin(), nodes.end());
768  }
769  }
771 }
const int dim
Range bc_ents[3]
Definition: DirichletBC.hpp:47
virtual moab::Interface & get_moab()=0
MoFEMErrorCode getMeshsetIdEntitiesByDimension(Interface &moab, const int dimension, Range &entities, const bool recursive=false) const
get entities form meshset

Member Data Documentation

◆ bc_ents

Range DataFromBc::bc_ents[3]

Definition at line 47 of file DirichletBC.hpp.

◆ bc_flags

VectorInt DataFromBc::bc_flags

Definition at line 46 of file DirichletBC.hpp.

◆ initial_values

VectorDouble DataFromBc::initial_values

Definition at line 45 of file DirichletBC.hpp.

◆ is_rotation

bool DataFromBc::is_rotation

Definition at line 50 of file DirichletBC.hpp.

◆ scaled_values

VectorDouble DataFromBc::scaled_values

Definition at line 44 of file DirichletBC.hpp.

◆ t_centr

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

Definition at line 52 of file DirichletBC.hpp.

◆ t_normal

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

Definition at line 51 of file DirichletBC.hpp.

◆ theta

double DataFromBc::theta

Definition at line 53 of file DirichletBC.hpp.


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