963 {
965 const int nb_integration_pts = getGaussPts().size2();
966 const double area = getMeasure();
967 auto t_w = getFTensor0IntegrationWeight();
969
970 double values_integ = 0;
971
972#ifdef ENABLE_PYTHON_BINDING
976 sens_vals_vec =
979 }
980#endif
981
982 for (int gg = 0; gg != nb_integration_pts; ++gg) {
983
984 double sens = 1;
985#ifdef ENABLE_PYTHON_BINDING
987 sens = sens_vals_vec(gg);
988 }
989#endif
990
991 const double alpha = t_w * area * sens;
992
993 values_integ += alpha * t_val;
994
995 ++t_w;
996 ++t_val;
997 }
998
1000 std::array<double, 1>
values;
1001 values[0] = values_integ;
1003 ADD_VALUES);
1005}
SmartPetscObj< Vec > values
#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.
UBlasVector< double > VectorDouble
static auto getFTensor0FromVec(V &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.
VectorDouble interp_function(const std::string sens_image, MatrixDouble &m_ref_coords, int nb_gauss_pts, double cam_len_x, double cam_len_y, const std::string block_name)
char interp_image_name[255]