No Matches
Public Member Functions | Private Attributes | List of all members
LevelSet::OpLhsDomain Struct Reference
Inheritance diagram for LevelSet::OpLhsDomain:
Collaboration diagram for LevelSet::OpLhsDomain:

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. More...
- 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)
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. More...
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntData &row_data)
 Do calculations for the right hand side. More...

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
- Public Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
TimeFun timeScalingFun
 assumes that time variable is set More...
FEFun feScalingFun
 assumes that time variable is set More...
boost::shared_ptr< RangeentsPtr
 Entities on which element is run. More...
- Protected Member Functions inherited from MoFEM::OpBaseImpl< A, EleOp >
template<int DIM>
FTensor::Tensor1< FTensor::PackPtr< double *, DIM >, DIM > getNf ()
template<int DIM>
FTensor::Tensor2< FTensor::PackPtr< double *, DIM >, DIM, DIM > getLocMat (const int rr)
virtual MoFEMErrorCode iNtegrate (EntData &row_data, EntData &col_data)
 Integrate grad-grad operator. More...
virtual MoFEMErrorCode aSsemble (EntData &row_data, EntData &col_data, const bool trans)
virtual MoFEMErrorCode iNtegrate (EntData &data)
 Class dedicated to integrate operator. More...
virtual MoFEMErrorCode aSsemble (EntData &data)
- Protected Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
int nbRows
 number of dofs on rows More...
int nbCols
 number if dof on column More...
int nbIntegrationPts
 number of integration points More...
int nbRowBaseFunctions
 number or row base functions More...
int rowSide
 row side number More...
int colSide
 column side number More...
EntityType rowType
 row type More...
EntityType colType
 column type More...
bool assembleTranspose
bool onlyTranspose
MatrixDouble locMat
 local entity block matrix More...
MatrixDouble locMatTranspose
 local entity block matrix More...
VectorDouble locF
 local entity vector More...

Detailed Description


Definition at line 394 of file level_set.cpp.

Constructor & Destructor Documentation

◆ OpLhsDomain()

LevelSet::OpLhsDomain::OpLhsDomain ( const std::string  field_name,
boost::shared_ptr< MatrixDouble >  vel_ptr 

Definition at line 555 of file level_set.cpp.

558 AssemblyDomainEleOp::OPROWCOL),
559 velPtr(vel_ptr) {
560 this->sYmm = false;
constexpr auto field_name
boost::shared_ptr< MatrixDouble > velPtr
Definition: level_set.cpp:400
FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase AssemblyDomainEleOp
Definition: level_set.cpp:319

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode LevelSet::OpLhsDomain::iNtegrate ( EntData row_data,
EntData col_data 

Integrate grad-grad operator.

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

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


Definition at line 617 of file level_set.cpp.

618 {
621 const auto nb_int_points = getGaussPts().size2();
622 const auto nb_base_func = row_data.getN().size2();
623 const auto nb_row_dofs = row_data.getIndices().size();
624 const auto nb_col_dofs = col_data.getIndices().size();
626 auto t_vel = getFTensor1FromMat<SPACE_DIM>(*velPtr);
628 auto t_row_base = row_data.getFTensor0N();
629 auto t_row_diff_base = row_data.getFTensor1DiffN<SPACE_DIM>();
631 auto t_w = getFTensor0IntegrationWeight();
632 for (auto gg = 0; gg != nb_int_points; ++gg) {
633 const auto alpha = t_w * getMeasure();
634 const auto beta = alpha * getTSa();
635 ++t_w;
637 auto &mat = this->locMat;
639 int rr = 0;
640 for (; rr != nb_row_dofs; ++rr) {
641 auto t_col_base = col_data.getFTensor0N(gg, 0);
642 for (int cc = 0; cc != nb_col_dofs; ++cc) {
643 mat(rr, cc) +=
644 (beta * t_row_base - alpha * (t_row_diff_base(i) * t_vel(i))) *
645 t_col_base;
646 ++t_col_base;
647 }
648 ++t_row_base;
649 ++t_row_diff_base;
650 }
651 for (; rr < nb_base_func; ++rr) {
652 ++t_row_base;
653 ++t_row_diff_base;
654 }
656 ++t_vel;
657 }
#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
FTensor::Index< 'i', SPACE_DIM > i
Definition: level_set.cpp:544
constexpr int SPACE_DIM
[Define dimension]
Definition: level_set.cpp:17
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorInt & getIndices() const
Get global indices of dofs on entity.
MatrixDouble locMat
local entity block matrix

Member Data Documentation

◆ velPtr

boost::shared_ptr<MatrixDouble> LevelSet::OpLhsDomain::velPtr

Definition at line 400 of file level_set.cpp.

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