v0.16.0
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
OpCalculateTractionJump Struct Reference

#include "tutorials/vec-8_elasticity_adaptive/src/AdaptiveOrderRef.hpp"

Inheritance diagram for OpCalculateTractionJump:
[legend]
Collaboration diagram for OpCalculateTractionJump:
[legend]

Public Member Functions

 OpCalculateTractionJump (const std::string field_name, boost::shared_ptr< MatrixDouble > stress_ptr, boost::shared_ptr< MatrixDouble > traction_ptr)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Private Attributes

boost::shared_ptr< MatrixDouble > stressPtr
 
boost::shared_ptr< MatrixDouble > tractionJumpPtr
 

Detailed Description

Definition at line 99 of file AdaptiveOrderRef.hpp.

Constructor & Destructor Documentation

◆ OpCalculateTractionJump()

OpCalculateTractionJump::OpCalculateTractionJump ( const std::string  field_name,
boost::shared_ptr< MatrixDouble >  stress_ptr,
boost::shared_ptr< MatrixDouble >  traction_ptr 
)
inline

Definition at line 100 of file AdaptiveOrderRef.hpp.

103 : SideEleOp(field_name, SideEleOp::OPROW, false), stressPtr(stress_ptr),
104 tractionJumpPtr(traction_ptr) {
105 std::fill(&doEntities[MBVERTEX], &doEntities[MBMAXTYPE], false);
106 doEntities[MBVERTEX] = true;
107 }
constexpr auto field_name
boost::shared_ptr< MatrixDouble > tractionJumpPtr
boost::shared_ptr< MatrixDouble > stressPtr
EleOnSide::UserDataOperator SideEleOp

Member Function Documentation

◆ doWork()

MoFEMErrorCode OpCalculateTractionJump::doWork ( int  side,
EntityType  type,
EntData data 
)
inline

Definition at line 109 of file AdaptiveOrderRef.hpp.

109 {
113 auto nb_gauss_pts = getGaussPts().size2();
114
115 // auto n_total_side_eles = getLoopSize();
116 auto n_InLoop = getNinTheLoop();
117 auto e_sense = getSkeletonSense();
118
119 if (n_InLoop == 0) {
120 tractionJumpPtr->resize(nb_gauss_pts, SPACE_DIM, false);
121 tractionJumpPtr->clear();
122 }
123
124 auto t_normal = getFTensor1NormalsAtGaussPts();
125 auto t_stress = getFTensor2SymmetricFromMat<SPACE_DIM>(*stressPtr);
126 auto t_traction = getFTensor1FromMat<SPACE_DIM>(*tractionJumpPtr);
127
128 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
129 FTensor::Tensor1<double, 3> t_unit_normal;
130 t_unit_normal(i) = t_normal(i);
131 t_unit_normal.normalize();
132
133 t_traction(i) -= e_sense * (t_stress(i, j) * t_unit_normal(j));
134
135 ++t_normal;
136 ++t_stress;
137 ++t_traction;
138 }
140 }
constexpr int SPACE_DIM
Tensor1< T, Tensor_Dim > normalize()
#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()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j

Member Data Documentation

◆ stressPtr

boost::shared_ptr<MatrixDouble> OpCalculateTractionJump::stressPtr
private

Definition at line 143 of file AdaptiveOrderRef.hpp.

◆ tractionJumpPtr

boost::shared_ptr<MatrixDouble> OpCalculateTractionJump::tractionJumpPtr
private

Definition at line 144 of file AdaptiveOrderRef.hpp.


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