36 std::vector<Point<dim>>
37 unit_support_points_fe_poly_bubbles(
const unsigned int degree)
39 std::vector<Point<dim>> unit_points;
48 1.0 /
double(dim + 1));
49 unit_points.emplace_back(centroid);
60 unit_points.emplace_back(0.0);
61 unit_points.emplace_back(1.0);
64 unit_points.emplace_back(0.5);
72 unit_points.emplace_back(0.0, 0.0);
73 unit_points.emplace_back(1.0, 0.0);
74 unit_points.emplace_back(0.0, 1.0);
78 unit_points.emplace_back(0.5, 0.0);
79 unit_points.emplace_back(0.5, 0.5);
80 unit_points.emplace_back(0.0, 0.5);
89 unit_points.emplace_back(0.0, 0.0, 0.0);
90 unit_points.emplace_back(1.0, 0.0, 0.0);
91 unit_points.emplace_back(0.0, 1.0, 0.0);
92 unit_points.emplace_back(0.0, 0.0, 1.0);
96 unit_points.emplace_back(0.5, 0.0, 0.0);
97 unit_points.emplace_back(0.5, 0.5, 0.0);
98 unit_points.emplace_back(0.0, 0.5, 0.0);
99 unit_points.emplace_back(0.0, 0.0, 0.5);
100 unit_points.emplace_back(0.5, 0.0, 0.5);
101 unit_points.emplace_back(0.0, 0.5, 0.5);
117 std::vector<unsigned int>
120 std::vector<unsigned int> dpo(dim + 1);
147 std::vector<Point<dim>>
151 std::vector<Point<dim>> points =
152 unit_support_points_fe_poly_bubbles<dim>(degree);
165 points.push_back(centroid);
172 const double q13 = 1.0 / 3.0;
173 points.emplace_back(q13, q13, 0.0);
174 points.emplace_back(q13, 0.0, q13);
175 points.emplace_back(0.0, q13, q13);
176 points.emplace_back(q13, q13, q13);
177 points.push_back(centroid);
196 auto M = [](
const unsigned int d) {
216 for (
unsigned int d = 0;
d < dim + 1; ++
d)
217 c_bubble = c_bubble * M(
d);
218 c_bubble = c_bubble / c_bubble.
value(centroid);
220 std::vector<BarycentricPolynomial<dim>> bubble_functions;
223 bubble_functions.push_back(c_bubble);
230 auto b0 = 27 * M(0) * M(1) * M(2);
231 bubble_functions.push_back(b0 - b0.value(centroid) * c_bubble);
232 auto b1 = 27 * M(0) * M(1) * M(3);
233 bubble_functions.push_back(b1 - b1.value(centroid) * c_bubble);
234 auto b2 = 27 * M(0) * M(2) * M(3);
235 bubble_functions.push_back(b2 - b2.value(centroid) * c_bubble);
236 auto b3 = 27 * M(1) * M(2) * M(3);
237 bubble_functions.push_back(b3 - b3.value(centroid) * c_bubble);
239 bubble_functions.push_back(c_bubble);
244 const std::vector<Point<dim>> support_points =
245 unit_support_points<dim>(degree);
246 const std::vector<Point<dim>> bubble_support_points(
247 support_points.begin() + fe_p.n(), support_points.end());
248 Assert(bubble_support_points.size() == bubble_functions.size(),
250 const unsigned int n_bubbles = bubble_support_points.size();
253 std::vector<BarycentricPolynomial<dim>> lump_polys;
254 for (
unsigned int i = 0; i < fe_p.n(); ++i)
258 for (
unsigned int j = 0; j < n_bubbles; ++j)
261 p.
value(bubble_support_points[j]) * bubble_functions[j];
264 lump_polys.push_back(p);
267 for (
auto &p : bubble_functions)
268 lump_polys.push_back(std::move(p));
273 for (
const auto &p : lump_polys)
277 for (
unsigned int d = 0;
d < dim; ++
d)
303 const auto polys = get_basis<dim>(degree);
305 ReferenceCells::get_simplex<dim>(),
314template <
int dim,
int spacedim>
316 const unsigned int degree)
326 , approximation_degree(degree)
329 FE_P_BubblesImplementation::unit_support_points<dim>(
degree);
338template <
int dim,
int spacedim>
348template <
int dim,
int spacedim>
353 std::vector<double> & nodal_values)
const
356 this->get_unit_support_points().size());
360 for (
unsigned int i = 0; i < this->dofs_per_cell; ++i)
364 nodal_values[i] = support_point_values[i](0);
370template <
int dim,
int spacedim>
371std::unique_ptr<FiniteElement<dim, spacedim>>
374 return std::make_unique<FE_SimplexP_Bubbles<dim, spacedim>>(*this);
378#include "fe_simplex_p_bubbles.inst"
Number value(const Point< dim > &point) const
static BarycentricPolynomial< dim, Number > monomial(const unsigned int d)
static BarycentricPolynomials< dim > get_fe_p_basis(const unsigned int degree)
FE_SimplexP_Bubbles(const unsigned int degree)
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
virtual void convert_generalized_support_point_values_to_dof_values(const std::vector< Vector< double > > &support_point_values, std::vector< double > &nodal_values) const override
virtual std::string get_name() const override
const unsigned int degree
std::vector< Point< dim > > unit_support_points
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
std::string to_string(const T &t)
#define AssertDimension(dim1, dim2)
static ::ExceptionBase & ExcInternalError()
BarycentricPolynomials< dim > get_basis(const unsigned int degree)
std::vector< Point< dim > > unit_support_points(const unsigned int degree)
std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
FiniteElementData< dim > get_fe_data(const unsigned int degree)
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
std::string dim_string(const int dim, const int spacedim)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)