v0.15.0
Loading...
Searching...
No Matches
FreeSurfaceOps::OpLhsG_dH< I > Struct Template Reference

Lhs for H dH. More...

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

Inheritance diagram for FreeSurfaceOps::OpLhsG_dH< I >:
[legend]
Collaboration diagram for FreeSurfaceOps::OpLhsG_dH< I >:
[legend]

Public Member Functions

 OpLhsG_dH (const std::string field_name_g, const std::string field_name_h, boost::shared_ptr< VectorDouble > h_ptr)
 
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 

Private Attributes

boost::shared_ptr< VectorDouble > hPtr
 

Detailed Description

template<bool I>
struct FreeSurfaceOps::OpLhsG_dH< I >

Lhs for H dH.

Examples
free_surface.cpp.

Definition at line 1249 of file FreeSurfaceOps.hpp.

Constructor & Destructor Documentation

◆ OpLhsG_dH()

template<bool I>
FreeSurfaceOps::OpLhsG_dH< I >::OpLhsG_dH ( const std::string field_name_g,
const std::string field_name_h,
boost::shared_ptr< VectorDouble > h_ptr )
inline

Definition at line 1251 of file FreeSurfaceOps.hpp.

1253 : AssemblyDomainEleOp(field_name_g, field_name_h,
1254 AssemblyDomainEleOp::OPROWCOL),
1255 hPtr(h_ptr) {
1256 sYmm = false;
1257 assembleTranspose = false;
1258 }
boost::shared_ptr< VectorDouble > hPtr
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp

Member Function Documentation

◆ iNtegrate()

template<bool I>
MoFEMErrorCode FreeSurfaceOps::OpLhsG_dH< I >::iNtegrate ( EntitiesFieldData::EntData & row_data,
EntitiesFieldData::EntData & col_data )
inline

Definition at line 1260 of file FreeSurfaceOps.hpp.

1261 {
1263
1264 const double vol = getMeasure();
1265 auto t_h = getFTensor0FromVec(*hPtr);
1266
1267 auto t_row_base = row_data.getFTensor0N();
1268 auto t_row_diff_base = row_data.getFTensor1DiffN<SPACE_DIM>();
1269 auto t_w = getFTensor0IntegrationWeight();
1270 auto t_coords = getFTensor1CoordsAtGaussPts();
1271
1272 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
1273
1274 const double r = t_coords(0);
1275 const double alpha = t_w * vol * cylindrical(r);
1276
1277 const double f_dh = get_f_dh(t_h) * alpha;
1278 const double beta = eta2 * alpha;
1279
1280 int rr = 0;
1281 for (; rr != nbRows; ++rr) {
1282
1283 auto t_col_base = col_data.getFTensor0N(gg, 0);
1284 auto t_col_diff_base = col_data.getFTensor1DiffN<SPACE_DIM>(gg, 0);
1285
1286 for (int cc = 0; cc != nbCols; ++cc) {
1287
1288 if constexpr (I == false)
1289 locMat(rr, cc) -= (t_row_base * t_col_base) * f_dh;
1290 locMat(rr, cc) -= (t_row_diff_base(i) * beta) * t_col_diff_base(i);
1291
1292 ++t_col_base;
1293 ++t_col_diff_base;
1294 }
1295
1296 ++t_row_base;
1297 ++t_row_diff_base;
1298 }
1299
1300 for (; rr < nbRowBaseFunctions; ++rr) {
1301 ++t_row_base;
1302 ++t_row_diff_base;
1303 }
1304
1305 ++t_h;
1306 ++t_w;
1307 ++t_coords;
1308 }
1309
1311 }
constexpr int SPACE_DIM
#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
double eta2
auto get_f_dh
FTensor::Index< 'i', SPACE_DIM > i
int r
Definition sdf.py:8
constexpr IntegrationType I

Member Data Documentation

◆ hPtr

template<bool I>
boost::shared_ptr<VectorDouble> FreeSurfaceOps::OpLhsG_dH< I >::hPtr
private

Definition at line 1314 of file FreeSurfaceOps.hpp.


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