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

LHS-operator for the contact element (material configuration) 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 (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 Compute part of the left-hand side. 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)
 LHS-operator for the contact element (material configuration) More...
 
- 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)
 
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 for the contact element (material configuration)

Computes linearisation of normal vector from the expression for material traction contribution with respect to material coordinates on slave or master side.

Definition at line 3397 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

LHS-operator for the contact element (material configuration)

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 3441 of file SimpleContact.hpp.

3445  : OpContactMaterialVolOnSideLhs(field_name_1, field_name_2,
3446  common_data_contact, is_master) {
3447  sYmm = false; // This will make sure to loop over all entities
3448  };

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode SimpleContactProblem::OpContactMaterialVolOnSideLhs_dX_dX::iNtegrate ( EntitiesFieldData::EntData row_data,
EntitiesFieldData::EntData col_data 
)
virtual

Compute part of the left-hand side.

Computes the linearisation of the material component with respect to a variation of material coordinates \((\Delta{\mathbf{X}}^{(i)})\):

\[ \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 \, \mathbf{F}^{\intercal}\cdot \left[ \frac{\partial{\mathbf{X}}^{(i)}} {\partial\xi} \cdot \left(\frac{\partial\Delta {\mathbf{X}}^{(i)}}{\partial\eta}\times\delta{\mathbf{x}}^{(i)}\right) -\frac{\partial{\mathbf{X}}^{(i)}} {\partial\eta} \cdot \left(\frac{\partial\Delta {\mathbf{X}}^{(i)}}{\partial\xi}\times \delta{\mathbf{x}}^{(i)}\right)\right] \textrm{d}\xi\textrm{d}\eta \]

Here superscript \((i)\) is either equal to 1 or 2 denoting slave or master side coordinates and surfaces, respectively. Moreover, \(\lambda\) is the lagrange multiplier.

Reimplemented from SimpleContactProblem::OpContactMaterialVolOnSideLhs.

Definition at line 4038 of file SimpleContact.cpp.

4039  {
4040 
4042 
4048 
4049  auto get_tensor2 = [](MatrixDouble &m, const int r, const int c) {
4051  &m(r + 0, c + 0), &m(r + 0, c + 1), &m(r + 0, c + 2), &m(r + 1, c + 0),
4052  &m(r + 1, c + 1), &m(r + 1, c + 2), &m(r + 2, c + 0), &m(r + 2, c + 1),
4053  &m(r + 2, c + 2));
4054  };
4055 
4056  auto get_tensor_vec = [](VectorDouble &n) {
4057  return FTensor::Tensor1<double *, 3>(&n(0), &n(1), &n(2));
4058  };
4059 
4060  auto t_w = getFTensor0IntegrationWeight();
4061 
4062  auto t_h = getFTensor2FromMat<3, 3>(*commonDataSimpleContact->hMat);
4063  auto t_inv_H = getFTensor2FromMat<3, 3>(*commonDataSimpleContact->invHMat);
4064 
4065  auto lagrange_slave =
4066  getFTensor0FromVec(*commonDataSimpleContact->lagMultAtGaussPtsPtr);
4067 
4068  auto normal_at_gp = get_tensor_vec(*normalVector);
4069 
4070  const double area_m = aRea;
4071 
4072  for (int gg = 0; gg != nb_gauss_pts; ++gg) {
4073 
4074  const double a = -t_w * lagrange_slave * area_m;
4075  auto t_col_diff_base = col_data.getFTensor1DiffN<3>(gg, 0);
4076 
4077  int bbc = 0;
4078  for (; bbc != nb_base_fun_col; ++bbc) {
4079 
4080  FTensor::Tensor0<double *> t_row_base(&row_data.getN()(gg, 0));
4081 
4082  int bbr = 0;
4083  for (; bbr != nb_base_fun_row; ++bbr) {
4084 
4085  auto t_assemble = get_tensor2(matLhs, 3 * bbr, 3 * bbc);
4086 
4087  t_assemble(i, j) -= a * t_row_base * t_inv_H(l, j) *
4088  t_col_diff_base(m) * t_inv_H(m, i) * t_h(k, l) *
4089  normal_at_gp(k);
4090 
4091  ++t_row_base;
4092  }
4093  ++t_col_diff_base;
4094  }
4095  ++t_w;
4096  ++t_h;
4097  ++t_inv_H;
4098  ++lagrange_slave;
4099  }
4100 
4102 }

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
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21
SimpleContactProblem::OpContactMaterialVolOnSideLhs::matLhs
MatrixDouble matLhs
Definition: SimpleContact.hpp:598