v0.14.0
Public Member Functions | Private Attributes | List of all members
FreeSurfaceOps::OpCalculateLift Struct Reference

#include <users_modules/tutorials/vec-5/src/FreeSurfaceOps.hpp>

Inheritance diagram for FreeSurfaceOps::OpCalculateLift:
[legend]
Collaboration diagram for FreeSurfaceOps::OpCalculateLift:
[legend]

Public Member Functions

 OpCalculateLift (const std::string field_name, boost::shared_ptr< VectorDouble > p_ptr, boost::shared_ptr< VectorDouble > lift_ptr, boost::shared_ptr< Range > ents_ptr)
 
MoFEMErrorCode doWork (int row_side, EntityType row_type, HookeElement::EntData &data)
 

Private Attributes

boost::shared_ptr< VectorDouble > pPtr
 
boost::shared_ptr< VectorDouble > liftPtr
 
boost::shared_ptr< RangeentsPtr
 

Detailed Description

Examples
free_surface.cpp.

Definition at line 3 of file FreeSurfaceOps.hpp.

Constructor & Destructor Documentation

◆ OpCalculateLift()

FreeSurfaceOps::OpCalculateLift::OpCalculateLift ( const std::string  field_name,
boost::shared_ptr< VectorDouble >  p_ptr,
boost::shared_ptr< VectorDouble >  lift_ptr,
boost::shared_ptr< Range ents_ptr 
)
inline

Definition at line 4 of file FreeSurfaceOps.hpp.

9  pPtr(p_ptr), liftPtr(lift_ptr), entsPtr(ents_ptr) {
10  std::fill(&doEntities[MBVERTEX], &doEntities[MBMAXTYPE], false);
11  doEntities[MBEDGE] = true;
12  }

Member Function Documentation

◆ doWork()

MoFEMErrorCode FreeSurfaceOps::OpCalculateLift::doWork ( int  row_side,
EntityType  row_type,
HookeElement::EntData data 
)
inline

Definition at line 14 of file FreeSurfaceOps.hpp.

15  {
17 
18  const auto fe_ent = getFEEntityHandle();
19  if (entsPtr->find(fe_ent) != entsPtr->end()) {
20 
21  auto t_w = getFTensor0IntegrationWeight();
22  auto t_p = getFTensor0FromVec(*pPtr);
23  auto t_normal = getFTensor1Normal();
24  auto t_coords = getFTensor1CoordsAtGaussPts();
25  auto t_lift = getFTensor1FromArray<SPACE_DIM, SPACE_DIM>(*liftPtr);
26 
27  const auto nb_int_points = getGaussPts().size2();
28 
29  for (int gg = 0; gg != nb_int_points; gg++) {
30 
31  const double r = t_coords(0);
32  const double alpha = cylindrical(r) * t_w;
33  t_lift(i) -= t_normal(i) * (t_p * alpha);
34 
35  ++t_w;
36  ++t_p;
37  ++t_coords;
38  }
39  }
40 
42  }

Member Data Documentation

◆ entsPtr

boost::shared_ptr<Range> FreeSurfaceOps::OpCalculateLift::entsPtr
private

Definition at line 47 of file FreeSurfaceOps.hpp.

◆ liftPtr

boost::shared_ptr<VectorDouble> FreeSurfaceOps::OpCalculateLift::liftPtr
private

Definition at line 46 of file FreeSurfaceOps.hpp.

◆ pPtr

boost::shared_ptr<VectorDouble> FreeSurfaceOps::OpCalculateLift::pPtr
private

Definition at line 45 of file FreeSurfaceOps.hpp.


The documentation for this struct was generated from the following file:
FreeSurfaceOps::OpCalculateLift::entsPtr
boost::shared_ptr< Range > entsPtr
Definition: FreeSurfaceOps.hpp:47
sdf.r
int r
Definition: sdf.py:8
cylindrical
auto cylindrical
Definition: free_surface.cpp:187
FreeSurfaceOps::OpCalculateLift::pPtr
boost::shared_ptr< VectorDouble > pPtr
Definition: FreeSurfaceOps.hpp:45
FreeSurfaceOps::OpCalculateLift::liftPtr
boost::shared_ptr< VectorDouble > liftPtr
Definition: FreeSurfaceOps.hpp:46
MoFEM::getFTensor0FromVec
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
BoundaryEleOp
BoundaryEle::UserDataOperator BoundaryEleOp
Definition: child_and_parent.cpp:40
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
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::OPROW
@ OPROW
operator doWork function is executed on FE rows
Definition: ForcesAndSourcesCore.hpp:567