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

Private Attributes

boost::shared_ptr< MatrixDoublelPtr
 
boost::shared_ptr< MatrixDoublelDotPtr
 
boost::shared_ptr< MatrixDoublevelPtr
 

Detailed Description

Examples
level_set.cpp.

Definition at line 412 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
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 & data)
Examples
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
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
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::Tensor2< FTensor::PackPtr< double *, 1 >, Tensor_Dim1, Tensor_Dim2 > getFTensor2FromMat(MatrixDouble &data)
Get tensor rank 2 (matrix) 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

◆ lDotPtr

boost::shared_ptr<MatrixDouble> LevelSet::OpRhsDomain::lDotPtr
private
Examples
level_set.cpp.

Definition at line 422 of file level_set.cpp.

◆ lPtr

boost::shared_ptr<MatrixDouble> LevelSet::OpRhsDomain::lPtr
private
Examples
level_set.cpp.

Definition at line 421 of file level_set.cpp.

◆ velPtr

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

Definition at line 423 of file level_set.cpp.


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