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

Evaluate gradient position on reference master surface. More...

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

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

Public Member Functions

 OpCalculateGradPositionXi (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 position on reference master surface.

Definition at line 2390 of file SimpleContact.hpp.

Constructor & Destructor Documentation

◆ OpCalculateGradPositionXi()

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

Definition at line 2392 of file SimpleContact.hpp.

2395  : ContactOp(field_name, UserDataOperator::OPROW, ContactOp::FACEMASTER),
2396  commonDataSimpleContact(common_data_contact) {}

Member Function Documentation

◆ doWork()

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

Definition at line 2954 of file SimpleContact.cpp.

2955  {
2957  const int nb_dofs = data.getFieldData().size();
2958  const int nb_integration_pts = getGaussPtsSlave().size2();
2959  auto &xi_grad_mat = *(commonDataSimpleContact->gradKsiPositionAtGaussPtsPtr);
2960  xi_grad_mat.resize(6, nb_integration_pts, false);
2961  if (type == MBVERTEX)
2962  xi_grad_mat.clear();
2963 
2966 
2967  if (nb_dofs) {
2968 
2969  auto t_grad_pos_xi = getFTensor2FromMat<3, 2>(xi_grad_mat);
2970 
2971  for (size_t gg = 0; gg != nb_integration_pts; ++gg) {
2972  auto t_data = data.getFTensor1FieldData<3>();
2973  auto t_diff_base = data.getFTensor1DiffN<2>(gg, 0);
2974  for (size_t bb = 0; bb != nb_dofs / 3; ++bb) {
2975  t_grad_pos_xi(i, I) += t_diff_base(I) * t_data(i);
2976  ++t_data;
2977  ++t_diff_base;
2978  }
2979  ++t_grad_pos_xi;
2980  }
2981  }
2982 
2984 }

Member Data Documentation

◆ commonDataSimpleContact

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

Definition at line 2401 of file SimpleContact.hpp.


The documentation for this struct was generated from the following files:
MoFEM::EntitiesFieldData::EntData::getFieldData
const VectorDouble & getFieldData() const
get dofs values
Definition: EntitiesFieldData.hpp:1254
I
constexpr IntegrationType I
Definition: operators_tests.cpp:31
SimpleContactProblem::OpCalculateGradPositionXi::commonDataSimpleContact
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
Definition: SimpleContact.hpp:2401
convert.type
type
Definition: convert.py:64
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
FTensor::Index< 'i', 3 >
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
MoFEM::EntitiesFieldData::EntData::getFTensor1FieldData
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1FieldData()
Return FTensor of rank 1, i.e. vector from filed data coefficients.
Definition: EntitiesFieldData.hpp:1288
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