v0.16.0
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
FreeSurfaceOps::OpLhsH_dU Struct Reference

Lhs for H dU. More...

#include "tutorials/vec-5_free_surface/src/FreeSurfaceOps.hpp"

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

Public Member Functions

 OpLhsH_dU (const std::string h_field_name, const std::string u_field_name, boost::shared_ptr< MatrixDouble > grad_h_ptr)
 
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 

Private Attributes

boost::shared_ptr< MatrixDouble > gradHPtr
 

Detailed Description

Lhs for H dU.

Parameters
h_field_nameName of the field associated with the row operator (H)
u_field_nameName of the field associated with the column operator (U)
grad_h_ptrPointer to the free surface height gradient matrix (∇H)
Returns
MoFEMErrorCode

(Jacobian block ∂R_H/∂U) Linearization of the conserved phase equation (Lovric 3.1c) w.r.t. U

Examples
mofem/tutorials/vec-5_free_surface/free_surface.cpp.

Definition at line 1091 of file FreeSurfaceOps.hpp.

Constructor & Destructor Documentation

◆ OpLhsH_dU()

FreeSurfaceOps::OpLhsH_dU::OpLhsH_dU ( const std::string  h_field_name,
const std::string  u_field_name,
boost::shared_ptr< MatrixDouble >  grad_h_ptr 
)
inline

Definition at line 1092 of file FreeSurfaceOps.hpp.

1094 : AssemblyDomainEleOp(h_field_name, u_field_name,
1095 AssemblyDomainEleOp::OPROWCOL),
1096 gradHPtr(grad_h_ptr) {
1097 sYmm = false;
1098 assembleTranspose = false;
1099 }
boost::shared_ptr< MatrixDouble > gradHPtr
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp

Member Function Documentation

◆ iNtegrate()

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

Definition at line 1100 of file FreeSurfaceOps.hpp.

1101 {
1103
1104 const double vol = getMeasure();
1105 auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*gradHPtr);
1106 auto t_coords = getFTensor1CoordsAtGaussPts();
1107
1108 auto t_row_base = row_data.getFTensor0N();
1109 auto t_w = getFTensor0IntegrationWeight();
1110
1111 for (int gg = 0; gg != nbIntegrationPts; gg++) {
1112
1113 const auto r = t_coords(0);
1114 const auto alpha = t_w * vol * cylindrical(r);
1115 auto t_mat = getFTensor1FromPtr<U_FIELD_DIM>(&locMat(0, 0));
1117
1118 int rr = 0;
1119 for (; rr != nbRows; ++rr) {
1120 t_row(i) = (alpha * t_row_base) * t_grad_h(i);
1121 auto t_col_base = col_data.getFTensor0N(gg, 0);
1122 for (int cc = 0; cc != nbCols / U_FIELD_DIM; ++cc) {
1123 t_mat(i) += t_row(i) * t_col_base;
1124 ++t_mat;
1125 ++t_col_base;
1126 }
1127 ++t_row_base;
1128 }
1129
1130 for (; rr < nbRowBaseFunctions; ++rr)
1131 ++t_row_base;
1132
1133 ++t_grad_h;
1134 ++t_w;
1135 ++t_coords;
1136 }
1137
1139 }
#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
int r
Definition sdf.py:205

Member Data Documentation

◆ gradHPtr

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

Definition at line 1142 of file FreeSurfaceOps.hpp.


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