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

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

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

Public Types

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

Public Member Functions

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

Private Attributes

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

Detailed Description

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

Definition at line 201 of file EshelbianContact.hpp.

Member Typedef Documentation

◆ OP

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

Definition at line 205 of file EshelbianContact.hpp.

Constructor & Destructor Documentation

◆ OpConstrainBoundaryHDivLhs_dU()

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

Definition at line 834 of file EshelbianContact.cpp.

840  : OP(col_field_name, broken_base_side_data, true, true),
841  commonDataPtr(common_data_ptr), contactTreePtr(contact_tree_ptr) {
842  OP::sYmm = false;
843 }

Member Function Documentation

◆ iNtegrate()

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

Definition at line 847 of file EshelbianContact.cpp.

849  {
851 
852  // Note: col_data and row_data are swapped in this function, we going to
853  // transpose locMat at the end
854 
855  using namespace ContactOps;
856 
860 
861  auto nb_rows = row_data.getIndices().size();
862  auto nb_cols = col_data.getIndices().size();
863 
864  auto &locMat = AssemblyBoundaryEleOp::locMat;
865  locMat.resize(nb_rows, nb_cols, false);
866  locMat.clear();
867 
868  if (nb_cols && nb_rows) {
869 
870  const size_t nb_gauss_pts = OP::getGaussPts().size2();
871 
872  auto t_w = OP::getFTensor0IntegrationWeight();
873  auto t_disp = getFTensor1FromMat<3>(commonDataPtr->contactDisp);
874  auto t_traction = getFTensor1FromMat<3>(commonDataPtr->contactTraction);
875  auto t_coords = OP::getFTensor1CoordsAtGaussPts();
876  auto t_material_normal = OP::getFTensor1NormalsAtGaussPts();
877 
878  auto next = [&]() {
879  ++t_w;
880  ++t_disp;
881  ++t_traction;
882  ++t_coords;
883  ++t_material_normal;
884  };
885 
886  constexpr auto t_kd = FTensor::Kronecker_Delta<int>();
887 
888  auto face_data_vec_ptr =
889  contactTreePtr->findFaceDataVecPtr(OP::getFEEntityHandle());
890  auto face_gauss_pts_it = face_data_vec_ptr->begin();
891 
892  auto t_row_base = row_data.getFTensor1N<3>();
893  auto nb_face_functions = row_data.getN().size2() / 3;
894  for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
895 
896  const auto alpha = t_w / 2.;
897 
898  size_t rr = 0;
899  for (; rr != nb_rows / 3; ++rr) {
900 
901  auto row_base = alpha * (t_row_base(i) * t_material_normal(i));
902 
903  auto t_mat = getFTensor2FromArray<3, 3, 3>(locMat, 3 * rr);
904  auto t_col_base = col_data.getFTensor0N(gg, 0);
905 
906  for (size_t cc = 0; cc != nb_cols / 3; ++cc) {
907  const auto beta = row_base * t_col_base;
908  t_mat(i, j) -= beta * t_kd(i, j);
909  ++t_col_base;
910  ++t_mat;
911  }
912 
913  ++t_row_base;
914  }
915  for (; rr < nb_face_functions; ++rr)
916  ++t_row_base;
917 
918  next();
919  }
920  }
921 
922  locMat = trans(locMat);
923 
925 }

Member Data Documentation

◆ commonDataPtr

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

Definition at line 217 of file EshelbianContact.hpp.

◆ contactTreePtr

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

Definition at line 218 of file EshelbianContact.hpp.


The documentation for this struct was generated from the following files:
MoFEM::OpBaseImpl::locMat
MatrixDouble locMat
local entity block matrix
Definition: FormsIntegrators.hpp:249
ContactOps
Definition: contact.cpp:99
FTensor::Kronecker_Delta
Kronecker Delta class.
Definition: Kronecker_Delta.hpp:15
FTENSOR_INDEX
#define FTENSOR_INDEX(DIM, I)
Definition: Templates.hpp:2011
EshelbianPlasticity::OpConstrainBoundaryHDivLhs_dU< A, IntegrationType::GAUSS >::commonDataPtr
boost::shared_ptr< ContactOps::CommonData > commonDataPtr
Definition: EshelbianContact.hpp:217
EshelbianPlasticity::OpConstrainBoundaryHDivLhs_dU< A, IntegrationType::GAUSS >::OP
typename FormsIntegrators< FaceUserDataOperator >::Assembly< A >::OpBrokenBase OP
Definition: EshelbianContact.hpp:205
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
t_kd
constexpr auto t_kd
Definition: free_surface.cpp:137
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
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
EshelbianPlasticity::OpConstrainBoundaryHDivLhs_dU< A, IntegrationType::GAUSS >::contactTreePtr
boost::shared_ptr< ContactTree > contactTreePtr
Definition: EshelbianContact.hpp:218