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

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

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

Public Member Functions

 OpWettingAngleRhs (const std::string field_name, boost::shared_ptr< MatrixDouble > grad_h_ptr, boost::shared_ptr< Range > ents_ptr=nullptr, double wetting_angle=0)
 
MoFEMErrorCode iNtegrate (DataForcesAndSourcesCore::EntData &row_data)
 

Private Attributes

boost::shared_ptr< MatrixDouble > gradHPtr
 
boost::shared_ptr< RangeentsPtr
 
double wettingAngle
 

Detailed Description

Examples
free_surface.cpp.

Definition at line 138 of file FreeSurfaceOps.hpp.

Constructor & Destructor Documentation

◆ OpWettingAngleRhs()

FreeSurfaceOps::OpWettingAngleRhs::OpWettingAngleRhs ( const std::string  field_name,
boost::shared_ptr< MatrixDouble >  grad_h_ptr,
boost::shared_ptr< Range ents_ptr = nullptr,
double  wetting_angle = 0 
)
inline

Definition at line 139 of file FreeSurfaceOps.hpp.

144  AssemblyBoundaryEleOp::OPROW),
145  gradHPtr(grad_h_ptr), entsPtr(ents_ptr), wettingAngle(wetting_angle) {}

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode FreeSurfaceOps::OpWettingAngleRhs::iNtegrate ( DataForcesAndSourcesCore::EntData row_data)
inline

Definition at line 147 of file FreeSurfaceOps.hpp.

147  {
149  if (entsPtr) {
150  if (entsPtr->find(AssemblyBoundaryEleOp::getFEEntityHandle()) ==
151  entsPtr->end())
153  }
154  const double area = getMeasure();
155  auto t_w = getFTensor0IntegrationWeight();
156  auto t_row_base = row_data.getFTensor0N();
157  auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*gradHPtr);
158  auto t_coords = getFTensor1CoordsAtGaussPts();
159 
160  auto s = wetting_angle_sub_stepping(getFEMethod()->ts_step);
161 
162  for (int gg = 0; gg != nbIntegrationPts; gg++) {
163 
164  const double r = t_coords(0);
165  const double alpha = t_w * cylindrical(r) * area;
166  const double h_grad_norm = sqrt(t_grad_h(i) * t_grad_h(i) + eps);
167  const double cos_angle = std::cos(M_PI * wettingAngle / 180);
168  const double rhs_wetting = s * eta2 * h_grad_norm * cos_angle;
169 
170  // cerr << "pass "
171  // << h_grad_norm <<"\n";
172  int bb = 0;
173  for (; bb != nbRows; ++bb) {
174  locF[bb] += alpha * t_row_base * rhs_wetting;
175  ++t_row_base;
176  }
177 
178  for (; bb < nbRowBaseFunctions; ++bb)
179  ++t_row_base;
180 
181  ++t_w;
182  ++t_grad_h;
183  ++t_coords;
184  }
185 
187  }

Member Data Documentation

◆ entsPtr

boost::shared_ptr<Range> FreeSurfaceOps::OpWettingAngleRhs::entsPtr
private

Definition at line 191 of file FreeSurfaceOps.hpp.

◆ gradHPtr

boost::shared_ptr<MatrixDouble> FreeSurfaceOps::OpWettingAngleRhs::gradHPtr
private

Definition at line 190 of file FreeSurfaceOps.hpp.

◆ wettingAngle

double FreeSurfaceOps::OpWettingAngleRhs::wettingAngle
private

Definition at line 192 of file FreeSurfaceOps.hpp.


The documentation for this struct was generated from the following file:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
FreeSurfaceOps::OpWettingAngleRhs::wettingAngle
double wettingAngle
Definition: FreeSurfaceOps.hpp:192
sdf.r
int r
Definition: sdf.py:8
cylindrical
auto cylindrical
Definition: free_surface.cpp:187
wetting_angle
auto wetting_angle
Definition: free_surface.cpp:310
FreeSurfaceOps::OpWettingAngleRhs::entsPtr
boost::shared_ptr< Range > entsPtr
Definition: FreeSurfaceOps.hpp:191
eta2
double eta2
Definition: free_surface.cpp:171
wetting_angle_sub_stepping
auto wetting_angle_sub_stepping
Definition: free_surface.cpp:194
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
eps
static const double eps
Definition: check_base_functions_derivatives_on_tet.cpp:11
FreeSurfaceOps::OpWettingAngleRhs::gradHPtr
boost::shared_ptr< MatrixDouble > gradHPtr
Definition: FreeSurfaceOps.hpp:190
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
AssemblyBoundaryEleOp
FormsIntegrators< BoundaryEleOp >::Assembly< A >::OpBase AssemblyBoundaryEleOp
Definition: tensor_divergence_operator.cpp:61