v0.14.0
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) {}

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 }

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:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
MoFEM::EntitiesFieldData::EntData::getFieldData
const VectorDouble & getFieldData() const
get dofs values
Definition: EntitiesFieldData.hpp:1254
convert.type
type
Definition: convert.py:64
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPCOL
@ OPCOL
operator doWork function is executed on FE columns
Definition: ForcesAndSourcesCore.hpp:568
SimpleContactProblem::OpGetNormalMaster::commonDataSimpleContact
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
Definition: SimpleContact.hpp:709
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::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:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359