631 {
633 const int nb_integration_pts = getGaussPts().size2();
634 const double area = getMeasure();
635 auto t_w = getFTensor0IntegrationWeight();
637
638 double values_integ = 0;
639
640 for (int gg = 0; gg != nb_integration_pts; ++gg) {
641 const double alpha = t_w * area;
642
643 values_integ += alpha * t_val;
644
645 ++t_w;
646 ++t_val;
647 }
648
650 std::array<double, 1> values;
651 values[0] = values_integ;
653 ADD_VALUES);
655}
#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()
#define CHKERR
Inline error check.
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.