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

Public Member Functions

 OpRhsDomain (const std::string field_name, boost::shared_ptr< MatrixDouble > l_ptr, boost::shared_ptr< MatrixDouble > l_dot_ptr, boost::shared_ptr< MatrixDouble > vel_ptr)
 
MoFEMErrorCode iNtegrate (EntData &data)
 Class dedicated to integrate 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 > lPtr
 
boost::shared_ptr< MatrixDouble > lDotPtr
 
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 iNtegrate (EntData &, EntData &)
 Integrate grad-grad operator.
 
virtual MoFEMErrorCode aSsemble (EntData &row_data, EntData &col_data, const bool trans)
 Assemble local matrix into global matrix.
 
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 413 of file level_set.cpp.

Constructor & Destructor Documentation

◆ OpRhsDomain()

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

Definition at line 583 of file level_set.cpp.

587 : AssemblyDomainEleOp(field_name, field_name, AssemblyDomainEleOp::OPROW),
588 lPtr(l_ptr), lDotPtr(l_dot_ptr), velPtr(vel_ptr) {}
constexpr auto field_name
boost::shared_ptr< MatrixDouble > lPtr
boost::shared_ptr< MatrixDouble > velPtr
boost::shared_ptr< MatrixDouble > lDotPtr
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode LevelSet::OpRhsDomain::iNtegrate ( EntData &  )
virtual

Class dedicated to integrate operator.

Parameters
dataentity data on element row
Returns
error code

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

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

Definition at line 610 of file level_set.cpp.

610 {
612
613 const auto nb_int_points = getGaussPts().size2();
614 const auto nb_dofs = data.getIndices().size();
615 const auto nb_base_func = data.getN().size2();
616
617 auto t_l = getFTensor2FromMat<DIM1, DIM2>(*lPtr);
618 auto t_l_dot = getFTensor2FromMat<DIM1, DIM2>(*lDotPtr);
619 auto t_vel = getFTensor1FromMat<SPACE_DIM>(*velPtr);
620
621 auto t_base = data.getFTensor0N();
622 auto t_diff_base = data.getFTensor1DiffN<SPACE_DIM>();
623
624 auto t_w = getFTensor0IntegrationWeight();
625 for (auto gg = 0; gg != nb_int_points; ++gg) {
626 const auto alpha = t_w * getMeasure();
628 t_res0(I, J) = alpha * t_l_dot(I, J);
630 t_res1(i, I, J) = (alpha * t_l(I, J)) * t_vel(i);
631 ++t_w;
632 ++t_l;
633 ++t_l_dot;
634 ++t_vel;
635
636 auto &nf = this->locF;
637 auto t_nf = getFTensor2FromPtr<DIM1, DIM2>(&*nf.begin());
638
639 int rr = 0;
640 for (; rr != nb_dofs; ++rr) {
641 t_nf(I, J) += t_res0(I, J) * t_base - t_res1(i, I, J) * t_diff_base(i);
642 ++t_base;
643 ++t_diff_base;
644 ++t_nf;
645 }
646 for (; rr < nb_base_func; ++rr) {
647 ++t_base;
648 ++t_diff_base;
649 }
650 }
651
653}
#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
VectorDouble locF
local entity vector

Member Data Documentation

◆ lDotPtr

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

Definition at line 423 of file level_set.cpp.

◆ lPtr

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

Definition at line 422 of file level_set.cpp.

◆ velPtr

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

Definition at line 424 of file level_set.cpp.


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