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

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

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

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

Public Member Functions

 OpGetNormalSlave (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 slave surface vector based on reference base coordinates. More...
 

Public Attributes

boost::shared_ptr< CommonDataSimpleContactcommonDataSimpleContact
 

Detailed Description

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

Definition at line 664 of file SimpleContact.hpp.

Constructor & Destructor Documentation

◆ OpGetNormalSlave()

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

Definition at line 667 of file SimpleContact.hpp.

670  : ContactOp(field_name, UserDataOperator::OPCOL, ContactOp::FACESLAVE),
671  commonDataSimpleContact(common_data_contact) {}

Member Function Documentation

◆ doWork()

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

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

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

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

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

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

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

Definition at line 384 of file SimpleContact.cpp.

386  {
388 
389  if (data.getFieldData().size() == 0)
391 
392  if (type != MBVERTEX)
394 
396 
397  auto get_tensor_vec = [](VectorDouble &n) {
398  return FTensor::Tensor1<double *, 3>(&n(0), &n(1), &n(2));
399  };
400 
401  const double *normal_slave_ptr = &getNormalSlave()[0];
402 
403  commonDataSimpleContact->normalVectorSlavePtr.get()->resize(3);
404  commonDataSimpleContact->normalVectorSlavePtr.get()->clear();
405 
406  auto t_normal =
407  get_tensor_vec(*(commonDataSimpleContact->normalVectorSlavePtr));
408 
409  for (int ii = 0; ii != 3; ++ii)
410  t_normal(ii) = normal_slave_ptr[ii];
411 
412  const double normal_length = sqrt(t_normal(i) * t_normal(i));
413  t_normal(i) = t_normal(i) / normal_length;
414 
415  commonDataSimpleContact->areaSlave = 0.5 * normal_length;
416 
418 }

Member Data Documentation

◆ commonDataSimpleContact

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

Definition at line 666 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::ForcesAndSourcesCore::UserDataOperator::OPCOL
@ OPCOL
operator doWork function is executed on FE columns
Definition: ForcesAndSourcesCore.hpp:568
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::OpGetNormalSlave::commonDataSimpleContact
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
Definition: SimpleContact.hpp:666
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:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346