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

Operator for the simple contact element. More...

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

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

Public Member Functions

 OpGetGapSlave (const string field_name, boost::shared_ptr< CommonDataSimpleContact > common_data_contact)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 Evaluates gap function at slave face gauss points. More...
 

Public Attributes

boost::shared_ptr< CommonDataSimpleContactcommonDataSimpleContact
 

Detailed Description

Operator for the simple contact element.

Calculates gap function at the gauss points on the slave triangle.

Definition at line 863 of file SimpleContact.hpp.

Constructor & Destructor Documentation

◆ OpGetGapSlave()

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

Definition at line 866 of file SimpleContact.hpp.

869  : ContactOp(field_name, UserDataOperator::OPROW, ContactOp::FACESLAVE),
870  commonDataSimpleContact(common_data_contact) {}

Member Function Documentation

◆ doWork()

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

Evaluates gap function at slave face gauss points.

Computes gap function at slave face gauss points:

\[ g_{\textrm{n}} = - \mathbf{n}(\mathbf{x}^{(1)}) \cdot \left( \mathbf{x}^{(1)} - \mathbf{x}^{(2)} \right) \]

where \(\mathbf{n}(\mathbf{x}^{(1)})\) is the outward normal vector at the slave triangle gauss points, \(\mathbf{x}^{(1)}\) and \(\mathbf{x}^{(2)}\) are the spatial coordinates of the overlapping gauss points located at the slave and master triangles, respectively.

Definition at line 686 of file SimpleContact.cpp.

688  {
690 
691  if (data.getFieldData().size() == 0)
693 
694  if (type != MBVERTEX)
696 
697  auto get_tensor_vec = [](VectorDouble &n) {
698  return FTensor::Tensor1<double *, 3>(&n(0), &n(1), &n(2));
699  };
700 
701  const int nb_gauss_pts = data.getN().size1();
702 
703  commonDataSimpleContact->gapPtr.get()->resize(nb_gauss_pts);
704  commonDataSimpleContact->gapPtr.get()->clear();
705 
707 
708  auto t_position_master_gp = getFTensor1FromMat<3>(
709  *commonDataSimpleContact->positionAtGaussPtsMasterPtr);
710  auto t_position_slave_gp = getFTensor1FromMat<3>(
711  *commonDataSimpleContact->positionAtGaussPtsSlavePtr);
712 
713  auto t_gap_ptr = getFTensor0FromVec(*commonDataSimpleContact->gapPtr);
714 
715  auto t_normal_at_gp =
716  get_tensor_vec(*(commonDataSimpleContact->normalVectorSlavePtr));
717 
718  for (int gg = 0; gg != nb_gauss_pts; ++gg) {
719  t_gap_ptr -=
720  t_normal_at_gp(i) * (t_position_slave_gp(i) - t_position_master_gp(i));
721  ++t_position_slave_gp;
722  ++t_position_master_gp;
723  ++t_gap_ptr;
724  } // for gauss points
725 
727 }

Member Data Documentation

◆ commonDataSimpleContact

boost::shared_ptr<CommonDataSimpleContact> SimpleContactProblem::OpGetGapSlave::commonDataSimpleContact

Definition at line 865 of file SimpleContact.hpp.


The documentation for this struct was generated from the following files:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
MoFEM::EntitiesFieldData::EntData::getFieldData
const VectorDouble & getFieldData() const
get dofs values
Definition: EntitiesFieldData.hpp:1241
convert.type
type
Definition: convert.py:64
MoFEM::getFTensor0FromVec
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
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 >
convert.n
n
Definition: convert.py:82
SimpleContactProblem::ContactOp
ContactPrismElementForcesAndSourcesCore::UserDataOperator ContactOp
Definition: SimpleContact.hpp:30
MoFEM::EntitiesFieldData::EntData::getN
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
Definition: EntitiesFieldData.hpp:1305
SimpleContactProblem::OpGetGapSlave::commonDataSimpleContact
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
Definition: SimpleContact.hpp:865
MoFEM::Types::VectorDouble
UBlasVector< double > VectorDouble
Definition: Types.hpp:68
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
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPROW
@ OPROW
operator doWork function is executed on FE rows
Definition: ForcesAndSourcesCore.hpp:567