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

LHS-operator (material configuration) on the side volume of either master or slave side. More...

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

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

Public Member Functions

MoFEMErrorCode iNtegrate (EntData &row_data, EntData &col_data)
 Integrates over a face contribution from a side volume. More...
 
 OpContactMaterialVolOnSideLhs_dX_dx (const string field_name_1, const string field_name_2, boost::shared_ptr< CommonDataSimpleContact > common_data_contact, const bool is_master)
 
- Public Member Functions inherited from SimpleContactProblem::OpContactMaterialVolOnSideLhs
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 
virtual MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 
MoFEMErrorCode aSsemble (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 
 OpContactMaterialVolOnSideLhs (const string field_name_1, const string field_name_2, boost::shared_ptr< CommonDataSimpleContact > common_data_contact, const bool is_master)
 LHS-operator for the contact element (material configuration) More...
 

Additional Inherited Members

- Public Attributes inherited from SimpleContactProblem::OpContactMaterialVolOnSideLhs
MatrixDouble matLhs
 
boost::shared_ptr< CommonDataSimpleContactcommonDataSimpleContact
 
VectorInt rowIndices
 
VectorInt colIndices
 
int row_nb_dofs
 
int col_nb_dofs
 
int nb_gauss_pts
 
int nb_base_fun_row
 
int nb_base_fun_col
 
boost::shared_ptr< VectorDouble > tangentOne
 
boost::shared_ptr< VectorDouble > tangentTwo
 
boost::shared_ptr< VectorDouble > normalVector
 
double aRea
 

Detailed Description

LHS-operator (material configuration) on the side volume of either master or slave side.

Computes the linearisation of the material component with respect to a variation of material coordinates on the side volume for either master or slave side.

Definition at line 3341 of file SimpleContact.hpp.

Constructor & Destructor Documentation

◆ OpContactMaterialVolOnSideLhs_dX_dx()

SimpleContactProblem::OpContactMaterialVolOnSideLhs_dX_dx::OpContactMaterialVolOnSideLhs_dX_dx ( const string  field_name_1,
const string  field_name_2,
boost::shared_ptr< CommonDataSimpleContact common_data_contact,
const bool  is_master 
)
inline
Parameters
field_name_1String of field name for spatial positions for rows
field_name_2String of field name for spatial positions for columns
common_data_contactPointer to the common data for simple contact element
is_masterBool parameter to distinguish between master and slave sides

Definition at line 3379 of file SimpleContact.hpp.

3383  : OpContactMaterialVolOnSideLhs(field_name_1, field_name_2,
3384  common_data_contact, is_master) {
3385  sYmm = false; // This will make sure to loop over all entities
3386  };

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode SimpleContactProblem::OpContactMaterialVolOnSideLhs_dX_dx::iNtegrate ( EntData row_data,
EntData col_data 
)

Integrates over a face contribution from a side volume.

Computes linearisation of the material component with respect to a variation of material coordinates:

\[ \textrm{D} \delta W^\text{(i)}_{\rm{material}}({\mathbf{x}}^{(i)}, {\mathbf{X}}^{(i)}, \delta{\mathbf{x}}^{(i)}) [\Delta{\mathbf{X}}^{(i)}] = \int\limits_{{\mathcal{T}}^{(i)}_{\xi}} \lambda \left\{\left[ {\mathbf{h}({\mathbf{x}}^{(i)})}\,{\mathbf{H}^{-1}({\mathbf{X}}^{(i)})}\,\frac{\partial\Delta\mathbf{X}} {\partial{\boldsymbol{\chi}}^{(i)}}\,\mathbf{H}^{-1}({\mathbf{X}}^{(i)}) \right]^{\intercal}\cdot\left(\frac{\partial{\mathbf{X}}^{(i)}}{\partial\xi} \times\frac{\partial{\mathbf{X}}^{(i)}}{\partial\eta}\right)\right\} \cdot \delta{\mathbf{X}}^{(i)}\, \textrm{d}\xi\textrm{d}\eta \]

where \(i\) denoted either master or slave side.

Definition at line 3974 of file SimpleContact.cpp.

3975  {
3976 
3978 
3982 
3983  auto get_tensor2 = [](MatrixDouble &m, const int r, const int c) {
3985  &m(r + 0, c + 0), &m(r + 0, c + 1), &m(r + 0, c + 2), &m(r + 1, c + 0),
3986  &m(r + 1, c + 1), &m(r + 1, c + 2), &m(r + 2, c + 0), &m(r + 2, c + 1),
3987  &m(r + 2, c + 2));
3988  };
3989 
3990  auto get_tensor_vec = [](VectorDouble &n) {
3991  return FTensor::Tensor1<double *, 3>(&n(0), &n(1), &n(2));
3992  };
3993 
3994  auto t_w = getFTensor0IntegrationWeight();
3995 
3996  auto t_inv_H = getFTensor2FromMat<3, 3>(*commonDataSimpleContact->invHMat);
3997 
3998  auto lagrange_slave =
3999  getFTensor0FromVec(*commonDataSimpleContact->lagMultAtGaussPtsPtr);
4000 
4001  auto normal_at_gp = get_tensor_vec(*normalVector);
4002 
4003  const double area_m = aRea;
4004 
4005  for (int gg = 0; gg != nb_gauss_pts; ++gg) {
4006 
4007  double a = -t_w * lagrange_slave * area_m;
4008 
4009  auto t_col_diff_base = col_data.getFTensor1DiffN<3>(gg, 0);
4010 
4011  int bbc = 0;
4012  for (; bbc != nb_base_fun_col; ++bbc) {
4013 
4014  FTensor::Tensor0<double *> t_row_base(&row_data.getN()(gg, 0));
4015 
4016  int bbr = 0;
4017  for (; bbr != nb_base_fun_row; ++bbr) {
4018 
4019  auto t_assemble = get_tensor2(matLhs, 3 * bbr, 3 * bbc);
4020  // TODO: handle hoGeometry
4021 
4022  t_assemble(i, j) += a * t_row_base * t_inv_H(k, i) *
4023  t_col_diff_base(k) * normal_at_gp(j);
4024 
4025  ++t_row_base;
4026  }
4027  ++t_col_diff_base;
4028  }
4029  ++t_w;
4030  ++t_inv_H;
4031  ++lagrange_slave;
4032  }
4033 
4035 }

The documentation for this struct was generated from the following files:
SimpleContactProblem::OpContactMaterialVolOnSideLhs::nb_gauss_pts
int nb_gauss_pts
Definition: SimpleContact.hpp:607
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
MoFEM::Types::MatrixDouble
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
SimpleContactProblem::OpContactMaterialVolOnSideLhs::commonDataSimpleContact
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
Definition: SimpleContact.hpp:600
sdf.r
int r
Definition: sdf.py:8
FTensor::Tensor2< double *, 3, 3 >
SimpleContactProblem::OpContactMaterialVolOnSideLhs::normalVector
boost::shared_ptr< VectorDouble > normalVector
Definition: SimpleContact.hpp:615
c
const double c
speed of light (cm/ns)
Definition: initial_diffusion.cpp:39
a
constexpr double a
Definition: approx_sphere.cpp:30
MoFEM::getFTensor0FromVec
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
SimpleContactProblem::OpContactMaterialVolOnSideLhs::OpContactMaterialVolOnSideLhs
OpContactMaterialVolOnSideLhs(const string field_name_1, const string field_name_2, boost::shared_ptr< CommonDataSimpleContact > common_data_contact, const bool is_master)
LHS-operator for the contact element (material configuration)
Definition: SimpleContact.hpp:644
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
SimpleContactProblem::OpContactMaterialVolOnSideLhs::nb_base_fun_row
int nb_base_fun_row
Definition: SimpleContact.hpp:609
FTensor::Index< 'i', 3 >
convert.n
n
Definition: convert.py:82
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
SimpleContactProblem::OpContactMaterialVolOnSideLhs::aRea
double aRea
Definition: SimpleContact.hpp:616
FTensor::Tensor0
Definition: Tensor0.hpp:16
MoFEM::EntitiesFieldData::EntData::getN
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
Definition: EntitiesFieldData.hpp:1318
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
MoFEM::Types::VectorDouble
UBlasVector< double > VectorDouble
Definition: Types.hpp:68
m
FTensor::Index< 'm', 3 > m
Definition: shallow_wave.cpp:80
SimpleContactProblem::OpContactMaterialVolOnSideLhs::nb_base_fun_col
int nb_base_fun_col
Definition: SimpleContact.hpp:610
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
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
SimpleContactProblem::OpContactMaterialVolOnSideLhs::matLhs
MatrixDouble matLhs
Definition: SimpleContact.hpp:598