v0.16.3
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
LevelSet::OpLhsDomain Struct Reference
Inheritance diagram for LevelSet::OpLhsDomain:
[legend]
Collaboration diagram for LevelSet::OpLhsDomain:
[legend]

Public Member Functions

 OpLhsDomain (const std::string field_name, boost::shared_ptr< MatrixDouble > vel_ptr)
 
MoFEMErrorCode iNtegrate (EntData &row_data, EntData &col_data)
 Integrate grad-grad operator.
 
- Public Member Functions inherited from MoFEM::OpBaseImpl< A, EleOp >
 OpBaseImpl (const std::string row_field_name, const std::string col_field_name, const OpType type, boost::shared_ptr< Range > ents_ptr=nullptr)
 Constructor for base operator implementation.
 
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 Do calculations for the left hand side.
 
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntData &row_data)
 Do calculations for the right hand side.
 

Private Attributes

boost::shared_ptr< MatrixDouble > velPtr
 

Additional Inherited Members

- Public Types inherited from MoFEM::OpBaseImpl< A, EleOp >
using OpType = typename EleOp::OpType
 
using EntData = EntitiesFieldData::EntData
 
using MatSetValuesHook = boost::function< MoFEMErrorCode(ForcesAndSourcesCore::UserDataOperator *op_ptr, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, MatrixDouble &m)>
 
- Public Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
TimeFun timeScalingFun
 assumes that time variable is set
 
FEFun feScalingFun
 set by fe entity handle
 
boost::shared_ptr< Range > entsPtr
 Entities on which element is run.
 
- Static Public Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
static MatSetValuesHook matSetValuesHook
 
- Protected Member Functions inherited from MoFEM::OpBaseImpl< A, EleOp >
template<int DIM>
auto getNf ()
 Get local vector tensor for assembly.
 
template<int ROW_DIM, int COL_DIM = ROW_DIM>
FTensor::Tensor2< FTensor::PackPtr< double *, COL_DIM >, ROW_DIM, COL_DIM > getLocMat (const int rr)
 Get local matrix tensor for assembly.
 
virtual MoFEMErrorCode aSsemble (EntData &row_data, EntData &col_data, const bool trans)
 Assemble local matrix into global matrix.
 
virtual MoFEMErrorCode iNtegrate (EntData &)
 Class dedicated to integrate operator.
 
virtual MoFEMErrorCode aSsemble (EntData &data)
 Assemble local vector into global vector.
 
virtual size_t getNbOfBaseFunctions (EntitiesFieldData::EntData &data)
 Get number of base functions.
 
- Protected Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
int nbRows
 number of dofs on rows
 
int nbCols
 number if dof on column
 
int nbIntegrationPts
 number of integration points
 
int nbRowBaseFunctions
 number or row base functions
 
int rowSide
 row side number
 
int colSide
 column side number
 
EntityType rowType
 row type
 
EntityType colType
 column type
 
bool assembleTranspose
 
bool onlyTranspose
 
MatrixDouble locMat
 local entity block matrix
 
MatrixDouble locMatTranspose
 local entity block matrix
 
VectorDouble locF
 local entity vector
 

Detailed Description

Examples
mofem/tutorials/adv-3_level_set/level_set.cpp.

Definition at line 427 of file level_set.cpp.

Constructor & Destructor Documentation

◆ OpLhsDomain()

LevelSet::OpLhsDomain::OpLhsDomain ( const std::string  field_name,
boost::shared_ptr< MatrixDouble >  vel_ptr 
)
Examples
mofem/tutorials/adv-3_level_set/level_set.cpp.

Definition at line 590 of file level_set.cpp.

593 AssemblyDomainEleOp::OPROWCOL),
594 velPtr(vel_ptr) {
595 this->sYmm = false;
596}
constexpr auto field_name
boost::shared_ptr< MatrixDouble > velPtr
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode LevelSet::OpLhsDomain::iNtegrate ( EntData &  ,
EntData &   
)
virtual

Integrate grad-grad operator.

Parameters
row_datarow data (consist base functions on row entity)
col_datacolumn data (consist base functions on column entity)
Returns
error code

Reimplemented from MoFEM::OpBaseImpl< A, EleOp >.

Examples
mofem/tutorials/adv-3_level_set/level_set.cpp.

Definition at line 655 of file level_set.cpp.

656 {
658
659 const auto nb_int_points = getGaussPts().size2();
660 const auto nb_base_func = row_data.getN().size2();
661 const auto nb_row_dofs = row_data.getIndices().size();
662 const auto nb_col_dofs = col_data.getIndices().size();
663
664 auto t_vel = getFTensor1FromMat<SPACE_DIM>(*velPtr);
665
666 auto t_row_base = row_data.getFTensor0N();
667 auto t_row_diff_base = row_data.getFTensor1DiffN<SPACE_DIM>();
668
669 auto t_w = getFTensor0IntegrationWeight();
670 for (auto gg = 0; gg != nb_int_points; ++gg) {
671 const auto alpha = t_w * getMeasure();
672 const auto beta = alpha * getTSa();
673 ++t_w;
674
675 auto &mat = this->locMat;
676
677 int rr = 0;
678 for (; rr != nb_row_dofs; ++rr) {
679 auto t_col_base = col_data.getFTensor0N(gg, 0);
680 auto t_mat = getFTensor2FromPtr<DIM1, DIM2>(&mat(rr * DIM1, 0));
681 for (int cc = 0; cc != nb_col_dofs; ++cc) {
682 t_mat(I, J) +=
683 (beta * t_row_base - alpha * (t_row_diff_base(i) * t_vel(i))) *
684 t_col_base;
685 ++t_col_base;
686 ++t_mat;
687 }
688 ++t_row_base;
689 ++t_row_diff_base;
690 }
691 for (; rr < nb_base_func; ++rr) {
692 ++t_row_base;
693 ++t_row_diff_base;
694 }
695
696 ++t_vel;
697 }
698
700}
#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()
FTensor::Index< 'I', DIM1 > I
Definition level_set.cpp:29
FTensor::Index< 'i', SPACE_DIM > i
constexpr int SPACE_DIM
Definition level_set.cpp:20
FTensor::Index< 'J', DIM1 > J
Definition level_set.cpp:30
constexpr int DIM1
Definition level_set.cpp:21
MatrixDouble locMat
local entity block matrix

Member Data Documentation

◆ velPtr

boost::shared_ptr<MatrixDouble> LevelSet::OpLhsDomain::velPtr
private
Examples
mofem/tutorials/adv-3_level_set/level_set.cpp.

Definition at line 433 of file level_set.cpp.


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