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

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

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

Public Member Functions

 OpDispBc_dx (const std::string &row_field_name, const std::string &col_field_name, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, boost::shared_ptr< BcDispVec > &bc_disp_ptr)
 
MoFEMErrorCode integrate (EntData &row_data, EntData &col_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 (EntData &data)
 
virtual MoFEMErrorCode integrate (int row_side, EntityType row_type, EntData &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 872 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpDispBc_dx()

EshelbianPlasticity::OpDispBc_dx::OpDispBc_dx ( const std::string &  row_field_name,
const std::string &  col_field_name,
boost::shared_ptr< DataAtIntegrationPts > &  data_ptr,
boost::shared_ptr< BcDispVec > &  bc_disp_ptr 
)

Definition at line 874 of file EshelbianPlasticity.hpp.

878  : OpAssembleFace(row_field_name, col_field_name, data_ptr, OPROWCOL,
879  false),
880  bcDispPtr(bc_disp_ptr) {}
OpAssembleFace(const std::string &field, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, const char type)
boost::shared_ptr< BcDispVec > bcDispPtr

Member Function Documentation

◆ integrate()

MoFEMErrorCode EshelbianPlasticity::OpDispBc_dx::integrate ( EntData row_data,
EntData col_data 
)
virtual

Reimplemented from EshelbianPlasticity::OpAssembleBasic< FaceUserDataOperator >.

Definition at line 386 of file EshelbianOperators.cpp.

386  {
388 
389  auto get_ftensor2 = [](MatrixDouble &m, const int r, const int c) {
391  &m(r + 0, c + 0), &m(r + 0, c + 1), &m(r + 0, c + 2),
392 
393  &m(r + 1, c + 0), &m(r + 1, c + 1), &m(r + 1, c + 2),
394 
395  &m(r + 2, c + 0), &m(r + 2, c + 1), &m(r + 2, c + 2));
396  };
397 
398  // get entity of face
399  EntityHandle fe_ent = getFEEntityHandle();
400  // interate over all boundary data
401  for (auto &bc : (*bcDispPtr)) {
402  // check if finite element entity is part of boundary condition
403  if (bc.faces.find(fe_ent) != bc.faces.end()) {
404 
405  int nb_integration_pts = row_data.getN().size1();
406  int row_nb_dofs = row_data.getIndices().size();
407  int col_nb_dofs = col_data.getIndices().size();
408 
409  auto t_normal = getFTensor1Normal();
410  auto t_w = getFTensor0IntegrationWeight();
411  int nb_base_functions = row_data.getN().size2() / 3;
412  auto t_row_base_fun = row_data.getFTensor1N<3>();
413 
416 
417  for (int gg = 0; gg != nb_integration_pts; ++gg) {
418 
419  int rr = 0;
420  for (; rr != row_nb_dofs / 3; ++rr) {
421 
422  auto t_m = get_ftensor2(K, 3 * rr, 0);
423  const double val = t_w * (t_row_base_fun(i) * t_normal(i)) * 0.5;
424  auto t_col_base_fun = col_data.getFTensor0N(gg, 0);
425 
426  for (int cc = 0; cc != col_nb_dofs / 3; ++cc) {
427  const double set_val = val * t_col_base_fun;
428  t_m(0, 0) += set_val;
429  t_m(1, 1) += set_val;
430  t_m(2, 2) += set_val;
431  ++t_m;
432  ++t_col_base_fun;
433  }
434 
435  ++t_row_base_fun;
436  }
437  for (; rr != nb_base_functions; ++rr)
438  ++t_row_base_fun;
439 
440  ++t_w;
441  }
442  }
443  }
444 
446 }
ublas::matrix< double, ublas::row_major, DoubleAllocator > MatrixDouble
Definition: Types.hpp:77
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
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_dx::bcDispPtr

Definition at line 873 of file EshelbianPlasticity.hpp.


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