v0.13.2
Loading...
Searching...
No Matches
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)
 
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 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 };
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 ( 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}
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< 'l', 3 > l
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: