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

#include <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  }

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  };

The documentation for this struct was generated from the following file:
sdf.r
int r
Definition: sdf.py:8
cylindrical
auto cylindrical
Definition: free_surface.cpp:187
U_FIELD_DIM
constexpr int U_FIELD_DIM
Definition: free_surface.cpp:79
a
constexpr double a
Definition: approx_sphere.cpp:30
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
AssemblyBoundaryEleOp
FormsIntegrators< BoundaryEleOp >::Assembly< A >::OpBase AssemblyBoundaryEleOp
Definition: tensor_divergence_operator.cpp:61