v0.14.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
FreeSurfaceOps::OpNormalConstrainLhs Struct Reference

#include <users_modules/tutorials/vec-5/src/FreeSurfaceOps.hpp>

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

Public Member Functions

 OpNormalConstrainLhs (const std::string field_name_row, const std::string field_name_col)
 
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 

Detailed Description

Examples
free_surface.cpp.

Definition at line 195 of file FreeSurfaceOps.hpp.

Constructor & Destructor Documentation

◆ OpNormalConstrainLhs()

FreeSurfaceOps::OpNormalConstrainLhs::OpNormalConstrainLhs ( const std::string  field_name_row,
const std::string  field_name_col 
)
inline

Definition at line 197 of file FreeSurfaceOps.hpp.

199 : AssemblyBoundaryEleOp(field_name_row, field_name_col,
200 AssemblyBoundaryEleOp::OPROWCOL) {
201 assembleTranspose = true;
202 sYmm = false;
203 }
FormsIntegrators< BoundaryEleOp >::Assembly< A >::OpBase AssemblyBoundaryEleOp

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode FreeSurfaceOps::OpNormalConstrainLhs::iNtegrate ( EntitiesFieldData::EntData &  row_data,
EntitiesFieldData::EntData &  col_data 
)
inline

Definition at line 205 of file FreeSurfaceOps.hpp.

206 {
208
209 auto t_w = getFTensor0IntegrationWeight();
210 auto t_normal = getFTensor1Normal();
211 auto t_row_base = row_data.getFTensor0N();
212 auto t_coords = getFTensor1CoordsAtGaussPts();
213
214 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
215
216 auto t_mat = getFTensor1FromPtr<U_FIELD_DIM>(&locMat(0, 0));
217
218 const double r = t_coords(0);
219 const double alpha = t_w * cylindrical(r);
220
221 int rr = 0;
222 for (; rr != nbRows; ++rr) {
223
224 auto t_col_base = col_data.getFTensor0N(gg, 0);
225 const double a = alpha * t_row_base;
226
227 for (int cc = 0; cc != nbCols / U_FIELD_DIM; ++cc) {
228 t_mat(i) += (a * t_col_base) * t_normal(i);
229 ++t_col_base;
230 ++t_mat;
231 }
232 ++t_row_base;
233 }
234
235 for (; rr < nbRowBaseFunctions; ++rr)
236 ++t_row_base;
237
238 ++t_w;
239 ++t_coords;
240 }
241
243 };
constexpr double a
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
auto cylindrical
constexpr int U_FIELD_DIM
FTensor::Index< 'i', SPACE_DIM > i
int r
Definition: sdf.py:8

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