v0.14.0
Public Member Functions | Private Attributes | List of all members
FreeSurfaceOps::OpNormalForceRhs Struct Reference

#include <tutorials/vec-5/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

Examples
free_surface.cpp.

Definition at line 92 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 93 of file FreeSurfaceOps.hpp.

96  AssemblyDomainEleOp::OPROW),
97  lambdaPtr(lambda_ptr) {}

Member Function Documentation

◆ iNtegrate()

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

Definition at line 99 of file FreeSurfaceOps.hpp.

99  {
101 
102  auto t_w = getFTensor0IntegrationWeight();
103  auto t_normal = getFTensor1Normal();
104  auto t_lambda = getFTensor0FromVec(*lambdaPtr);
105  auto t_row_base = row_data.getFTensor0N();
106  auto t_coords = getFTensor1CoordsAtGaussPts();
107 
108  for (int gg = 0; gg != nbIntegrationPts; gg++) {
109 
110  auto t_nf = getFTensor1FromArray<U_FIELD_DIM, U_FIELD_DIM>(locF);
111 
112  const double r = t_coords(0);
113  const double alpha = t_w * cylindrical(r);
114 
115  int bb = 0;
116  for (; bb != nbRows / U_FIELD_DIM; ++bb) {
117 
118  t_nf(i) += alpha * t_row_base * t_normal(i) * t_lambda;
119  ++t_row_base;
120  ++t_nf;
121  }
122 
123  for (; bb < nbRowBaseFunctions; ++bb)
124  ++t_row_base;
125 
126  ++t_w;
127  ++t_lambda;
128  ++t_coords;
129  }
130 
132  }

Member Data Documentation

◆ lambdaPtr

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

Definition at line 135 of file FreeSurfaceOps.hpp.


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
MoFEM::getFTensor0FromVec
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
FreeSurfaceOps::OpNormalForceRhs::lambdaPtr
boost::shared_ptr< VectorDouble > lambdaPtr
Definition: FreeSurfaceOps.hpp:135
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