[OpNormalConstrainRhs]
More...
#include "tutorials/vec-5_free_surface/src/FreeSurfaceOps.hpp"
[OpNormalConstrainRhs]
Boundary normal force RHS
- Parameters
-
| field_name | Name of the field associated with the operator |
| lambda_ptr | Pointer 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.
◆ 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),
constexpr auto field_name
boost::shared_ptr< VectorDouble > lambdaPtr
FormsIntegrators< BoundaryEleOp >::Assembly< A >::OpBase AssemblyBoundaryEleOp
◆ 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);
163
164 int bb = 0;
166
167 t_nf(
i) += alpha * t_row_base * t_normal(
i) * t_lambda;
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
◆ lambdaPtr
| boost::shared_ptr<VectorDouble> FreeSurfaceOps::OpNormalForceRhs::lambdaPtr |
|
private |
The documentation for this struct was generated from the following file: