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

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}
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#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
FTensor::Index< 'n', SPACE_DIM > n
FTensor::Index< 'i', SPACE_DIM > i
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorDouble & getFieldData() const
get dofs values

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: