v0.13.2
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
OpContactTools::OpConstrainBoundaryLhs_dTraction Struct Reference

#include <users_modules/multifield_plasticity/src/ContactOperators.hpp>

Inheritance diagram for OpContactTools::OpConstrainBoundaryLhs_dTraction:
[legend]
Collaboration diagram for OpContactTools::OpConstrainBoundaryLhs_dTraction:
[legend]

Public Member Functions

 OpConstrainBoundaryLhs_dTraction (const std::string row_field_name, const std::string col_field_name, boost::shared_ptr< CommonData > common_data_ptr)
 
MoFEMErrorCode iNtegrate (EntData &row_data, EntData &col_data)
 

Private Attributes

boost::shared_ptr< CommonDatacommonDataPtr
 

Detailed Description

Definition at line 63 of file ContactOperators.hpp.

Constructor & Destructor Documentation

◆ OpConstrainBoundaryLhs_dTraction()

OpContactTools::OpConstrainBoundaryLhs_dTraction::OpConstrainBoundaryLhs_dTraction ( const std::string  row_field_name,
const std::string  col_field_name,
boost::shared_ptr< CommonData common_data_ptr 
)

Definition at line 416 of file ContactOperators.hpp.

419 : BoundaryEleOpAssembly(row_field_name, col_field_name, OPROWCOL),
420 commonDataPtr(common_data_ptr) {
421 sYmm = false;
422}

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode OpContactTools::OpConstrainBoundaryLhs_dTraction::iNtegrate ( EntData row_data,
EntData col_data 
)

Definition at line 423 of file ContactOperators.hpp.

424 {
426
427 const size_t nb_gauss_pts = getGaussPts().size2();
428 const size_t row_nb_dofs = row_data.getIndices().size();
429 const size_t col_nb_dofs = col_data.getIndices().size();
430
431 if (row_nb_dofs && col_nb_dofs) {
432
433 auto t_normal = getFTensor1Normal();
434 const double ls = sqrt(t_normal(i) * t_normal(i));
435 t_normal(i) /= ls;
436
437 auto t_disp = getFTensor1FromMat<3>(*(commonDataPtr->mDispPtr));
438 auto t_traction =
439 getFTensor1FromMat<3>(*(commonDataPtr->contactTractionPtr));
440 auto t_coords = getFTensor1CoordsAtGaussPts();
441
442 auto t_w = getFTensor0IntegrationWeight();
443 auto t_row_base = row_data.getFTensor1N<3>();
444 size_t nb_face_functions = row_data.getN().size2() / 3;
445
446 auto t_contact_normal =
447 getFTensor1FromMat<3>(*(commonDataPtr->contactNormalPtr));
448 auto t_gap = getFTensor0FromVec(*(commonDataPtr->contactGapPtr));
449
450 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
451
452 const double alpha = t_w * getMeasure();
453
454 if (getNormalsAtGaussPts().size1() == nb_gauss_pts) {
455 VectorDouble n = getNormalsAtGaussPts(gg);
456 auto t_n = getFTensor1FromPtr<3>(&*n.data().begin());
457 t_normal(i) = t_n(i) / sqrt(t_n(j) * t_n(j));
458 }
459
460 // auto t_contact_normal = normal(t_coords, t_disp);
461 Tensor2<double, 3, 3> t_P;
462 t_P(i, j) = t_contact_normal(i) * t_contact_normal(j);
463
464 Tensor2<double, 3, 3> t_Q;
465 t_Q(i, j) = kronecker_delta(i, j) - t_P(i, j);
466
467 const double diff_traction = diff_constraints_dtraction(
468 t_gap, normal_traction(t_traction, t_contact_normal));
469
470 size_t rr = 0;
471 for (; rr != row_nb_dofs / 3; ++rr) {
472 auto t_mat = getFTensor2FromArray<3, 3, 3>(locMat, 3 * rr);
473 const double row_base = t_row_base(i) * t_normal(i);
474
475 auto t_col_base = col_data.getFTensor1N<3>(gg, 0);
476
477 for (size_t cc = 0; cc != col_nb_dofs / 3; ++cc) {
478 const double col_base = t_col_base(i) * t_normal(i);
479 const double beta = alpha * row_base * col_base;
480
481 t_mat(i, j) += (beta * diff_traction) * t_P(i, j);
482 t_mat(i, j) += beta * (*cache).cn_cont * t_Q(i, j);
483
484 ++t_col_base;
485 ++t_mat;
486 }
487
488 ++t_row_base;
489 }
490 for (; rr < nb_face_functions; ++rr)
491 ++t_row_base;
492
493 ++t_contact_normal;
494 ++t_gap;
495 ++t_disp;
496 ++t_traction;
497 ++t_coords;
498 ++t_w;
499 }
500
501 }
502
504}
#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< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
Tensor2_Expr< Kronecker_Delta< T >, T, Dim0, Dim1, i, j > kronecker_delta(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
Rank 2.
UBlasVector< double > VectorDouble
Definition: Types.hpp:68
double normal_traction(Tensor1< T1, 3 > &t_traction, Tensor1< T2, 3 > &t_normal)
double diff_constraints_dtraction(double g, double &&t)
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1N(FieldApproximationBase base)
Get base functions for Hdiv/Hcurl spaces.
const VectorInt & getIndices() const
Get global indices of dofs on entity.

Member Data Documentation

◆ commonDataPtr

boost::shared_ptr<CommonData> OpContactTools::OpConstrainBoundaryLhs_dTraction::commonDataPtr
private

Definition at line 71 of file ContactOperators.hpp.


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