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

Lhs for H dU. More...

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

722 : AssemblyDomainEleOp(h_field_name, u_field_name,
723 AssemblyDomainEleOp::OPROWCOL),
724 gradHPtr(grad_h_ptr) {
725 sYmm = false;
726 assembleTranspose = false;
727 }
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp
Definition: plastic.cpp:46
boost::shared_ptr< MatrixDouble > gradHPtr

Member Function Documentation

◆ iNtegrate()

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

Definition at line 728 of file FreeSurfaceOps.hpp.

729 {
731
732 const double vol = getMeasure();
733 auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*gradHPtr);
734 auto t_coords = getFTensor1CoordsAtGaussPts();
735
736 auto t_row_base = row_data.getFTensor0N();
737 auto t_w = getFTensor0IntegrationWeight();
738
739 for (int gg = 0; gg != nbIntegrationPts; gg++) {
740
741 const double alpha = t_w * vol;
742 auto t_mat = getFTensor1FromPtr<U_FIELD_DIM>(&locMat(0, 0));
743
744 int rr = 0;
745 for (; rr != nbRows; ++rr) {
746 auto t_col_base = col_data.getFTensor0N(gg, 0);
747 for (int cc = 0; cc != nbCols / U_FIELD_DIM; ++cc) {
748 t_mat(i) += (t_row_base * t_col_base * alpha) * t_grad_h(i);
749 ++t_mat;
750 ++t_col_base;
751 }
752 ++t_row_base;
753 }
754
755 for (; rr < nbRowBaseFunctions; ++rr)
756 ++t_row_base;
757
758 ++t_grad_h;
759 ++t_w;
760 }
761
763 }
#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
constexpr int U_FIELD_DIM
FTensor::Index< 'i', SPACE_DIM > i

Member Data Documentation

◆ gradHPtr

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

Definition at line 766 of file FreeSurfaceOps.hpp.


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