#include "tutorials/vec-5/src/FreeSurfaceOps.hpp"
|
| 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) |
|
|
boost::shared_ptr< VectorDouble > | pPtr |
|
boost::shared_ptr< VectorDouble > | liftPtr |
|
boost::shared_ptr< Range > | entsPtr |
|
- Examples
- free_surface.cpp.
Definition at line 3 of file FreeSurfaceOps.hpp.
◆ 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.
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
◆ 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();
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);
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()
FTensor::Index< 'i', SPACE_DIM > i
◆ entsPtr
boost::shared_ptr<Range> FreeSurfaceOps::OpCalculateLift::entsPtr |
|
private |
◆ liftPtr
boost::shared_ptr<VectorDouble> FreeSurfaceOps::OpCalculateLift::liftPtr |
|
private |
◆ pPtr
boost::shared_ptr<VectorDouble> FreeSurfaceOps::OpCalculateLift::pPtr |
|
private |
The documentation for this struct was generated from the following file: