v0.16.3
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ContactOps::OpAssembleTotalContactTractionImpl< DIM, GAUSS, BoundaryEleOp > Struct Template Reference

#include "tutorials/adv-1_contact/src/ContactOps.hpp"

Inheritance diagram for ContactOps::OpAssembleTotalContactTractionImpl< DIM, GAUSS, BoundaryEleOp >:
[legend]
Collaboration diagram for ContactOps::OpAssembleTotalContactTractionImpl< DIM, GAUSS, BoundaryEleOp >:
[legend]

Public Member Functions

 OpAssembleTotalContactTractionImpl (boost::shared_ptr< CommonData > common_data_ptr, double scale=1, bool is_axisymmetric=false)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Private Attributes

boost::shared_ptr< CommonData > commonDataPtr
 
const double scaleTraction
 
bool isAxisymmetric
 

Detailed Description

template<int DIM, typename BoundaryEleOp>
struct ContactOps::OpAssembleTotalContactTractionImpl< DIM, GAUSS, BoundaryEleOp >

Definition at line 491 of file ContactOps.hpp.

Constructor & Destructor Documentation

◆ OpAssembleTotalContactTractionImpl()

template<int DIM, typename BoundaryEleOp >
ContactOps::OpAssembleTotalContactTractionImpl< DIM, GAUSS, BoundaryEleOp >::OpAssembleTotalContactTractionImpl ( boost::shared_ptr< CommonData >  common_data_ptr,
double  scale = 1,
bool  is_axisymmetric = false 
)

Definition at line 654 of file ContactOps.hpp.

Member Function Documentation

◆ doWork()

template<int DIM, typename BoundaryEleOp >
MoFEMErrorCode ContactOps::OpAssembleTotalContactTractionImpl< DIM, GAUSS, BoundaryEleOp >::doWork ( int  side,
EntityType  type,
EntData &  data 
)

Definition at line 664 of file ContactOps.hpp.

665 {
667
668 FTensor::Index<'i', DIM> i;
669 FTensor::Tensor1<double, 3> t_sum_t{0., 0., 0.};
670
671 auto t_w = BoundaryEleOp::getFTensor0IntegrationWeight();
672 auto t_traction = getFTensor1FromMat<DIM>(commonDataPtr->contactTraction);
673 auto t_coords = BoundaryEleOp::getFTensor1CoordsAtGaussPts();
674
675 const auto nb_gauss_pts = BoundaryEleOp::getGaussPts().size2();
676 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
677 double jacobian = 1.;
678 if (isAxisymmetric) {
679 jacobian = 2. * M_PI * t_coords(0);
680 }
681 const double alpha = t_w * jacobian * BoundaryEleOp::getMeasure();
682 t_sum_t(i) += alpha * t_traction(i);
683 ++t_w;
684 ++t_traction;
685 ++t_coords;
686 }
687
688 t_sum_t(i) *= scaleTraction;
689
690 constexpr int ind[] = {TX, TY, TZ};
691 CHKERR VecSetValues(commonDataPtr->totalTractionAndArea, 3, ind, &t_sum_t(0),
692 ADD_VALUES);
693
695}
SmartPetscObj< Mat > jacobian
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
FTensor::Index< 'i', SPACE_DIM > i
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.

Member Data Documentation

◆ commonDataPtr

template<int DIM, typename BoundaryEleOp >
boost::shared_ptr<CommonData> ContactOps::OpAssembleTotalContactTractionImpl< DIM, GAUSS, BoundaryEleOp >::commonDataPtr
private

Definition at line 499 of file ContactOps.hpp.

◆ isAxisymmetric

template<int DIM, typename BoundaryEleOp >
bool ContactOps::OpAssembleTotalContactTractionImpl< DIM, GAUSS, BoundaryEleOp >::isAxisymmetric
private

Definition at line 501 of file ContactOps.hpp.

◆ scaleTraction

template<int DIM, typename BoundaryEleOp >
const double ContactOps::OpAssembleTotalContactTractionImpl< DIM, GAUSS, BoundaryEleOp >::scaleTraction
private

Definition at line 500 of file ContactOps.hpp.


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