v0.13.2
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
SimpleContactProblem::OpGetNormalMasterALE Struct Reference

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

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

Public Member Functions

 OpGetNormalMasterALE (const string field_name, boost::shared_ptr< CommonDataSimpleContact > common_data_contact)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 Evaluates unit normal vector to the master surface vector based on material base coordinates. More...
 

Public Attributes

boost::shared_ptr< CommonDataSimpleContactcommonDataSimpleContact
 

Detailed Description

Definition at line 2689 of file SimpleContact.hpp.

Constructor & Destructor Documentation

◆ OpGetNormalMasterALE()

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

Definition at line 2692 of file SimpleContact.hpp.

2695 : ContactOp(field_name, UserDataOperator::OPCOL, ContactOp::FACEMASTER),
2696 commonDataSimpleContact(common_data_contact) {}
constexpr auto field_name
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
ContactPrismElementForcesAndSourcesCore::UserDataOperator ContactOp

Member Function Documentation

◆ doWork()

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

Evaluates unit normal vector to the master surface vector based on material base coordinates.

Computes normal vector based on material base coordinates based on mesh (moab vertices) coordinates:

\[ {\mathbf N}^{(2)}({\mathbf X}(\xi, \eta)) = \frac{\partial\mathbf{X}(\xi, \eta)}{\partial\xi}\times\frac{\partial \mathbf{X}(\xi, \eta)} {\partial\eta} \]

where \({\mathbf X}(\xi, \eta)\) is the vector of material coordinates at the gauss point on master surface with parent coordinates \(\xi\) and \(\eta\) evaluated according to

\[ {\mathbf X}(\xi, \eta) = \sum\limits^{3}_{i = 1} N_i(\xi, \eta){\bar{\mathbf X}}_i \]

where \( N_i \) is the shape function corresponding to the \( i-{\rm{th}}\) degree of freedom in the material configuration \({{\mathbf {\tilde X} }}_i\) corresponding to the 3 nodes of the triangular master face.

Definition at line 3394 of file SimpleContact.cpp.

3395 {
3397
3398 if (data.getFieldData().size() == 0)
3400
3401 if (type != MBVERTEX)
3403
3407
3408 commonDataSimpleContact->normalVectorMasterPtr->resize(3, false);
3409
3410 auto get_tensor_vec = [](VectorDouble &n) {
3411 return FTensor::Tensor1<double *, 3>(&n(0), &n(1), &n(2));
3412 };
3413
3414 auto normal_original_master =
3415 get_tensor_vec(*commonDataSimpleContact->normalVectorMasterPtr);
3416
3417 commonDataSimpleContact->tangentOneVectorMasterPtr->resize(3, false);
3418 commonDataSimpleContact->tangentOneVectorMasterPtr->clear();
3419
3420 commonDataSimpleContact->tangentTwoVectorMasterPtr->resize(3, false);
3421 commonDataSimpleContact->tangentTwoVectorMasterPtr->clear();
3422
3423 auto tangent_0_master =
3424 get_tensor_vec(*commonDataSimpleContact->tangentOneVectorMasterPtr);
3425 auto tangent_1_master =
3426 get_tensor_vec(*commonDataSimpleContact->tangentTwoVectorMasterPtr);
3427
3428 auto t_N = data.getFTensor1DiffN<2>(0, 0);
3429 auto t_dof = data.getFTensor1FieldData<3>();
3430
3431 for (unsigned int dd = 0; dd != 3; ++dd) {
3432 tangent_0_master(i) += t_dof(i) * t_N(0);
3433 tangent_1_master(i) += t_dof(i) * t_N(1);
3434 ++t_dof;
3435 ++t_N;
3436 }
3437
3438 normal_original_master(i) =
3439 FTensor::levi_civita(i, j, k) * tangent_0_master(j) * tangent_1_master(k);
3440
3441 const double normal_length =
3442 sqrt(normal_original_master(i) * normal_original_master(i));
3443 normal_original_master(i) = normal_original_master(i) / normal_length;
3444
3445 commonDataSimpleContact->areaMaster = 0.5 * normal_length;
3446
3448}
#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
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: ddTensor0.hpp:33
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::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1FieldData()
Return FTensor of rank 1, i.e. vector from filed data coeffinects.

Member Data Documentation

◆ commonDataSimpleContact

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

Definition at line 2691 of file SimpleContact.hpp.


The documentation for this struct was generated from the following files: