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

#include <users_modules/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 437 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 579 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 
)
Examples
ContactOps.hpp.

Definition at line 588 of file ContactOps.hpp.

589  {
591 
593  FTensor::Tensor1<double, 3> t_sum_t{0., 0., 0.};
594 
596  auto t_traction = getFTensor1FromMat<DIM>(commonDataPtr->contactTraction);
598 
599  const auto nb_gauss_pts = BoundaryEleOp::getGaussPts().size2();
600  for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
601  double jacobian = 1.;
602  if (isAxisymmetric) {
603  jacobian = 2. * M_PI * t_coords(0);
604  }
605  const double alpha = t_w * jacobian * BoundaryEleOp::getMeasure();
606  t_sum_t(i) += alpha * t_traction(i);
607  ++t_w;
608  ++t_traction;
609  ++t_coords;
610  }
611 
612  t_sum_t(i) *= scaleTraction;
613 
614  constexpr int ind[] = {0, 1, 2};
615  CHKERR VecSetValues(commonDataPtr->totalTraction, 3, ind, &t_sum_t(0),
616  ADD_VALUES);
617 
619 }

Member Data Documentation

◆ commonDataPtr

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

Definition at line 445 of file ContactOps.hpp.

◆ isAxisymmetric

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

Definition at line 447 of file ContactOps.hpp.

◆ scaleTraction

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

Definition at line 446 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:447
FTensor::Tensor1< double, 3 >
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPSPACE
@ OPSPACE
operator do Work is execute on space data
Definition: ForcesAndSourcesCore.hpp:570
is_axisymmetric
PetscBool is_axisymmetric
Definition: contact.cpp:137
MoFEM::VecSetValues
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
Definition: EntitiesFieldData.hpp:1576
MoFEM::ForcesAndSourcesCore::UserDataOperator::getFTensor0IntegrationWeight
auto getFTensor0IntegrationWeight()
Get integration weights.
Definition: ForcesAndSourcesCore.hpp:1239
MoFEM::ForcesAndSourcesCore::UserDataOperator::getMeasure
double getMeasure() const
get measure of element
Definition: ForcesAndSourcesCore.hpp:1274
MoFEM::ForcesAndSourcesCore::UserDataOperator::getGaussPts
MatrixDouble & getGaussPts()
matrix of integration (Gauss) points for Volume Element
Definition: ForcesAndSourcesCore.hpp:1235
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
ContactOps::scale
double scale
Definition: EshelbianContact.hpp:22
ContactOps::OpAssembleTotalContactTractionImpl< DIM, GAUSS, BoundaryEleOp >::commonDataPtr
boost::shared_ptr< CommonData > commonDataPtr
Definition: ContactOps.hpp:445
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:446
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
MoFEM::ForcesAndSourcesCore::UserDataOperator::getFTensor1CoordsAtGaussPts
auto getFTensor1CoordsAtGaussPts()
Get coordinates at integration points assuming linear geometry.
Definition: ForcesAndSourcesCore.hpp:1268