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

#include <users_modules/tutorials/vec-5/src/FreeSurfaceOps.hpp>

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

Public Member Functions

 OpRhsG (const std::string field_name, boost::shared_ptr< VectorDouble > h_ptr, boost::shared_ptr< MatrixDouble > grad_h_ptr, boost::shared_ptr< VectorDouble > g_ptr)
 
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &data)
 

Private Attributes

boost::shared_ptr< VectorDouble > hPtr
 
boost::shared_ptr< MatrixDouble > gradHPtr
 
boost::shared_ptr< VectorDouble > gPtr
 

Detailed Description

template<bool I>
struct FreeSurfaceOps::OpRhsG< I >
Examples
free_surface.cpp.

Definition at line 981 of file FreeSurfaceOps.hpp.

Constructor & Destructor Documentation

◆ OpRhsG()

template<bool I>
FreeSurfaceOps::OpRhsG< I >::OpRhsG ( const std::string  field_name,
boost::shared_ptr< VectorDouble >  h_ptr,
boost::shared_ptr< MatrixDouble >  grad_h_ptr,
boost::shared_ptr< VectorDouble >  g_ptr 
)
inline

Definition at line 983 of file FreeSurfaceOps.hpp.

986 : AssemblyDomainEleOp(field_name, field_name, AssemblyDomainEleOp::OPROW),
987 hPtr(h_ptr), gradHPtr(grad_h_ptr), gPtr(g_ptr) {}
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp
Definition: plastic.cpp:46
constexpr auto field_name
boost::shared_ptr< MatrixDouble > gradHPtr
boost::shared_ptr< VectorDouble > hPtr
boost::shared_ptr< VectorDouble > gPtr

Member Function Documentation

◆ iNtegrate()

template<bool I>
MoFEMErrorCode FreeSurfaceOps::OpRhsG< I >::iNtegrate ( EntitiesFieldData::EntData &  data)
inline

Definition at line 989 of file FreeSurfaceOps.hpp.

989 {
991
992 const double vol = getMeasure();
993 auto t_h = getFTensor0FromVec(*hPtr);
994 auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*gradHPtr);
995 auto t_g = getFTensor0FromVec(*gPtr);
996 auto t_coords = getFTensor1CoordsAtGaussPts();
997
998 auto t_base = data.getFTensor0N();
999 auto t_diff_base = data.getFTensor1DiffN<SPACE_DIM>();
1000 auto t_w = getFTensor0IntegrationWeight();
1001
1002 for (int gg = 0; gg != nbIntegrationPts; ++gg) {
1003
1004 const double r = t_coords(0);
1005 const double alpha = t_w * vol * cylindrical(r);
1006
1007 double set_h;
1008 if constexpr (I)
1009 set_h = init_h(t_coords(0), t_coords(1), t_coords(2));
1010 else
1011 set_h = t_h;
1012
1013 const double f = get_f(set_h);
1014
1015 int bb = 0;
1016 for (; bb != nbRows; ++bb) {
1017 locF[bb] += (t_base * alpha) * (t_g - f);
1018 locF[bb] -= (t_diff_base(i) * (eta2 * alpha)) * t_grad_h(i);
1019 ++t_base;
1020 ++t_diff_base;
1021 }
1022
1023 for (; bb < nbRowBaseFunctions; ++bb) {
1024 ++t_base;
1025 ++t_diff_base;
1026 }
1027
1028 ++t_h;
1029 ++t_grad_h;
1030 ++t_g;
1031
1032 ++t_coords;
1033 ++t_w;
1034 }
1035
1037 }
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 init_h
constexpr double eta2
auto get_f
FTensor::Index< 'i', SPACE_DIM > i
auto f
Definition: HenckyOps.hpp:5
const double r
rate factor

Member Data Documentation

◆ gPtr

template<bool I>
boost::shared_ptr<VectorDouble> FreeSurfaceOps::OpRhsG< I >::gPtr
private

Definition at line 1042 of file FreeSurfaceOps.hpp.

◆ gradHPtr

template<bool I>
boost::shared_ptr<MatrixDouble> FreeSurfaceOps::OpRhsG< I >::gradHPtr
private

Definition at line 1041 of file FreeSurfaceOps.hpp.

◆ hPtr

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

Definition at line 1040 of file FreeSurfaceOps.hpp.


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