v0.15.5
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
FreeSurfaceOps::OpNormalConstrainRhs Struct Reference

[OpNormalConstrainRhs] More...

#include "tutorials/vec-5_free_surface/src/FreeSurfaceOps.hpp"

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

Public Member Functions

 OpNormalConstrainRhs (const std::string field_name, boost::shared_ptr< MatrixDouble > u_ptr)
 
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &row_data)
 

Private Attributes

boost::shared_ptr< MatrixDouble > uPtr
 

Detailed Description

[OpNormalConstrainRhs]

Boundary normal constraint RHS

Parameters
field_nameName of the field associated with the operator
u_ptrPointer to the velocity matrix on the free surface
Returns
MoFEMErrorCode

Computes the integral ∫_Γ ​w_L​·(n·u) dΓ, where:

Examples
mofem/tutorials/vec-5_free_surface/free_surface.cpp.

Definition at line 89 of file FreeSurfaceOps.hpp.

Constructor & Destructor Documentation

◆ OpNormalConstrainRhs()

FreeSurfaceOps::OpNormalConstrainRhs::OpNormalConstrainRhs ( const std::string  field_name,
boost::shared_ptr< MatrixDouble >  u_ptr 
)
inline

Definition at line 90 of file FreeSurfaceOps.hpp.

93 AssemblyBoundaryEleOp::OPROW),
94 uPtr(u_ptr) {}
constexpr auto field_name
boost::shared_ptr< MatrixDouble > uPtr
FormsIntegrators< BoundaryEleOp >::Assembly< A >::OpBase AssemblyBoundaryEleOp

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode FreeSurfaceOps::OpNormalConstrainRhs::iNtegrate ( EntitiesFieldData::EntData &  row_data)
inline

Definition at line 96 of file FreeSurfaceOps.hpp.

96 {
98
99 auto t_w = getFTensor0IntegrationWeight();
100 auto t_normal = getFTensor1Normal();
101 auto t_u = getFTensor1FromMat<SPACE_DIM>(*uPtr);
102 auto t_row_base = row_data.getFTensor0N();
103 auto t_coords = getFTensor1CoordsAtGaussPts();
104
105 for (int gg = 0; gg != nbIntegrationPts; gg++) {
106
107 const double r = t_coords(0);
108 const double alpha = t_w * cylindrical(r);
109
110 int bb = 0;
111 for (; bb != nbRows; ++bb) {
112 locF[bb] += alpha * t_row_base * (t_normal(i) * t_u(i)); // λ * (n · u)
113 ++t_row_base;
114 }
115
116 for (; bb < nbRowBaseFunctions; ++bb)
117 ++t_row_base;
118
119 ++t_w;
120 ++t_u;
121 ++t_coords;
122 }
123
125 }
#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
[cylindrical]
FTensor::Index< 'i', SPACE_DIM > i
int r
Definition sdf.py:205

Member Data Documentation

◆ uPtr

boost::shared_ptr<MatrixDouble> FreeSurfaceOps::OpNormalConstrainRhs::uPtr
private

Definition at line 128 of file FreeSurfaceOps.hpp.


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