Integrate grad-grad operator.
618 {
620
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();
625
626 auto t_vel = getFTensor1FromMat<SPACE_DIM>(*
velPtr);
627
630
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;
636
638
639 int rr = 0;
640 for (; rr != nb_row_dofs; ++rr) {
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 }
655
656 ++t_vel;
657 }
658
660}
#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', SPACE_DIM > i
constexpr int SPACE_DIM
[Define dimension]
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