v0.14.0
Public Types | Public Member Functions | Private Attributes | List of all members
EshelbianPlasticity::OpConstrainBoundaryHDivRhs< A, IntegrationType::GAUSS > Struct Template Reference

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

Inheritance diagram for EshelbianPlasticity::OpConstrainBoundaryHDivRhs< A, IntegrationType::GAUSS >:
[legend]
Collaboration diagram for EshelbianPlasticity::OpConstrainBoundaryHDivRhs< A, IntegrationType::GAUSS >:
[legend]

Public Types

using OP = typename FormsIntegrators< FaceUserDataOperator >::Assembly< A >::OpBrokenBase
 

Public Member Functions

 OpConstrainBoundaryHDivRhs (boost::shared_ptr< std::vector< BrokenBaseSideData >> broken_base_side_data, boost::shared_ptr< ContactOps::CommonData > common_data_ptr, boost::shared_ptr< ContactTree > contact_tree_ptr)
 
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &row_data)
 

Private Attributes

boost::shared_ptr< ContactOps::CommonDatacommonDataPtr
 
boost::shared_ptr< ContactTreecontactTreePtr
 

Detailed Description

template<AssemblyType A>
struct EshelbianPlasticity::OpConstrainBoundaryHDivRhs< A, IntegrationType::GAUSS >

Definition at line 137 of file EshelbianContact.hpp.

Member Typedef Documentation

◆ OP

template<AssemblyType A>
using EshelbianPlasticity::OpConstrainBoundaryHDivRhs< A, IntegrationType::GAUSS >::OP = typename FormsIntegrators<FaceUserDataOperator>::Assembly< A>::OpBrokenBase

Definition at line 141 of file EshelbianContact.hpp.

Constructor & Destructor Documentation

◆ OpConstrainBoundaryHDivRhs()

template<AssemblyType A>
EshelbianPlasticity::OpConstrainBoundaryHDivRhs< A, IntegrationType::GAUSS >::OpConstrainBoundaryHDivRhs ( boost::shared_ptr< std::vector< BrokenBaseSideData >>  broken_base_side_data,
boost::shared_ptr< ContactOps::CommonData common_data_ptr,
boost::shared_ptr< ContactTree contact_tree_ptr 
)

Definition at line 458 of file EshelbianContact.cpp.

463  : OP(broken_base_side_data), commonDataPtr(common_data_ptr),
464  contactTreePtr(contact_tree_ptr) {}

Member Function Documentation

◆ iNtegrate()

template<AssemblyType A>
MoFEMErrorCode EshelbianPlasticity::OpConstrainBoundaryHDivRhs< A, IntegrationType::GAUSS >::iNtegrate ( EntitiesFieldData::EntData row_data)

Definition at line 467 of file EshelbianContact.cpp.

468  {
470 
475 
476  const size_t nb_gauss_pts = OP::getGaussPts().size2();
477 
478 #ifndef NDEBUG
479  if (commonDataPtr->contactDisp.size2() != nb_gauss_pts) {
480  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
481  "Wrong number of integration pts %d != %d",
482  commonDataPtr->contactDisp.size2(), nb_gauss_pts);
483  }
484 #endif // !NDEBUG
485 
486  auto &nf = OP::locF;
487  OP::locF.clear();
488 
489  auto t_w = OP::getFTensor0IntegrationWeight();
490  auto t_material_normal = OP::getFTensor1NormalsAtGaussPts();
491  auto t_coords = OP::getFTensor1CoordsAtGaussPts();
492 
493  auto t_disp = getFTensor1FromMat<3>(commonDataPtr->contactDisp);
494  auto t_traction = getFTensor1FromMat<3>(commonDataPtr->contactTraction);
495 
496  auto next = [&]() {
497  ++t_w;
498  ++t_disp;
499  ++t_traction;
500  ++t_coords;
501  ++t_material_normal;
502  };
503 
504  auto face_data_vec_ptr =
505  contactTreePtr->findFaceDataVecPtr(OP::getFEEntityHandle());
506  auto face_gauss_pts_it = face_data_vec_ptr->begin();
507 
508  auto nb_base_functions = data.getN().size2() / 3;
509  auto t_base = data.getFTensor1N<3>();
510  for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
511 
512  auto t_nf = getFTensor1FromPtr<3>(&nf[0]);
513  const double alpha = t_w / 2.;
514 
515  size_t bb = 0;
516  for (; bb != OP::nbRows / 3; ++bb) {
517  const double beta = alpha * t_base(i) * t_material_normal(i);
518  t_nf(i) -= beta * t_disp(i);
519  ++t_nf;
520  ++t_base;
521  }
522  for (; bb < nb_base_functions; ++bb)
523  ++t_base;
524 
525  next();
526  }
527 
529 }

Member Data Documentation

◆ commonDataPtr

template<AssemblyType A>
boost::shared_ptr<ContactOps::CommonData> EshelbianPlasticity::OpConstrainBoundaryHDivRhs< A, IntegrationType::GAUSS >::commonDataPtr
private

Definition at line 151 of file EshelbianContact.hpp.

◆ contactTreePtr

template<AssemblyType A>
boost::shared_ptr<ContactTree> EshelbianPlasticity::OpConstrainBoundaryHDivRhs< A, IntegrationType::GAUSS >::contactTreePtr
private

Definition at line 152 of file EshelbianContact.hpp.


The documentation for this struct was generated from the following files:
EshelbianPlasticity::OpConstrainBoundaryHDivRhs< A, IntegrationType::GAUSS >::OP
typename FormsIntegrators< FaceUserDataOperator >::Assembly< A >::OpBrokenBase OP
Definition: EshelbianContact.hpp:141
FTENSOR_INDEX
#define FTENSOR_INDEX(DIM, I)
Definition: Templates.hpp:2011
SPACE_DIM
constexpr int SPACE_DIM
Definition: child_and_parent.cpp:16
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
EshelbianPlasticity::OpConstrainBoundaryHDivRhs< A, IntegrationType::GAUSS >::commonDataPtr
boost::shared_ptr< ContactOps::CommonData > commonDataPtr
Definition: EshelbianContact.hpp:151
EshelbianPlasticity::OpConstrainBoundaryHDivRhs< A, IntegrationType::GAUSS >::contactTreePtr
boost::shared_ptr< ContactTree > contactTreePtr
Definition: EshelbianContact.hpp:152
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21