* the default configuration for smoothness estimation purposes.
*
* For each finite element of the provided @p fe_collection, we use as many
- * modes as its polynomial degree plus one, since we start with the first
- * Legendre polynomial which is just a constant. Further for each element,
- * we use a Gaussian quadrature designed to yield exact results for the
- * highest order Legendre polynomial used.
+ * modes as its polynomial degree plus two. This includes the first Legendre
+ * polynomial which is just a constant. Further for each element, we use a
+ * Gaussian quadrature designed to yield exact results for the highest order
+ * Legendre polynomial used.
*/
template <int dim, int spacedim>
FESeries::Legendre<dim, spacedim>
default_fe_series(const hp::FECollection<dim, spacedim> &fe_collection)
{
// Default number of coefficients per direction.
+ //
+ // With a number of modes equal to the polynomial degree plus two for each
+ // finite element, the smoothness estimation algorithm tends to produce
+ // stable results.
std::vector<unsigned int> n_coefficients_per_direction;
for (unsigned int i = 0; i < fe_collection.size(); ++i)
- n_coefficients_per_direction.push_back(fe_collection[i].degree + 1);
+ n_coefficients_per_direction.push_back(fe_collection[i].degree + 2);
// Default quadrature collection.
//