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

[OpNormalConstrainRhs] More...

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

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

Public Member Functions

 OpNormalForceRhs (const std::string field_name, boost::shared_ptr< VectorDouble > lambda_ptr)
 
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &row_data)
 

Private Attributes

boost::shared_ptr< VectorDouble > lambdaPtr
 

Detailed Description

[OpNormalConstrainRhs]

Boundary normal force RHS

Parameters
field_nameName of the field associated with the operator
lambda_ptrPointer to the Lagrange multiplier vector on the free surface
Returns
MoFEMErrorCode

Assembles the contribution of the Lagrange multiplier (λ) normal force ie ∫_Γ N_u · (λ n) dΓ into the momentum residual.

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

Definition at line 141 of file FreeSurfaceOps.hpp.

Constructor & Destructor Documentation

◆ OpNormalForceRhs()

FreeSurfaceOps::OpNormalForceRhs::OpNormalForceRhs ( const std::string  field_name,
boost::shared_ptr< VectorDouble >  lambda_ptr 
)
inline

Definition at line 142 of file FreeSurfaceOps.hpp.

145 AssemblyDomainEleOp::OPROW),
146 lambdaPtr(lambda_ptr) {}
constexpr auto field_name
boost::shared_ptr< VectorDouble > lambdaPtr
FormsIntegrators< BoundaryEleOp >::Assembly< A >::OpBase AssemblyBoundaryEleOp

Member Function Documentation

◆ iNtegrate()

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

Definition at line 148 of file FreeSurfaceOps.hpp.

148 {
150
151 auto t_w = getFTensor0IntegrationWeight();
152 auto t_normal = getFTensor1Normal();
153 auto t_lambda = getFTensor0FromVec(*lambdaPtr);
154 auto t_row_base = row_data.getFTensor0N();
155 auto t_coords = getFTensor1CoordsAtGaussPts();
156
157 for (int gg = 0; gg != nbIntegrationPts; gg++) {
158
159 auto t_nf = getFTensor1FromArray<U_FIELD_DIM, U_FIELD_DIM>(locF);
160
161 const double r = t_coords(0);
162 const double alpha = t_w * cylindrical(r);
163
164 int bb = 0;
165 for (; bb != nbRows / U_FIELD_DIM; ++bb) {
166
167 t_nf(i) += alpha * t_row_base * t_normal(i) * t_lambda; // N_u · (λ n)
168 ++t_row_base;
169 ++t_nf;
170 }
171
172 for (; bb < nbRowBaseFunctions; ++bb)
173 ++t_row_base;
174
175 ++t_w;
176 ++t_lambda;
177 ++t_coords;
178 }
179
181 }
#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]
constexpr int U_FIELD_DIM
FTensor::Index< 'i', SPACE_DIM > i
int r
Definition sdf.py:205

Member Data Documentation

◆ lambdaPtr

boost::shared_ptr<VectorDouble> FreeSurfaceOps::OpNormalForceRhs::lambdaPtr
private

Definition at line 184 of file FreeSurfaceOps.hpp.


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