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

Lhs for G dH. More...

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

Inheritance diagram for FreeSurfaceOps::OpLhsU_dG:
[legend]
Collaboration diagram for FreeSurfaceOps::OpLhsU_dG:
[legend]

Public Member Functions

 OpLhsU_dG (const std::string field_name_u, const std::string field_name_h, 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 G dH.

Examples
free_surface.cpp.

Definition at line 732 of file FreeSurfaceOps.hpp.

Constructor & Destructor Documentation

◆ OpLhsU_dG()

FreeSurfaceOps::OpLhsU_dG::OpLhsU_dG ( const std::string field_name_u,
const std::string field_name_h,
boost::shared_ptr< MatrixDouble > grad_h_ptr )
inline

Definition at line 734 of file FreeSurfaceOps.hpp.

736 : AssemblyDomainEleOp(field_name_u, field_name_h,
737 AssemblyDomainEleOp::OPROWCOL),
738 gradHPtr(grad_h_ptr) {
739 sYmm = false;
740 assembleTranspose = false;
741 }
boost::shared_ptr< MatrixDouble > gradHPtr
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp

Member Function Documentation

◆ iNtegrate()

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

Definition at line 743 of file FreeSurfaceOps.hpp.

744 {
746
747 const double vol = getMeasure();
748 auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*gradHPtr);
749 auto t_coords = getFTensor1CoordsAtGaussPts();
750
751 auto t_row_base = row_data.getFTensor0N();
752 auto t_w = getFTensor0IntegrationWeight();
753
754 for (int gg = 0; gg != nbIntegrationPts; gg++) {
755
756 const double r = t_coords(0);
757 const double alpha = t_w * vol * cylindrical(r);
758
760 t_phase_force_dg(i) = -alpha * kappa * t_grad_h(i);
761
762 int rr = 0;
763 for (; rr != nbRows / U_FIELD_DIM; ++rr) {
764 auto t_mat =
765 getFTensor1FromMat<U_FIELD_DIM, 1>(locMat, rr * U_FIELD_DIM);
766 auto t_col_base = col_data.getFTensor0N(gg, 0);
767
768 for (int cc = 0; cc != nbCols; ++cc) {
769 const double bb = t_row_base * t_col_base;
770 t_mat(i) += t_phase_force_dg(i) * bb;
771
772 ++t_mat;
773 ++t_col_base;
774 }
775
776 ++t_row_base;
777 }
778
779 for (; rr < nbRowBaseFunctions; ++rr) {
780 ++t_row_base;
781 }
782
783 ++t_grad_h;
784 ++t_coords;
785 ++t_w;
786 }
787
789 }
#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 kappa
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::OpLhsU_dG::gradHPtr
private

Definition at line 792 of file FreeSurfaceOps.hpp.


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