v0.15.0
Loading...
Searching...
No Matches
FreeSurfaceOps::OpLhsH_dU Struct Reference

Lhs for H dU. More...

#include "tutorials/vec-5/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.

Examples
free_surface.cpp.

Definition at line 915 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 916 of file FreeSurfaceOps.hpp.

918 : AssemblyDomainEleOp(h_field_name, u_field_name,
919 AssemblyDomainEleOp::OPROWCOL),
920 gradHPtr(grad_h_ptr) {
921 sYmm = false;
922 assembleTranspose = false;
923 }
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 924 of file FreeSurfaceOps.hpp.

925 {
927
928 const double vol = getMeasure();
929 auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*gradHPtr);
930 auto t_coords = getFTensor1CoordsAtGaussPts();
931
932 auto t_row_base = row_data.getFTensor0N();
933 auto t_w = getFTensor0IntegrationWeight();
934
935 for (int gg = 0; gg != nbIntegrationPts; gg++) {
936
937 const auto r = t_coords(0);
938 const auto alpha = t_w * vol * cylindrical(r);
939 auto t_mat = getFTensor1FromPtr<U_FIELD_DIM>(&locMat(0, 0));
941
942 int rr = 0;
943 for (; rr != nbRows; ++rr) {
944 t_row(i) = (alpha * t_row_base) * t_grad_h(i);
945 auto t_col_base = col_data.getFTensor0N(gg, 0);
946 for (int cc = 0; cc != nbCols / U_FIELD_DIM; ++cc) {
947 t_mat(i) += t_row(i) * t_col_base;
948 ++t_mat;
949 ++t_col_base;
950 }
951 ++t_row_base;
952 }
953
954 for (; rr < nbRowBaseFunctions; ++rr)
955 ++t_row_base;
956
957 ++t_grad_h;
958 ++t_w;
959 ++t_coords;
960 }
961
963 }
#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
constexpr int U_FIELD_DIM
FTensor::Index< 'i', SPACE_DIM > i
int r
Definition sdf.py:8

Member Data Documentation

◆ gradHPtr

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

Definition at line 966 of file FreeSurfaceOps.hpp.


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