v0.13.2
Loading...
Searching...
No Matches
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 };
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)

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}
constexpr double a
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
FTensor::Index< 'n', SPACE_DIM > n
FTensor::Index< 'm', SPACE_DIM > m
FTensor::Index< 'i', SPACE_DIM > i
const double c
speed of light (cm/ns)
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
int r
Definition: sdf.py:5
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
boost::shared_ptr< VectorDouble > normalVector
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact

The documentation for this struct was generated from the following files: