497 const int nb_integration_pts = getGaussPts().size2();
498 const double area = getMeasure();
499 auto t_w = getFTensor0IntegrationWeight();
501 auto t_val_grad = getFTensor1FromMat<2>(*(
commonDataPtr->approxValsGrad));
502 auto t_flux = getFTensor1FromMat<3>(*(
commonDataPtr->approxFlux));
503 auto t_coords = getFTensor1CoordsAtGaussPts();
509 double error_ind = 0;
510 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
511 const double alpha = t_w * area;
514 t_coords(0), t_coords(1), t_coords(2));
515 error_l2 += alpha *
sqr(diff);
518 t_coords(0), t_coords(1), t_coords(2));
519 auto t_fun_grad = getFTensor1FromArray<2, 2>(vec);
520 t_diff(
i) = t_val_grad(
i) - t_fun_grad(
i);
521 error_h1 += alpha * t_diff(
i) * t_diff(
i);
523 t_diff(
i) = t_val_grad(
i) - t_flux(
i);
524 error_ind += alpha * t_diff(
i) * t_diff(
i);
534 Tag th_error_l2, th_error_h1, th_error_ind;
542 double error_l2_norm = sqrt(error_l2);
543 double error_h1_seminorm = sqrt(error_h1);
544 double error_ind_local = sqrt(error_ind);
555 constexpr std::array<int, CommonData::LAST_ELEMENT> indices = {
558 std::array<double, CommonData::LAST_ELEMENT> values;
559 values[0] = error_l2;
560 values[1] = error_h1;
561 values[2] = error_ind;
563 indices.data(), values.data(), ADD_VALUES);