19SamePoint(
const mfem::IntegrationPoint & a,
const mfem::IntegrationPoint & b,
const int dim)
29 mfem::ElementTransformation & T,
30 const mfem::IntegrationPoint & ip)
const
32 const mfem::QuadratureSpaceBase & qspace = *qf.GetSpace();
33 const int el_idx = qspace.GetEntityIndex(T);
38 const mfem::Geometry::Type geom = qspace.GetGeometry(el_idx);
39 const int dim = mfem::Geometry::Dimension[geom];
40 const mfem::IntegrationRule & stored_rule = qspace.GetIntRule(el_idx);
43 if (ip.index < stored_rule.Size() && SamePoint(stored_rule.IntPoint(ip.index), ip,
dim))
49 const int stored_order = qspace.GetOrder();
50 int suggested_order = -1;
55 for (
int order = 0; order <= 2 * stored_order + 64; ++order)
57 const mfem::IntegrationRule & candidate = mfem::IntRules.Get(geom, order);
58 if (ip.index < candidate.Size() && SamePoint(candidate.IntPoint(ip.index), ip,
dim))
60 suggested_order = order;
65 if (suggested_order >= 0)
68 "' stores values on the order-",
72 " points on this element), but it is being evaluated by an integrator using a "
73 "different quadrature rule (",
74 mfem::IntRules.Get(geom, suggested_order).Size(),
75 " points). The stored values are indexed by quadrature point, so the orders must "
76 "match. Set 'order = ",
84 "' stores values on the order-",
86 " quadrature rule, but it is being evaluated by an integrator using a different "
87 "quadrature rule. The stored values are indexed by quadrature point, so the orders "
88 "must match; adjust 'order' on '",
90 "' to match the consuming integrator.");