71 const Point<dim> centroid = reference_cell.template barycenter<dim>();
81 points.push_back(centroid);
88 for (
const auto &face_no : reference_cell.face_indices())
91 for (
const auto face_vertex_no :
92 reference_cell.face_reference_cell(0).vertex_indices())
94 const auto vertex_no =
95 reference_cell.face_to_cell_vertices(
101 reference_cell.template vertex<dim>(vertex_no);
105 reference_cell.face_reference_cell(0).n_vertices();
106 points.push_back(midpoint);
109 points.push_back(centroid);
136 const auto reference_cell = ReferenceCells::get_simplex<dim>();
137 const Point<dim> centroid = reference_cell.template barycenter<dim>();
139 auto M = [](
const unsigned int d) {
159 for (
const auto &vertex : reference_cell.vertex_indices())
160 c_bubble = c_bubble * M(vertex);
161 c_bubble = c_bubble / c_bubble.
value(centroid);
163 std::vector<BarycentricPolynomial<dim>> bubble_functions;
166 bubble_functions.push_back(c_bubble);
173 for (
const auto &face_no : reference_cell.face_indices())
176 for (
const auto face_vertex_no :
177 reference_cell.face_reference_cell(0).vertex_indices())
178 vertices.push_back(reference_cell.face_to_cell_vertices(
186 bubble_functions.push_back(b -
187 b.value(centroid) * c_bubble);
190 bubble_functions.push_back(c_bubble);
195 const std::vector<Point<dim>> support_points =
196 unit_support_points<dim>(degree);
197 const std::vector<Point<dim>> bubble_support_points(
198 support_points.begin() + fe_p.n(), support_points.end());
199 Assert(bubble_support_points.size() == bubble_functions.size(),
201 const unsigned int n_bubbles = bubble_support_points.size();
204 std::vector<BarycentricPolynomial<dim>> lump_polys;
205 for (
unsigned int i = 0; i < fe_p.n(); ++i)
209 for (
unsigned int j = 0; j < n_bubbles; ++j)
212 p.
value(bubble_support_points[j]) * bubble_functions[j];
215 lump_polys.push_back(p);
218 for (
auto &p : bubble_functions)
219 lump_polys.push_back(std::move(p));
224 for (
const auto &p : lump_polys)
228 for (
unsigned int d = 0; d < dim; ++d)