v0.15.5
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 1087 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 1088 of file FreeSurfaceOps.hpp.

1090 : AssemblyDomainEleOp(h_field_name, u_field_name,
1091 AssemblyDomainEleOp::OPROWCOL),
1092 gradHPtr(grad_h_ptr) {
1093 sYmm = false;
1094 assembleTranspose = false;
1095 }
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 1096 of file FreeSurfaceOps.hpp.

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


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