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

Computes, for material 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::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

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

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) {}

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 }

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:
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
SimpleContactProblem::OpGetNormalMasterALE::commonDataSimpleContact
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
Definition: SimpleContact.hpp:2691
MoFEM::EntitiesFieldData::EntData::getFieldData
const VectorDouble & getFieldData() const
get dofs values
Definition: EntitiesFieldData.hpp:1241
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 coeffinects.
Definition: EntitiesFieldData.hpp:1275
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:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346