From ae7369673f008785f06a1757dd20ee926973d5cb Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Tue, 5 Jan 2021 21:14:59 -0700 Subject: [PATCH] Adjusted settings for default FESeries::Legendre object. --- include/deal.II/numerics/smoothness_estimator.h | 8 ++++---- source/numerics/smoothness_estimator.cc | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/deal.II/numerics/smoothness_estimator.h b/include/deal.II/numerics/smoothness_estimator.h index 7aa7200d62..b0d11b6531 100644 --- a/include/deal.II/numerics/smoothness_estimator.h +++ b/include/deal.II/numerics/smoothness_estimator.h @@ -228,10 +228,10 @@ namespace SmoothnessEstimator * 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 FESeries::Legendre diff --git a/source/numerics/smoothness_estimator.cc b/source/numerics/smoothness_estimator.cc index 82c651701c..fa7c0c3c41 100644 --- a/source/numerics/smoothness_estimator.cc +++ b/source/numerics/smoothness_estimator.cc @@ -290,9 +290,13 @@ namespace SmoothnessEstimator default_fe_series(const hp::FECollection &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 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. // -- 2.39.5