v0.13.1
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
FreeSurfaceOps::OpLhsG_dH< I > Struct Template Reference

Lhs for H dH. More...

#include <users_modules/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 1049 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 1051 of file FreeSurfaceOps.hpp.

1053 : AssemblyDomainEleOp(field_name_g, field_name_h,
1054 AssemblyDomainEleOp::OPROWCOL),
1055 hPtr(h_ptr) {
1056 sYmm = false;
1057 assembleTranspose = false;
1058 }
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp
Definition: plastic.cpp:46
boost::shared_ptr< VectorDouble > hPtr

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 1060 of file FreeSurfaceOps.hpp.

1061 {
1063
1064 const double vol = getMeasure();
1065 auto t_h = getFTensor0FromVec(*hPtr);
1066
1067 auto t_row_base = row_data.getFTensor0N();
1068 auto t_row_diff_base = row_data.getFTensor1DiffN<SPACE_DIM>();
1069 auto t_w = getFTensor0IntegrationWeight();
1070 auto t_coords = getFTensor1CoordsAtGaussPts();
1071
1072 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
1073
1074 const double r = t_coords(0);
1075 const double alpha = t_w * vol * cylindrical(r);
1076
1077 const double f_dh = get_f_dh(t_h) * alpha;
1078 const double beta = eta2 * alpha;
1079
1080 int rr = 0;
1081 for (; rr != nbRows; ++rr) {
1082
1083 auto t_col_base = col_data.getFTensor0N(gg, 0);
1084 auto t_col_diff_base = col_data.getFTensor1DiffN<SPACE_DIM>(gg, 0);
1085
1086 for (int cc = 0; cc != nbCols; ++cc) {
1087
1088 if constexpr (I == false)
1089 locMat(rr, cc) -= (t_row_base * t_col_base) * f_dh;
1090 locMat(rr, cc) -= (t_row_diff_base(i) * beta) * t_col_diff_base(i);
1091
1092 ++t_col_base;
1093 ++t_col_diff_base;
1094 }
1095
1096 ++t_row_base;
1097 ++t_row_diff_base;
1098 }
1099
1100 for (; rr < nbRowBaseFunctions; ++rr) {
1101 ++t_row_base;
1102 ++t_row_diff_base;
1103 }
1104
1105 ++t_h;
1106 ++t_w;
1107 ++t_coords;
1108 }
1109
1111 }
static Index< 'I', 3 > I
constexpr int SPACE_DIM
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
auto cylindrical
auto get_f_dh
constexpr double eta2
FTensor::Index< 'i', SPACE_DIM > i
const double r
rate factor

Member Data Documentation

◆ hPtr

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

Definition at line 1114 of file FreeSurfaceOps.hpp.


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