v0.15.0
Loading...
Searching...
No Matches
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)
 

Private Attributes

boost::shared_ptr< MatrixDoublevelPtr
 

Detailed Description

Examples
level_set.cpp.

Definition at line 426 of file level_set.cpp.

Constructor & Destructor Documentation

◆ OpLhsDomain()

LevelSet::OpLhsDomain::OpLhsDomain ( const std::string field_name,
boost::shared_ptr< MatrixDouble > vel_ptr )
Examples
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 & row_data,
EntData & col_data )
Examples
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
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
auto getFTensor2FromPtr(double *ptr)
Make Tensor2 from pointer.
FTensor::Tensor1< FTensor::PackPtr< T *, S >, Tensor_Dim > getFTensor1FromMat(ublas::matrix< T, L, A > &data)
Get tensor rank 1 (vector) form data matrix.
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.

Member Data Documentation

◆ velPtr

boost::shared_ptr<MatrixDouble> LevelSet::OpLhsDomain::velPtr
private
Examples
level_set.cpp.

Definition at line 432 of file level_set.cpp.


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