285 {
287
289
290 const int nb_integration_pts = getGaussPts().size2();
291 auto t_w = getFTensor0IntegrationWeight();
293 auto t_coords = getFTensor1CoordsAtGaussPts();
294
295 const double volume = getMeasure();
296
297 double error2 = 0;
298 for (int gg = 0; gg != nb_integration_pts; ++gg) {
299
300 const double alpha = t_w * volume;
302 t_coords(2));
303 error2 += alpha * (pow(diff, 2));
304
305 ++t_w;
306 ++t_val;
307 ++t_coords;
308 }
309
310 MOFEM_LOG(
"SELF", Sev::verbose) <<
"Boundary error " << sqrt(error2);
311
312 constexpr double eps = 1e-8;
313 if (sqrt(error2) >
eps)
315 "Error on boundary = %6.4e", sqrt(error2));
316
318 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_ATOM_TEST_INVALID
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MOFEM_LOG(channel, severity)
Log.
FTensor::Index< 'i', SPACE_DIM > i
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
static ApproxFieldFunction< FIELD_DIM > approxFunction