v0.13.1
Public Member Functions | Private Attributes | List of all members
OpRotatingFrameTools::OpRotatingFrameRhs Struct Reference

#include <users_modules/multifield_plasticity/src/RotatingFrameOperators.hpp>

Inheritance diagram for OpRotatingFrameTools::OpRotatingFrameRhs:
[legend]
Collaboration diagram for OpRotatingFrameTools::OpRotatingFrameRhs:
[legend]

Public Member Functions

 OpRotatingFrameRhs (const std::string field_name, boost::shared_ptr< CommonData > common_data_ptr)
 
MoFEMErrorCode iNtegrate (DataForcesAndSourcesCore::EntData &data)
 

Private Attributes

boost::shared_ptr< CommonDatacommonDataPtr
 

Detailed Description

Definition at line 20 of file RotatingFrameOperators.hpp.

Constructor & Destructor Documentation

◆ OpRotatingFrameRhs()

OpRotatingFrameTools::OpRotatingFrameRhs::OpRotatingFrameRhs ( const std::string  field_name,
boost::shared_ptr< CommonData common_data_ptr 
)

Definition at line 50 of file RotatingFrameOperators.cpp.

53 commonDataPtr(common_data_ptr) {}
FormsIntegrators< DomainEleOp >::Assembly< USER_ASSEMBLE >::OpBase DomainEleOpAssembly
constexpr auto field_name
@ OPROW
operator doWork function is executed on FE rows
boost::shared_ptr< CommonData > commonDataPtr

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode OpRotatingFrameTools::OpRotatingFrameRhs::iNtegrate ( DataForcesAndSourcesCore::EntData data)

Definition at line 55 of file RotatingFrameOperators.cpp.

55 {
57
58 const size_t nb_dofs = data.getIndices().size();
59
60 if (nb_dofs) {
61
62 const size_t nb_base_functions = data.getN().size2();
63 if (3 * nb_base_functions < nb_dofs)
64 SETERRQ(
65 PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
66 "Number of DOFs is larger than number of base functions on entity");
67
68 const size_t nb_gauss_pts = data.getN().size1();
69
70 auto t_w = getFTensor0IntegrationWeight();
71 auto t_diff_base = data.getFTensor1DiffN<3>();
72 auto t_grad = getFTensor2FromMat<3, 3>(*(commonDataPtr->mGradPtr));
73 auto t_coords = getFTensor1CoordsAtGaussPts();
74
75 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
76
78 omg(i) = (*cache).Omega(i, j) * t_coords(j);
79
80 double alpha = getMeasure() * t_w * (*cache).density;
81 auto t_nf = getFTensor1FromArray<3, 3>(locF);
82
83 size_t bb = 0;
84 for (; bb != nb_dofs / 3; ++bb) {
85
86 t_nf(i) -= alpha * (t_grad(i, j) + kronecker_delta(i, j)) * omg(j) *
87 t_diff_base(k) * omg(k);
88
89 ++t_diff_base;
90 ++t_nf;
91 }
92 for (; bb < nb_base_functions; ++bb)
93 ++t_diff_base;
94
95 ++t_coords;
96 ++t_grad;
97 ++t_w;
98 }
99 }
100
102}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:44
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
constexpr double alpha
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
Tensor2_Expr< Kronecker_Delta< T >, T, Dim0, Dim1, i, j > kronecker_delta(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
Rank 2.

Member Data Documentation

◆ commonDataPtr

boost::shared_ptr<CommonData> OpRotatingFrameTools::OpRotatingFrameRhs::commonDataPtr
private

Definition at line 26 of file RotatingFrameOperators.hpp.


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