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 257 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 420 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 430 of file ContactOps.hpp.

431 {
433
434 FTensor::Index<'i', DIM> i;
435 FTensor::Tensor1<double, 3> t_sum_t{0., 0., 0.};
436
437 auto t_w = BoundaryEleOp::getFTensor0IntegrationWeight();
438 auto t_traction = getFTensor1FromMat<DIM>(commonDataPtr->contactTraction);
439 auto t_coords = BoundaryEleOp::getFTensor1CoordsAtGaussPts();
440
441 const auto nb_gauss_pts = BoundaryEleOp::getGaussPts().size2();
442 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
443 double jacobian = 1.;
444 if (isAxisymmetric) {
445 jacobian = 2. * M_PI * t_coords(0);
446 }
447 const double alpha = t_w * jacobian * BoundaryEleOp::getMeasure();
448 t_sum_t(i) += alpha * t_traction(i);
449 ++t_w;
450 ++t_traction;
451 ++t_coords;
452 }
453
454 t_sum_t(i) *= scaleTraction;
455
456 constexpr int ind[] = {TX, TY, TZ};
457 CHKERR VecSetValues(commonDataPtr->totalTractionAndArea, 3, ind, &t_sum_t(0),
458 ADD_VALUES);
459
461}
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 265 of file ContactOps.hpp.

◆ isAxisymmetric

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

Definition at line 267 of file ContactOps.hpp.

◆ scaleTraction

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

Definition at line 266 of file ContactOps.hpp.


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