Class dedicated to integrate operator.
575 {
577
578 const auto nb_int_points = getGaussPts().size2();
579 const auto nb_dofs = data.
getIndices().size();
580 const auto nb_base_func = data.
getN().size2();
581
584 auto t_vel = getFTensor1FromMat<SPACE_DIM>(*
velPtr);
585
588
589 auto t_w = getFTensor0IntegrationWeight();
590 for (auto gg = 0; gg != nb_int_points; ++gg) {
591 const auto alpha = t_w * getMeasure();
592 auto res0 =
alpha * t_l_dot;
594 t_res1(
i) = (
alpha * t_l) * t_vel(
i);
595 ++t_w;
596 ++t_l;
597 ++t_l_dot;
598 ++t_vel;
599
600 auto &nf = this->
locF;
601
602 int rr = 0;
603 for (; rr != nb_dofs; ++rr) {
604 nf(rr) += res0 * t_base - t_res1(
i) * t_diff_base(
i);
605 ++t_base;
606 ++t_diff_base;
607 }
608 for (; rr < nb_base_func; ++rr) {
609 ++t_base;
610 ++t_diff_base;
611 }
612 }
613
615}
#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]
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
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.
VectorDouble locF
local entity vector