From: Fabian Castelli Date: Mon, 11 Oct 2021 14:37:42 +0000 (+0200) Subject: KellyErrorEstimator<1,spacedim> with hp X-Git-Tag: v9.4.0-rc1~943^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e0b637950690bf5d07c5e9f9aa1c6a9710c4222;p=dealii.git KellyErrorEstimator<1,spacedim> with hp --- diff --git a/include/deal.II/numerics/error_estimator.h b/include/deal.II/numerics/error_estimator.h index 765065ee1a..dc5704092e 100644 --- a/include/deal.II/numerics/error_estimator.h +++ b/include/deal.II/numerics/error_estimator.h @@ -599,6 +599,8 @@ public: cell_diameter }; + + /** * Implementation of the error estimator described above. You may give a * coefficient, but there is a default value which denotes the constant @@ -639,6 +641,8 @@ public: const types::material_id material_id = numbers::invalid_material_id, const Strategy strategy = cell_diameter_over_24); + + /** * Call the @p estimate function, see above, with * mapping=MappingQ1<1>(). @@ -660,6 +664,8 @@ public: const types::material_id material_id = numbers::invalid_material_id, const Strategy strategy = cell_diameter_over_24); + + /** * Same function as above, but accepts more than one solution vectors and * returns one error vector for each solution vector. For the reason of @@ -691,6 +697,8 @@ public: const types::material_id material_id = numbers::invalid_material_id, const Strategy strategy = cell_diameter_over_24); + + /** * Call the @p estimate function, see above, with * mapping=MappingQ1<1>(). @@ -713,6 +721,7 @@ public: const Strategy strategy = cell_diameter_over_24); + /** * Equivalent to the set of functions above, except that this one takes a * quadrature collection for hp-finite element dof handlers. @@ -736,6 +745,7 @@ public: const Strategy strategy = cell_diameter_over_24); + /** * Equivalent to the set of functions above, except that this one takes a * quadrature collection for hp-finite element dof handlers. @@ -758,6 +768,7 @@ public: const Strategy strategy = cell_diameter_over_24); + /** * Equivalent to the set of functions above, except that this one takes a * quadrature collection for hp-finite element dof handlers. @@ -781,6 +792,7 @@ public: const Strategy strategy = cell_diameter_over_24); + /** * Equivalent to the set of functions above, except that this one takes a * quadrature collection for hp-finite element dof handlers. @@ -802,6 +814,8 @@ public: const types::material_id material_id = numbers::invalid_material_id, const Strategy strategy = cell_diameter_over_24); + + /** * Exception */ @@ -813,6 +827,7 @@ public: "of vector components of the finite element in use " "by the DoFHandler object. In the latter case, at " "least one component needs to be selected."); + /** * Exception */ @@ -824,6 +839,7 @@ public: "scalar (has one vector component) or has as many vector " "components as there are in the finite element used by " "the DoFHandler argument."); + /** * Exception */ @@ -837,6 +853,7 @@ public: "element in use has " << arg3 << " components, and these two numbers need to match."); + /** * Exception */ @@ -847,6 +864,7 @@ public: << " needs to be equal to the number of output vectors, " << arg2 << ". This is not the case in your call of this function."); + /** * Exception */ @@ -856,7 +874,6 @@ public: }; - DEAL_II_NAMESPACE_CLOSE #endif diff --git a/source/numerics/error_estimator_1d.cc b/source/numerics/error_estimator_1d.cc index 2e0368c6c3..e96a834b64 100644 --- a/source/numerics/error_estimator_1d.cc +++ b/source/numerics/error_estimator_1d.cc @@ -55,7 +55,6 @@ DEAL_II_NAMESPACE_OPEN - template template void @@ -199,6 +198,7 @@ KellyErrorEstimator<1, spacedim>::estimate( } + template template void @@ -267,37 +267,13 @@ KellyErrorEstimator<1, spacedim>::estimate( -template -template -void -KellyErrorEstimator<1, spacedim>::estimate( - const Mapping<1, spacedim> & /*mapping*/, - const DoFHandler<1, spacedim> & /*dof_handler*/, - const hp::QCollection<0> &, - const std::map *> - & /*neumann_bc*/, - const std::vector & /*solutions*/, - std::vector *> & /*errors*/, - const ComponentMask & /*component_mask_*/, - const Function * /*coefficient*/, - const unsigned int, - const types::subdomain_id /*subdomain_id*/, - const types::material_id /*material_id*/, - const Strategy /*strategy*/) -{ - Assert(false, ExcInternalError()); -} - - - template template void KellyErrorEstimator<1, spacedim>::estimate( const Mapping<1, spacedim> & mapping, const DoFHandler<1, spacedim> &dof_handler, - const Quadrature<0> &, + const hp::QCollection<0> &, const std::map *> & neumann_bc, @@ -548,6 +524,43 @@ KellyErrorEstimator<1, spacedim>::estimate( } + +template +template +void +KellyErrorEstimator<1, spacedim>::estimate( + const Mapping<1, spacedim> & mapping, + const DoFHandler<1, spacedim> &dof_handler, + const Quadrature<0> & quadrature, + const std::map *> + & neumann_bc, + const std::vector &solutions, + std::vector *> & errors, + const ComponentMask & component_mask, + const Function * coefficients, + const unsigned int n_threads, + const types::subdomain_id subdomain_id, + const types::material_id material_id, + const Strategy strategy) +{ + const hp::QCollection<0> quadrature_collection(quadrature); + estimate(mapping, + dof_handler, + quadrature_collection, + neumann_bc, + solutions, + errors, + component_mask, + coefficients, + n_threads, + subdomain_id, + material_id, + strategy); +} + + + // explicit instantiations #include "error_estimator_1d.inst"