v0.13.2
Loading...
Searching...
No Matches
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) {}
constexpr auto field_name
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
ContactPrismElementForcesAndSourcesCore::UserDataOperator ContactOp

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}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
constexpr IntegrationType I
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
const VectorDouble & getFieldData() const
get dofs values
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0FieldData()
Resturn scalar files as a FTensor of rank 0.

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: