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

#include <tutorials/adv-1/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< CommonDatacommonDataPtr
 
const double scaleTraction
 
bool isAxisymmetric
 

Detailed Description

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

Definition at line 446 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 610 of file ContactOps.hpp.

613  : BoundaryEleOp(NOSPACE, BoundaryEleOp::OPSPACE),
614  commonDataPtr(common_data_ptr), scaleTraction(scale),

Member Function Documentation

◆ doWork()

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

Definition at line 619 of file ContactOps.hpp.

620  {
622 
624  FTensor::Tensor1<double, 3> t_sum_t{0., 0., 0.};
625 
626  auto t_w = BoundaryEleOp::getFTensor0IntegrationWeight();
627  auto t_traction = getFTensor1FromMat<DIM>(commonDataPtr->contactTraction);
628  auto t_coords = BoundaryEleOp::getFTensor1CoordsAtGaussPts();
629 
630  const auto nb_gauss_pts = BoundaryEleOp::getGaussPts().size2();
631  for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
632  double jacobian = 1.;
633  if (isAxisymmetric) {
634  jacobian = 2. * M_PI * t_coords(0);
635  }
636  const double alpha = t_w * jacobian * BoundaryEleOp::getMeasure();
637  t_sum_t(i) += alpha * t_traction(i);
638  ++t_w;
639  ++t_traction;
640  ++t_coords;
641  }
642 
643  t_sum_t(i) *= scaleTraction;
644 
645  constexpr int ind[] = {0, 1, 2};
646  CHKERR VecSetValues(commonDataPtr->totalTraction, 3, ind, &t_sum_t(0),
647  ADD_VALUES);
648 
650 }

Member Data Documentation

◆ commonDataPtr

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

Definition at line 454 of file ContactOps.hpp.

◆ isAxisymmetric

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

Definition at line 456 of file ContactOps.hpp.

◆ scaleTraction

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

Definition at line 455 of file ContactOps.hpp.


The documentation for this struct was generated from the following file:
NOSPACE
@ NOSPACE
Definition: definitions.h:83
ContactOps::OpAssembleTotalContactTractionImpl< DIM, GAUSS, BoundaryEleOp >::isAxisymmetric
bool isAxisymmetric
Definition: ContactOps.hpp:456
FTensor::Tensor1< double, 3 >
is_axisymmetric
PetscBool is_axisymmetric
Definition: contact.cpp:93
MoFEM::VecSetValues
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
Definition: EntitiesFieldData.hpp:1589
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
ContactOps::scale
double scale
Definition: EshelbianContact.hpp:23
ContactOps::OpAssembleTotalContactTractionImpl< DIM, GAUSS, BoundaryEleOp >::commonDataPtr
boost::shared_ptr< CommonData > commonDataPtr
Definition: ContactOps.hpp:454
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::Index< 'i', DIM >
ContactOps::BoundaryEleOp
BoundaryEle::UserDataOperator BoundaryEleOp
Definition: EshelbianContact.hpp:14
ContactOps::OpAssembleTotalContactTractionImpl< DIM, GAUSS, BoundaryEleOp >::scaleTraction
const double scaleTraction
Definition: ContactOps.hpp:455
sdf_wavy_2d.ind
float ind
Definition: sdf_wavy_2d.py:7
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359