955 {
957 const int nb_integration_pts = getGaussPts().size2();
958 const double area = getMeasure();
959 auto t_w = getFTensor0IntegrationWeight();
961
962 double values_integ = 0;
963
964#ifdef ENABLE_PYTHON_BINDING
968 sens_vals_vec =
971 }
972#endif
973
974 for (int gg = 0; gg != nb_integration_pts; ++gg) {
975
976 double sens = 1;
977#ifdef ENABLE_PYTHON_BINDING
979 sens = sens_vals_vec(gg);
980 }
981#endif
982
983 const double alpha = t_w * area * sens;
984
985 values_integ += alpha * t_val;
986
987 ++t_w;
988 ++t_val;
989 }
990
992 std::array<double, 1> values;
993 values[0] = values_integ;
995 ADD_VALUES);
997}
#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]