v0.9.0
Public Member Functions | Public Attributes | List of all members
EshelbianPlasticity::OpRotationBc_dx Struct Reference

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

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

Public Member Functions

 OpRotationBc_dx (const std::string &row_field_name, const std::string &col_field_name, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, boost::shared_ptr< BcRotVec > &bc_rot_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< BcRotVecbcRotPtr
 
- 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 893 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpRotationBc_dx()

EshelbianPlasticity::OpRotationBc_dx::OpRotationBc_dx ( const std::string &  row_field_name,
const std::string &  col_field_name,
boost::shared_ptr< DataAtIntegrationPts > &  data_ptr,
boost::shared_ptr< BcRotVec > &  bc_rot_ptr 
)

Definition at line 895 of file EshelbianPlasticity.hpp.

899  : OpAssembleFace(row_field_name, col_field_name, data_ptr, OPROWCOL,
900  false),
901  bcRotPtr(bc_rot_ptr) {}
boost::shared_ptr< BcRotVec > bcRotPtr
OpAssembleFace(const std::string &field, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, const char type)

Member Function Documentation

◆ integrate()

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

Reimplemented from EshelbianPlasticity::OpAssembleBasic< FaceUserDataOperator >.

Definition at line 510 of file EshelbianOperators.cpp.

511  {
513 
514  auto get_ftensor2 = [](MatrixDouble &m, const int r, const int c) {
516  &m(r + 0, c + 0), &m(r + 0, c + 1), &m(r + 0, c + 2),
517 
518  &m(r + 1, c + 0), &m(r + 1, c + 1), &m(r + 1, c + 2),
519 
520  &m(r + 2, c + 0), &m(r + 2, c + 1), &m(r + 2, c + 2));
521  };
522 
523  // get entity of face
524  EntityHandle fe_ent = getFEEntityHandle();
525  // interate over all boundary data
526  for (auto &bc : (*bcRotPtr)) {
527  // check if finite element entity is part of boundary condition
528  if (bc.faces.find(fe_ent) != bc.faces.end()) {
529 
530  int nb_integration_pts = row_data.getN().size1();
531  int row_nb_dofs = row_data.getIndices().size();
532  int col_nb_dofs = col_data.getIndices().size();
533 
534  int row_nb_base_functions = row_data.getN().size2() / 3;
535  auto t_row_base_fun = row_data.getFTensor1N<3>();
536 
538 
539  auto t_normal = getFTensor1Normal();
540  auto t_w = getFTensor0IntegrationWeight();
541 
542  // get bc data
543  for (int gg = 0; gg != nb_integration_pts; ++gg) {
544 
545  int rr = 0;
546  for (; rr != row_nb_dofs / 3; ++rr) {
547 
548  const double val = t_w * (t_row_base_fun(i) * t_normal(i)) * 0.5;
549 
550  auto t_m = get_ftensor2(K, 3 * rr, 0);
551  auto t_col_base_fun = col_data.getFTensor0N(gg, 0);
552 
553  for (int cc = 0; cc != col_nb_dofs / 3; ++cc) {
554  const double set_val = val * t_col_base_fun;
555  t_m(0, 0) += set_val;
556  t_m(1, 1) += set_val;
557  t_m(2, 2) += set_val;
558  ++t_m;
559  ++t_col_base_fun;
560  }
561 
562  ++t_row_base_fun;
563  }
564  for (; rr != row_nb_base_functions; ++rr)
565  ++t_row_base_fun;
566 
567  ++t_w;
568  }
569  }
570  }
571 
573 }
boost::shared_ptr< BcRotVec > bcRotPtr
ublas::matrix< double, ublas::row_major, DoubleAllocator > MatrixDouble
Definition: Types.hpp:74
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
const VectorInt & getIndices() const
Get global indices of dofs on entity.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1N(FieldApproximationBase base)
Get base functions for Hdiv/Hcurl spaces.
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.

Member Data Documentation

◆ bcRotPtr

boost::shared_ptr<BcRotVec> EshelbianPlasticity::OpRotationBc_dx::bcRotPtr

Definition at line 894 of file EshelbianPlasticity.hpp.


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