v0.14.0
Public Member Functions | List of all members
SimpleContactProblem::OpContactMaterialMasterOnFaceLhs_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::OpContactMaterialMasterOnFaceLhs_dX_dX:
[legend]
Collaboration diagram for SimpleContactProblem::OpContactMaterialMasterOnFaceLhs_dX_dX:
[legend]

Public Member Functions

MoFEMErrorCode iNtegrate (EntData &row_data, EntData &col_data)
 Compute part of the left-hand side. More...
 
 OpContactMaterialMasterOnFaceLhs_dX_dX (const string mesh_nodes_field_row, const string mesh_nodes_field_col, boost::shared_ptr< CommonDataSimpleContact > common_data_contact, const int row_rank, const int col_rank)
 
- Public Member Functions inherited from SimpleContactProblem::OpContactMaterialLhs
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 
MoFEMErrorCode aSsemble (EntData &row_data, EntData &col_data)
 
 OpContactMaterialLhs (const string field_name_1, const string field_name_2, boost::shared_ptr< CommonDataSimpleContact > common_data_contact, const ContactOp::FaceType face_type, const int rank_row, const int rank_col, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnContactPrismSide > side_fe=NULL, const string side_fe_name="")
 

Additional Inherited Members

- Public Attributes inherited from SimpleContactProblem::OpContactMaterialLhs
boost::shared_ptr< CommonDataSimpleContactcommonDataSimpleContact
 
boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnContactPrismSide > sideFe
 
string sideFeName
 
MatrixDouble matLhs
 
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
 
int rankRow
 
int rankCol
 

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 master side.

Definition at line 2739 of file SimpleContact.hpp.

Constructor & Destructor Documentation

◆ OpContactMaterialMasterOnFaceLhs_dX_dX()

SimpleContactProblem::OpContactMaterialMasterOnFaceLhs_dX_dX::OpContactMaterialMasterOnFaceLhs_dX_dX ( const string  mesh_nodes_field_row,
const string  mesh_nodes_field_col,
boost::shared_ptr< CommonDataSimpleContact common_data_contact,
const int  row_rank,
const int  col_rank 
)
inline
Parameters
mesh_nodes_field_rowString of field name for material positions for rows
mesh_nodes_field_colString of field name for material positions for columns
common_data_contactPointer to the common data for simple contact element
row_rankParameter setting the dimension of the associated field for rows (in this case is 3)
col_rankParameter setting the dimension of the associated field for cols (in this case is 3)

Definition at line 2782 of file SimpleContact.hpp.

2786  : OpContactMaterialLhs(mesh_nodes_field_row, mesh_nodes_field_col,
2787  common_data_contact, ContactOp::FACEMASTERMASTER,
2788  row_rank, col_rank) {
2789  sYmm = false; // This will make sure to loop over all intities (e.g.
2790  // for order=2 it will make doWork to loop 16 time)
2791  }

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode SimpleContactProblem::OpContactMaterialMasterOnFaceLhs_dX_dX::iNtegrate ( EntData row_data,
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}}^{(2)})\):

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

Here superscript \((2)\) denotes master side coordinates and surfaces. Moreover, \(\lambda\) is the lagrange multiplier.

Reimplemented from SimpleContactProblem::OpContactMaterialLhs.

Definition at line 4105 of file SimpleContact.cpp.

4106  {
4107 
4109 
4113 
4114  auto get_tensor2 = [](MatrixDouble &m, const int r, const int c) {
4116  &m(r + 0, c + 0), &m(r + 0, c + 1), &m(r + 0, c + 2), &m(r + 1, c + 0),
4117  &m(r + 1, c + 1), &m(r + 1, c + 2), &m(r + 2, c + 0), &m(r + 2, c + 1),
4118  &m(r + 2, c + 2));
4119  };
4120 
4121  auto get_tensor_vec = [](VectorDouble &n) {
4122  return FTensor::Tensor1<double *, 3>(&n(0), &n(1), &n(2));
4123  };
4124 
4125  auto make_vec_der = [&](auto t_N, auto t_1, auto t_2) {
4127  t_n(i, j) = 0;
4128  t_n(i, j) += FTensor::levi_civita(i, j, k) * t_2(k) * t_N(0);
4129  t_n(i, j) -= FTensor::levi_civita(i, j, k) * t_1(k) * t_N(1);
4130  return t_n;
4131  };
4132 
4133  auto t_F = getFTensor2FromMat<3, 3>(*commonDataSimpleContact->FMat);
4134 
4135  auto t_w = getFTensor0IntegrationWeightMaster();
4136  auto lagrange_slave =
4137  getFTensor0FromVec(*commonDataSimpleContact->lagMultAtGaussPtsPtr);
4138  auto t_1 =
4139  get_tensor_vec(*commonDataSimpleContact->tangentOneVectorMasterPtr);
4140  auto t_2 =
4141  get_tensor_vec(*commonDataSimpleContact->tangentTwoVectorMasterPtr);
4142  for (int gg = 0; gg != nb_gauss_pts; ++gg) {
4143 
4144  auto t_N = col_data.getFTensor1DiffN<2>(gg, 0);
4145  const double val = 0.5 * t_w * lagrange_slave;
4146 
4147  int bbc = 0;
4148  for (; bbc != nb_base_fun_col; ++bbc) {
4149 
4150  FTensor::Tensor0<double *> t_base(&row_data.getN()(gg, 0));
4151 
4152  int bbr = 0;
4153  for (; bbr != nb_base_fun_row; ++bbr) {
4154 
4155  auto t_assemble = get_tensor2(matLhs, 3 * bbr, 3 * bbc);
4156  // TODO: handle hoGeometry
4157  auto t_d_n = make_vec_der(t_N, t_1, t_2);
4158  t_assemble(i, k) -= val * t_base * t_F(j, i) * t_d_n(j, k);
4159 
4160  ++t_base;
4161  }
4162  ++t_N;
4163  }
4164  ++t_F;
4165  ++t_w;
4166  ++lagrange_slave;
4167  }
4168 
4170 }

The documentation for this struct was generated from the following files:
SimpleContactProblem::OpContactMaterialLhs::OpContactMaterialLhs
OpContactMaterialLhs(const string field_name_1, const string field_name_2, boost::shared_ptr< CommonDataSimpleContact > common_data_contact, const ContactOp::FaceType face_type, const int rank_row, const int rank_col, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnContactPrismSide > side_fe=NULL, const string side_fe_name="")
Definition: SimpleContact.hpp:526
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
SimpleContactProblem::OpContactMaterialLhs::nb_base_fun_col
int nb_base_fun_col
Definition: SimpleContact.hpp:510
MoFEM::Types::MatrixDouble
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
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
sdf.r
int r
Definition: sdf.py:8
FTensor::Tensor2< double *, 3, 3 >
c
const double c
speed of light (cm/ns)
Definition: initial_diffusion.cpp:39
MoFEM::getFTensor0FromVec
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
SimpleContactProblem::OpContactMaterialLhs::nb_base_fun_row
int nb_base_fun_row
Definition: SimpleContact.hpp:509
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::Index< 'i', 3 >
convert.n
n
Definition: convert.py:82
SimpleContactProblem::OpContactMaterialLhs::commonDataSimpleContact
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
Definition: SimpleContact.hpp:496
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
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
SimpleContactProblem::OpContactMaterialLhs::matLhs
MatrixDouble matLhs
Definition: SimpleContact.hpp:501
MoFEM::Types::VectorDouble
UBlasVector< double > VectorDouble
Definition: Types.hpp:68
m
FTensor::Index< 'm', 3 > m
Definition: shallow_wave.cpp:80
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
SimpleContactProblem::OpContactMaterialLhs::nb_gauss_pts
int nb_gauss_pts
Definition: SimpleContact.hpp:507
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359