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

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

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

Public Member Functions

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

Private Attributes

boost::shared_ptr< CommonDatacommonDataPtr
 
boost::shared_ptr< DomainSideEle > sideOpFe
 

Detailed Description

Definition at line 29 of file RotatingFrameOperators.hpp.

Constructor & Destructor Documentation

◆ OpRotatingFrameBoundaryRhs()

OpRotatingFrameTools::OpRotatingFrameBoundaryRhs::OpRotatingFrameBoundaryRhs ( const std::string  field_name,
boost::shared_ptr< CommonData common_data_ptr,
boost::shared_ptr< DomainSideEle side_op_fe 
)

Definition at line 162 of file RotatingFrameOperators.cpp.

166 commonDataPtr(common_data_ptr), sideOpFe(side_op_fe) {}
FormsIntegrators< BoundaryEleOp >::Assembly< USER_ASSEMBLE >::OpBase BoundaryEleOpAssembly
constexpr auto field_name

Member Function Documentation

◆ iNtegrate()

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

Definition at line 168 of file RotatingFrameOperators.cpp.

168 {
170
171 const size_t nb_gauss_pts = getGaussPts().size2();
172 const size_t nb_dofs = data.getIndices().size();
173
174 if (nb_dofs) {
175
176 auto t_w = getFTensor0IntegrationWeight();
177 auto t_coords = getFTensor1CoordsAtGaussPts();
178 CHKERR loopSideVolumes("dFE", *sideOpFe);
179 auto t_grad = getFTensor2FromMat<3, 3>(*(commonDataPtr->mGradPtr));
180 size_t nb_base_functions = data.getN().size2();
181 auto t_base = data.getFTensor0N();
182 auto t_normal = getFTensor1Normal();
183 const double ls = sqrt(t_normal(i) * t_normal(i));
184 t_normal(i) /= ls;
185
186 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
187
188 auto t_nf = getFTensor1FromArray<3, 3>(locF);
189
190 if (getNormalsAtGaussPts().size1() == nb_gauss_pts) {
191 VectorDouble n = getNormalsAtGaussPts(gg);
192 auto t_n = getFTensor1FromPtr<3>(&*n.data().begin());
193 t_normal(i) = t_n(i) / sqrt(t_n(j) * t_n(j));
194 }
195
196 const double alpha = t_w * getMeasure() * (*cache).density;
198 omg(i) = (*cache).Omega(i, j) * t_coords(j);
199
200 size_t bb = 0;
201 for (; bb != nb_dofs / 3; ++bb) {
202 // cerr << test << endl;
203 t_nf(i) += alpha * t_base *
204 ((t_grad(i, j) + kronecker_delta(i, j)) * omg(j)) *
205 (omg(k) * t_normal(k));
206 // alpha * t_base * (t_grad(i, j) * omg(j));
207
208 ++t_nf;
209 ++t_base;
210 }
211 for (; bb < nb_base_functions; ++bb)
212 ++t_base;
213
214 ++t_grad;
215 ++t_coords;
216 ++t_w;
217 }
218 }
219
221}
static Index< 'n', 3 > n
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
#define CHKERR
Inline error check.
Definition: definitions.h:548
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.
UBlasVector< double > VectorDouble
Definition: Types.hpp:79
FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, 3 > getFTensor1FromPtr< 3 >(double *ptr)
Definition: Templates.hpp:747

Member Data Documentation

◆ commonDataPtr

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

Definition at line 37 of file RotatingFrameOperators.hpp.

◆ sideOpFe

boost::shared_ptr<DomainSideEle> OpRotatingFrameTools::OpRotatingFrameBoundaryRhs::sideOpFe
private

Definition at line 38 of file RotatingFrameOperators.hpp.


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