570 auto find_block_data = [&]() {
574 if (
m.second.block_ents.find(fe_ent) !=
m.second.block_ents.end()) {
575 block_raw_ptr = &
m.second;
579 return block_raw_ptr;
582 auto block_data_ptr = find_block_data();
586 auto &block_data = *block_data_ptr;
589 auto t_grad = getFTensor1FromMat<2>(
prevData->grads);
593 const double vol = getMeasure();
594 const int nb_integration_pts = getGaussPts().size2();
595 auto t_w = getFTensor0IntegrationWeight();
597 CHKERR TSGetTimeStep(getFEMethod()->ts, &
dt);
598 double ct = getFEMethod()->ts_t -
dt;
599 auto t_coords = getFTensor1CoordsAtGaussPts();
604 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
605 const double a = vol * t_w;
607 double mass_exact =
exactVal(t_coords(
NX), t_coords(
NY), ct);
609 -block_data.B0 *
exactLap(t_coords(
NX), t_coords(
NY), ct);
617 pow(block_data.B0, 2) * (pow(flux_exact(0) - t_grad(0), 2) +
618 pow(flux_exact(1) - t_grad(1), 2));
620 double local_error = pow(mass_exact - t_value, 2);
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
FTensor::Index< 'j', 3 > j
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
FTensor::Index< 'm', 3 > m
const VectorDouble & getFieldData() const
get dofs values
const VectorDofs & getFieldDofs() const
get dofs data stature FEDofEntity