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

Evaluate gradient of Lagrange multipliers on reference slave surface. More...

#include <users_modules/mortar_contact/src/SimpleContact.hpp>

Inheritance diagram for SimpleContactProblem::OpCalculateGradLambdaXi:
[legend]
Collaboration diagram for SimpleContactProblem::OpCalculateGradLambdaXi:
[legend]

Public Member Functions

 OpCalculateGradLambdaXi (const string field_name, boost::shared_ptr< CommonDataSimpleContact > common_data_contact)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Private Attributes

boost::shared_ptr< CommonDataSimpleContactcommonDataSimpleContact
 

Detailed Description

Evaluate gradient of Lagrange multipliers on reference slave surface.

Definition at line 2408 of file SimpleContact.hpp.

Constructor & Destructor Documentation

◆ OpCalculateGradLambdaXi()

SimpleContactProblem::OpCalculateGradLambdaXi::OpCalculateGradLambdaXi ( const string  field_name,
boost::shared_ptr< CommonDataSimpleContact common_data_contact 
)
inline

Definition at line 2410 of file SimpleContact.hpp.

2413  : ContactOp(field_name, UserDataOperator::OPROW, ContactOp::FACESLAVE),
2414  commonDataSimpleContact(common_data_contact) {}

Member Function Documentation

◆ doWork()

MoFEMErrorCode SimpleContactProblem::OpCalculateGradLambdaXi::doWork ( int  side,
EntityType  type,
EntData data 
)

Definition at line 2841 of file SimpleContact.cpp.

2842  {
2844  const int nb_dofs = data.getFieldData().size();
2845  const int nb_integration_pts = getGaussPtsSlave().size2();
2846  auto &xi_grad_mat = *(commonDataSimpleContact->gradKsiLambdaAtGaussPtsPtr);
2847  xi_grad_mat.resize(2, nb_integration_pts, false);
2848  if (type == MBVERTEX)
2849  xi_grad_mat.clear();
2850 
2852 
2853  if (nb_dofs) {
2854 
2855  auto t_diff_lambda_xi = getFTensor1FromMat<2>(xi_grad_mat);
2856 
2857  for (size_t gg = 0; gg != nb_integration_pts; ++gg) {
2858  auto t_data = data.getFTensor0FieldData();
2859  auto t_diff_base = data.getFTensor1DiffN<2>(gg, 0);
2860  for (size_t bb = 0; bb != nb_dofs; ++bb) {
2861  t_diff_lambda_xi(I) += t_diff_base(I) * t_data;
2862  ++t_data;
2863  ++t_diff_base;
2864  }
2865  ++t_diff_lambda_xi;
2866  }
2867  }
2868 
2870 }

Member Data Documentation

◆ commonDataSimpleContact

boost::shared_ptr<CommonDataSimpleContact> SimpleContactProblem::OpCalculateGradLambdaXi::commonDataSimpleContact
private

Definition at line 2419 of file SimpleContact.hpp.


The documentation for this struct was generated from the following files:
SimpleContactProblem::OpCalculateGradLambdaXi::commonDataSimpleContact
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
Definition: SimpleContact.hpp:2419
MoFEM::EntitiesFieldData::EntData::getFieldData
const VectorDouble & getFieldData() const
get dofs values
Definition: EntitiesFieldData.hpp:1254
I
constexpr IntegrationType I
Definition: operators_tests.cpp:31
convert.type
type
Definition: convert.py:64
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
FTensor::Index
Definition: Index.hpp:23
MoFEM::EntitiesFieldData::EntData::getFTensor0FieldData
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0FieldData()
Resturn scalar files as a FTensor of rank 0.
Definition: EntitiesFieldData.cpp:506
SimpleContactProblem::ContactOp
ContactPrismElementForcesAndSourcesCore::UserDataOperator ContactOp
Definition: SimpleContact.hpp:30
MoFEM::EntitiesFieldData::EntData::getFTensor1DiffN
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
Definition: EntitiesFieldData.cpp:526
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
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPROW
@ OPROW
operator doWork function is executed on FE rows
Definition: ForcesAndSourcesCore.hpp:567