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

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

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

Public Member Functions

 OpConstrainBoundaryHDivRhs (const std::string row_field_name, 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

Examples
EshelbianPlasticity.cpp.

Definition at line 129 of file EshelbianContact.hpp.

Constructor & Destructor Documentation

◆ OpConstrainBoundaryHDivRhs()

EshelbianPlasticity::OpConstrainBoundaryHDivRhs::OpConstrainBoundaryHDivRhs ( const std::string  row_field_name,
boost::shared_ptr< ContactOps::CommonData common_data_ptr,
boost::shared_ptr< ContactTree contact_tree_ptr 
)

Definition at line 426 of file EshelbianContact.cpp.

430  : ContactOps::AssemblyBoundaryEleOp(row_field_name, row_field_name,
432  commonDataPtr(common_data_ptr), contactTreePtr(contact_tree_ptr) {}

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode EshelbianPlasticity::OpConstrainBoundaryHDivRhs::iNtegrate ( EntitiesFieldData::EntData row_data)

Definition at line 435 of file EshelbianContact.cpp.

435  {
437 
442 
443  const size_t nb_gauss_pts = getGaussPts().size2();
444 
445 #ifndef NDEBUG
446  if (commonDataPtr->contactDisp.size2() != nb_gauss_pts) {
447  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
448  "Wrong number of integration pts %d != %d",
449  commonDataPtr->contactDisp.size2(), nb_gauss_pts);
450  }
451 #endif // !NDEBUG
452 
453  auto &nf = locF;
454  locF.clear();
455 
456  auto t_w = getFTensor0IntegrationWeight();
457  auto t_disp = getFTensor1FromMat<3>(commonDataPtr->contactDisp);
458  auto t_traction = getFTensor1FromMat<3>(commonDataPtr->contactTraction);
459  auto t_coords = getFTensor1CoordsAtGaussPts();
460  auto t_material_normal = getFTensor1NormalsAtGaussPts();
461 
462  auto next = [&]() {
463  ++t_w;
464  ++t_disp;
465  ++t_traction;
466  ++t_coords;
467  ++t_material_normal;
468  };
469 
470  auto face_data_vec_ptr =
471  contactTreePtr->findFaceDataVecPtr(getFEEntityHandle());
472  auto face_gauss_pts_it = face_data_vec_ptr->begin();
473 
474  auto nb_base_functions = data.getN().size2() / 3;
475  auto t_base = data.getFTensor1N<3>();
476  for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
477 
478  auto t_nf = getFTensor1FromPtr<3>(&nf[0]);
479  const double alpha = t_w / 2.;
480 
481  size_t bb = 0;
482  for (; bb != nbRows / 3; ++bb) {
483  const double beta = alpha * t_base(i) * t_material_normal(i);
484  t_nf(i) -= beta * t_disp(i);
485  ++t_nf;
486  ++t_base;
487  }
488  for (; bb < nb_base_functions; ++bb)
489  ++t_base;
490 
491  next();
492  }
493 
495 }

Member Data Documentation

◆ commonDataPtr

boost::shared_ptr<ContactOps::CommonData> EshelbianPlasticity::OpConstrainBoundaryHDivRhs::commonDataPtr
private

Definition at line 139 of file EshelbianContact.hpp.

◆ contactTreePtr

boost::shared_ptr<ContactTree> EshelbianPlasticity::OpConstrainBoundaryHDivRhs::contactTreePtr
private

Definition at line 140 of file EshelbianContact.hpp.


The documentation for this struct was generated from the following files:
EshelbianPlasticity::OpConstrainBoundaryHDivRhs::commonDataPtr
boost::shared_ptr< ContactOps::CommonData > commonDataPtr
Definition: EshelbianContact.hpp:139
EshelbianPlasticity::OpConstrainBoundaryHDivRhs::contactTreePtr
boost::shared_ptr< ContactTree > contactTreePtr
Definition: EshelbianContact.hpp:140
ContactOps::AssemblyBoundaryEleOp
FormsIntegrators< BoundaryEleOp >::Assembly< A >::OpBase AssemblyBoundaryEleOp
Definition: EshelbianContact.hpp:17
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::Index< 'i', 3 >
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:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPROW
@ OPROW
operator doWork function is executed on FE rows
Definition: ForcesAndSourcesCore.hpp:567