v0.15.0
Loading...
Searching...
No Matches
FreeSurfaceOps::OpCalculateLift Struct Reference

#include "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, EntitiesFieldData::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.

8 : BoundaryEleOp(field_name, field_name, BoundaryEleOp::OPROW),
9 pPtr(p_ptr), liftPtr(lift_ptr), entsPtr(ents_ptr) {
10 std::fill(&doEntities[MBVERTEX], &doEntities[MBMAXTYPE], false);
11 doEntities[MBEDGE] = true;
12 }
BoundaryEle::UserDataOperator BoundaryEleOp
constexpr auto field_name
boost::shared_ptr< VectorDouble > liftPtr
boost::shared_ptr< VectorDouble > pPtr
boost::shared_ptr< Range > entsPtr

Member Function Documentation

◆ doWork()

MoFEMErrorCode FreeSurfaceOps::OpCalculateLift::doWork ( int row_side,
EntityType row_type,
EntitiesFieldData::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 }
#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()
auto cylindrical
FTensor::Index< 'i', SPACE_DIM > i
int r
Definition sdf.py:8

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: