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

Computes, for reference configuration, normal to master face that is common to all gauss points. More...

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

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

Public Member Functions

 OpGetNormalMaster (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 reference base coordinates. More...
 

Public Attributes

boost::shared_ptr< CommonDataSimpleContactcommonDataSimpleContact
 

Detailed Description

Computes, for reference configuration, normal to master face that is common to all gauss points.

Definition at line 707 of file SimpleContact.hpp.

Constructor & Destructor Documentation

◆ OpGetNormalMaster()

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

Definition at line 710 of file SimpleContact.hpp.

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

Member Function Documentation

◆ doWork()

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

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

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

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

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

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

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

Definition at line 420 of file SimpleContact.cpp.

422 {
424
425 if (data.getFieldData().size() == 0)
427
428 if (type != MBVERTEX)
430
432
433 auto get_tensor_vec = [](VectorDouble &n) {
434 return FTensor::Tensor1<double *, 3>(&n(0), &n(1), &n(2));
435 };
436
437 const double *normal_master_ptr = &getNormalMaster()[0];
438 commonDataSimpleContact->normalVectorMasterPtr.get()->resize(3);
439 commonDataSimpleContact->normalVectorMasterPtr.get()->clear();
440
441 auto t_normal =
442 get_tensor_vec(commonDataSimpleContact->normalVectorMasterPtr.get()[0]);
443 for (int ii = 0; ii != 3; ++ii)
444 t_normal(ii) = normal_master_ptr[ii];
445
446 const double normal_length = sqrt(t_normal(i) * t_normal(i));
447 t_normal(i) = t_normal(i) / normal_length;
448 commonDataSimpleContact->areaMaster = 0.5 * normal_length;
449
451}
#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
const VectorDouble & getFieldData() const
get dofs values

Member Data Documentation

◆ commonDataSimpleContact

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

Definition at line 709 of file SimpleContact.hpp.


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