v0.14.0
Public Member Functions | Public Attributes | Protected Attributes | List of all members
EshelbianPlasticity::OpDispBc Struct Reference

#include <users_modules/eshelbian_plasticit/src/EshelbianPlasticity.hpp>

Inheritance diagram for EshelbianPlasticity::OpDispBc:
[legend]
Collaboration diagram for EshelbianPlasticity::OpDispBc:
[legend]

Public Member Functions

 OpDispBc (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, boost::shared_ptr< BcDispVec > &bc_disp_ptr, std::vector< boost::shared_ptr< ScalingMethod >> smv)
 
MoFEMErrorCode integrate (EntData &data)
 
- Public Member Functions inherited from EshelbianPlasticity::OpAssembleFace
 OpAssembleFace (const std::string &field, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, const char type)
 
 OpAssembleFace (const std::string &row_field, const std::string &col_field, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, const char type, const bool assemble_symmetry)
 
- Public Member Functions inherited from EshelbianPlasticity::OpAssembleBasic< FaceUserDataOperator >
 OpAssembleBasic (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type)
 
 OpAssembleBasic (const std::string &row_field, const std::string &col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type, const bool assemble_symmetry, ScaleOff scale_off=[]() { return 1;})
 
virtual MoFEMErrorCode integrate (int row_side, EntityType row_type, EntData &data)
 
virtual MoFEMErrorCode integrate (EntData &row_data, EntData &col_data)
 
virtual MoFEMErrorCode assemble (EntData &data)
 
virtual MoFEMErrorCode assemble (int row_side, EntityType row_type, EntData &data)
 
virtual MoFEMErrorCode assemble (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 

Public Attributes

boost::shared_ptr< BcDispVecbcDispPtr
 
- Public Attributes inherited from EshelbianPlasticity::OpAssembleBasic< FaceUserDataOperator >
const bool assembleSymmetry
 
boost::shared_ptr< DataAtIntegrationPtsdataAtPts
 data at integration pts More...
 
VectorDouble nF
 local right hand side vector More...
 
MatrixDouble K
 local tangent matrix More...
 
MatrixDouble transposeK
 
ScaleOff scaleOff
 

Protected Attributes

std::vector< boost::shared_ptr< ScalingMethod > > scalingMethodsVec
 

Additional Inherited Members

- Public Types inherited from EshelbianPlasticity::OpAssembleBasic< FaceUserDataOperator >
using ScaleOff = boost::function< double()>
 

Detailed Description

Definition at line 563 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpDispBc()

EshelbianPlasticity::OpDispBc::OpDispBc ( const std::string &  field_name,
boost::shared_ptr< DataAtIntegrationPts > &  data_ptr,
boost::shared_ptr< BcDispVec > &  bc_disp_ptr,
std::vector< boost::shared_ptr< ScalingMethod >>  smv 
)
inline

Definition at line 565 of file EshelbianPlasticity.hpp.

569  : OpAssembleFace(field_name, data_ptr, OPROW), bcDispPtr(bc_disp_ptr),
570  scalingMethodsVec(smv) {}

Member Function Documentation

◆ integrate()

MoFEMErrorCode EshelbianPlasticity::OpDispBc::integrate ( EntData data)
virtual

Reimplemented from EshelbianPlasticity::OpAssembleBasic< FaceUserDataOperator >.

Definition at line 945 of file EshelbianOperators.cpp.

945  {
947  // get entity of face
948  EntityHandle fe_ent = getFEEntityHandle();
949  // interate over all boundary data
950  for (auto &bc : (*bcDispPtr)) {
951  // check if finite element entity is part of boundary condition
952  if (bc.faces.find(fe_ent) != bc.faces.end()) {
953  int nb_dofs = data.getIndices().size();
954  int nb_integration_pts = data.getN().size1();
955  auto t_normal = getFTensor1Normal();
956  auto t_w = getFTensor0IntegrationWeight();
957  int nb_base_functions = data.getN().size2() / 3;
958  auto t_row_base_fun = data.getFTensor1N<3>();
959 
962  auto get_ftensor1 = [](auto &v) {
964  &v[2]);
965  };
966 
967  double scale = 1;
968  for (auto &sm : scalingMethodsVec) {
969  scale *= sm->getScale(getFEMethod()->ts_t);
970  }
971 
972  // get bc data
973  FTensor::Tensor1<double, 3> t_bc_disp(bc.vals[0], bc.vals[1], bc.vals[2]);
974  t_bc_disp(i) *= scale;
975 
976  for (int gg = 0; gg != nb_integration_pts; ++gg) {
978  t_bc_res(i) = t_bc_disp(i);
979  auto t_nf = get_ftensor1(nF);
980  int bb = 0;
981  for (; bb != nb_dofs / 3; ++bb) {
982  t_nf(i) -=
983  t_w * (t_row_base_fun(j) * t_normal(j)) * t_bc_res(i) * 0.5;
984  ++t_nf;
985  ++t_row_base_fun;
986  }
987  for (; bb != nb_base_functions; ++bb)
988  ++t_row_base_fun;
989 
990  ++t_w;
991  }
992  }
993  }
995 }

Member Data Documentation

◆ bcDispPtr

boost::shared_ptr<BcDispVec> EshelbianPlasticity::OpDispBc::bcDispPtr

Definition at line 564 of file EshelbianPlasticity.hpp.

◆ scalingMethodsVec

std::vector<boost::shared_ptr<ScalingMethod> > EshelbianPlasticity::OpDispBc::scalingMethodsVec
protected

Definition at line 574 of file EshelbianPlasticity.hpp.


The documentation for this struct was generated from the following files:
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
EntityHandle
EshelbianPlasticity::OpAssembleBasic< FaceUserDataOperator >::nF
VectorDouble nF
local right hand side vector
Definition: EshelbianPlasticity.hpp:371
ContactOps::scale
double scale
Definition: EshelbianContact.hpp:22
MoFEM::EntitiesFieldData::EntData::getIndices
const VectorInt & getIndices() const
Get global indices of dofs on entity.
Definition: EntitiesFieldData.hpp:1201
EshelbianPlasticity::OpDispBc::scalingMethodsVec
std::vector< boost::shared_ptr< ScalingMethod > > scalingMethodsVec
Definition: EshelbianPlasticity.hpp:574
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
EshelbianPlasticity::OpDispBc::bcDispPtr
boost::shared_ptr< BcDispVec > bcDispPtr
Definition: EshelbianPlasticity.hpp:564
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
FTensor::Index< 'i', 3 >
v
const double v
phase velocity of light in medium (cm/ns)
Definition: initial_diffusion.cpp:40
MoFEM::EntitiesFieldData::EntData::getN
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
Definition: EntitiesFieldData.hpp:1305
EshelbianPlasticity::OpAssembleFace::OpAssembleFace
OpAssembleFace(const std::string &field, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, const char type)
Definition: EshelbianPlasticity.hpp:476
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
MoFEM::EntitiesFieldData::EntData::getFTensor1N
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1N(FieldApproximationBase base)
Get base functions for Hdiv/Hcurl spaces.
Definition: EntitiesFieldData.cpp:640
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346