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

Lhs for G dH. More...

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

540 : AssemblyDomainEleOp(field_name_u, field_name_h,
541 AssemblyDomainEleOp::OPROWCOL),
542 gradHPtr(grad_h_ptr) {
543 sYmm = false;
544 assembleTranspose = false;
545 }
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp
Definition: plastic.cpp:46
boost::shared_ptr< MatrixDouble > gradHPtr

Member Function Documentation

◆ iNtegrate()

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

Definition at line 547 of file FreeSurfaceOps.hpp.

548 {
550
551 const double vol = getMeasure();
552 auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*gradHPtr);
553 auto t_coords = getFTensor1CoordsAtGaussPts();
554
555 auto t_row_base = row_data.getFTensor0N();
556 auto t_w = getFTensor0IntegrationWeight();
557
558 for (int gg = 0; gg != nbIntegrationPts; gg++) {
559
560 const double r = t_coords(0);
561 const double alpha = t_w * vol * cylindrical(r);
562
564 t_phase_force_dg(i) = -alpha * kappa * t_grad_h(i);
565
566 int rr = 0;
567 for (; rr != nbRows / U_FIELD_DIM; ++rr) {
568 auto t_mat =
569 getFTensor1FromMat<U_FIELD_DIM, 1>(locMat, rr * U_FIELD_DIM);
570 auto t_col_base = col_data.getFTensor0N(gg, 0);
571
572 for (int cc = 0; cc != nbCols; ++cc) {
573 const double bb = t_row_base * t_col_base;
574 t_mat(i) += t_phase_force_dg(i) * bb;
575
576 ++t_mat;
577 ++t_col_base;
578 }
579
580 ++t_row_base;
581 }
582
583 for (; rr < nbRowBaseFunctions; ++rr) {
584 ++t_row_base;
585 }
586
587 ++t_grad_h;
588 ++t_coords;
589 ++t_w;
590 }
591
593 }
#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
constexpr int U_FIELD_DIM
const double kappa
FTensor::Index< 'i', SPACE_DIM > i
const double r
rate factor

Member Data Documentation

◆ gradHPtr

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

Definition at line 596 of file FreeSurfaceOps.hpp.


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