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

Computes, for material 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::OpGetNormalSlaveALE:
[legend]
Collaboration diagram for SimpleContactProblem::OpGetNormalSlaveALE:
[legend]

Public Member Functions

 OpGetNormalSlaveALE (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 material base coordinates. More...
 

Public Attributes

boost::shared_ptr< CommonDataSimpleContactcommonDataSimpleContact
 

Detailed Description

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

Definition at line 2645 of file SimpleContact.hpp.

Constructor & Destructor Documentation

◆ OpGetNormalSlaveALE()

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

Definition at line 2648 of file SimpleContact.hpp.

2651  : ContactOp(field_name, UserDataOperator::OPCOL, ContactOp::FACESLAVE),
2652  commonDataSimpleContact(common_data_contact) {}

Member Function Documentation

◆ doWork()

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

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

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

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

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

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

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

Definition at line 3337 of file SimpleContact.cpp.

3338  {
3340 
3341  if (data.getFieldData().size() == 0)
3343 
3344  if (type != MBVERTEX)
3346 
3350 
3351  commonDataSimpleContact->normalVectorSlavePtr->resize(3, false);
3352 
3353  auto get_tensor_vec = [](VectorDouble &n) {
3354  return FTensor::Tensor1<double *, 3>(&n(0), &n(1), &n(2));
3355  };
3356 
3357  auto normal_original_slave =
3358  get_tensor_vec(*commonDataSimpleContact->normalVectorSlavePtr);
3359 
3360  commonDataSimpleContact->tangentOneVectorSlavePtr->resize(3, false);
3361  commonDataSimpleContact->tangentOneVectorSlavePtr->clear();
3362 
3363  commonDataSimpleContact->tangentTwoVectorSlavePtr->resize(3, false);
3364  commonDataSimpleContact->tangentTwoVectorSlavePtr->clear();
3365 
3366  auto tangent_0_slave =
3367  get_tensor_vec(*commonDataSimpleContact->tangentOneVectorSlavePtr);
3368  auto tangent_1_slave =
3369  get_tensor_vec(*commonDataSimpleContact->tangentTwoVectorSlavePtr);
3370 
3371  auto t_N = data.getFTensor1DiffN<2>(0, 0);
3372  auto t_dof = data.getFTensor1FieldData<3>();
3373 
3374  for (unsigned int dd = 0; dd != 3; ++dd) {
3375  tangent_0_slave(i) += t_dof(i) * t_N(0);
3376  tangent_1_slave(i) += t_dof(i) * t_N(1);
3377  ++t_dof;
3378  ++t_N;
3379  }
3380 
3381  normal_original_slave(i) =
3382  FTensor::levi_civita(i, j, k) * tangent_0_slave(j) * tangent_1_slave(k);
3383 
3384  const double normal_length =
3385  sqrt(normal_original_slave(i) * normal_original_slave(i));
3386  normal_original_slave(i) = normal_original_slave(i) / normal_length;
3387 
3388  commonDataSimpleContact->areaSlave = 0.5 * normal_length;
3389 
3391 }

Member Data Documentation

◆ commonDataSimpleContact

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

Definition at line 2647 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
FTensor::levi_civita
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
Definition: Levi_Civita.hpp:617
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
FTensor::dd
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
SimpleContactProblem::ContactOp
ContactPrismElementForcesAndSourcesCore::UserDataOperator ContactOp
Definition: SimpleContact.hpp:30
MoFEM::EntitiesFieldData::EntData::getFTensor1DiffN
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
Definition: EntitiesFieldData.cpp:526
MoFEM::EntitiesFieldData::EntData::getFTensor1FieldData
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1FieldData()
Return FTensor of rank 1, i.e. vector from filed data coefficients.
Definition: EntitiesFieldData.hpp:1288
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
MoFEM::Types::VectorDouble
UBlasVector< double > VectorDouble
Definition: Types.hpp:68
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
SimpleContactProblem::OpGetNormalSlaveALE::commonDataSimpleContact
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
Definition: SimpleContact.hpp:2647
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359