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

#include <users_modules/eshelbian_plasticty/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)
 
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)
 
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
 

Detailed Description

Definition at line 863 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 
)

Definition at line 865 of file EshelbianPlasticity.hpp.

868  : OpAssembleFace(field_name, data_ptr, OPROW), bcDispPtr(bc_disp_ptr) {}
boost::shared_ptr< BcDispVec > bcDispPtr
OpAssembleFace(const std::string &field, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, const char type)

Member Function Documentation

◆ integrate()

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

Reimplemented from EshelbianPlasticity::OpAssembleBasic< FaceUserDataOperator >.

Definition at line 334 of file EshelbianOperators.cpp.

334  {
336  // get entity of face
337  EntityHandle fe_ent = getFEEntityHandle();
338  // interate over all boundary data
339  for (auto &bc : (*bcDispPtr)) {
340  // check if finite element entity is part of boundary condition
341  if (bc.faces.find(fe_ent) != bc.faces.end()) {
342  int nb_dofs = data.getIndices().size();
343  int nb_integration_pts = data.getN().size1();
344  auto t_normal = getFTensor1Normal();
345  auto t_w = getFTensor0IntegrationWeight();
346  int nb_base_functions = data.getN().size2() / 3;
347  auto t_row_base_fun = data.getFTensor1N<3>();
348 
349  auto t_coords = getFTensor1CoordsAtGaussPts();
350  auto t_x = getFTensor1FromMat<3>(*(dataAtPts->xAtPts));
351 
354  auto get_ftensor1 = [](auto &v) {
355  return FTensor::Tensor1<FTensor::PackPtr<double *, 3>, 3>(&v[0], &v[1],
356  &v[2]);
357  };
358 
359  // get bc data
360  FTensor::Tensor1<double, 3> t_bc_disp(bc.vals[0], bc.vals[1], bc.vals[2]);
361  t_bc_disp(i) *= getFEMethod()->ts_t;
362 
363  for (int gg = 0; gg != nb_integration_pts; ++gg) {
365  t_bc_res(i) = t_bc_disp(i) - t_x(i) + t_coords(i);
366  auto t_nf = get_ftensor1(nF);
367  int bb = 0;
368  for (; bb != nb_dofs / 3; ++bb) {
369  t_nf(i) -=
370  t_w * (t_row_base_fun(j) * t_normal(j)) * t_bc_res(i) * 0.5;
371  ++t_nf;
372  ++t_row_base_fun;
373  }
374  for (; bb != nb_base_functions; ++bb)
375  ++t_row_base_fun;
376 
377  ++t_w;
378  ++t_coords;
379  ++t_x;
380  }
381  }
382  }
384 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
boost::shared_ptr< BcDispVec > bcDispPtr
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

Member Data Documentation

◆ bcDispPtr

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

Definition at line 864 of file EshelbianPlasticity.hpp.


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