From 79ba9dbb5fe4340a84baaf1b847d5dfeb5478885 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Tue, 12 Apr 2011 17:54:47 +0000 Subject: [PATCH] Fixed KellyErrorEstimator in codim one git-svn-id: https://svn.dealii.org/trunk@23579 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/deal.II/fe/fe_poly.templates.h | 126 +++++++++--------- .../deal.II/numerics/error_estimator.h | 32 ++--- deal.II/source/numerics/error_estimator.cc | 42 +++--- .../source/numerics/error_estimator.inst.in | 2 +- 4 files changed, 101 insertions(+), 101 deletions(-) diff --git a/deal.II/include/deal.II/fe/fe_poly.templates.h b/deal.II/include/deal.II/fe/fe_poly.templates.h index e397274e52..ac4f01733d 100644 --- a/deal.II/include/deal.II/fe/fe_poly.templates.h +++ b/deal.II/include/deal.II/fe/fe_poly.templates.h @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- // $Id$ // -// Copyright (C) 2006, 2007, 2008, 2009, 2010 by the deal.II authors +// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -508,68 +508,68 @@ fill_fe_face_values (const Mapping &mapping, //codimension 1 -template <> -inline -void -FE_Poly,1,2>::fill_fe_subface_values (const Mapping<1,2> &, - const Triangulation<1,2>::cell_iterator &, - const unsigned int, - const unsigned int, - const Quadrature<0> &, - Mapping<1,2>::InternalDataBase &, - Mapping<1,2>::InternalDataBase &, - FEValuesData<1,2> &) const -{ - AssertThrow(false, ExcNotImplemented()); -} - - -template <> -inline -void -FE_Poly,2,3>::fill_fe_subface_values (const Mapping<2,3> &, - const Triangulation<2,3>::cell_iterator &, - const unsigned int, - const unsigned int, - const Quadrature<1> &, - Mapping<2,3>::InternalDataBase &, - Mapping<2,3>::InternalDataBase &, - FEValuesData<2,3> &) const -{ - AssertThrow(false, ExcNotImplemented()); -} - - -template <> -inline -void -FE_Poly,1,2>::fill_fe_subface_values (const Mapping<1,2> &, - const Triangulation<1,2>::cell_iterator &, - const unsigned int, - const unsigned int, - const Quadrature<0> &, - Mapping<1,2>::InternalDataBase &, - Mapping<1,2>::InternalDataBase &, - FEValuesData<1,2> &) const -{ - AssertThrow(false, ExcNotImplemented()); -} - - -template <> -inline -void -FE_Poly,2,3>::fill_fe_subface_values (const Mapping<2,3> &, - const Triangulation<2,3>::cell_iterator &, - const unsigned int, - const unsigned int, - const Quadrature<1> &, - Mapping<2,3>::InternalDataBase &, - Mapping<2,3>::InternalDataBase &, - FEValuesData<2,3> &) const -{ - AssertThrow(false, ExcNotImplemented()); -} +// template <> +// inline +// void +// FE_Poly,1,2>::fill_fe_subface_values (const Mapping<1,2> &, +// const Triangulation<1,2>::cell_iterator &, +// const unsigned int, +// const unsigned int, +// const Quadrature<0> &, +// Mapping<1,2>::InternalDataBase &, +// Mapping<1,2>::InternalDataBase &, +// FEValuesData<1,2> &) const +// { +// AssertThrow(false, ExcNotImplemented()); +// } + + +// template <> +// inline +// void +// FE_Poly,2,3>::fill_fe_subface_values (const Mapping<2,3> &, +// const Triangulation<2,3>::cell_iterator &, +// const unsigned int, +// const unsigned int, +// const Quadrature<1> &, +// Mapping<2,3>::InternalDataBase &, +// Mapping<2,3>::InternalDataBase &, +// FEValuesData<2,3> &) const +// { +// AssertThrow(false, ExcNotImplemented()); +// } + + +// template <> +// inline +// void +// FE_Poly,1,2>::fill_fe_subface_values (const Mapping<1,2> &, +// const Triangulation<1,2>::cell_iterator &, +// const unsigned int, +// const unsigned int, +// const Quadrature<0> &, +// Mapping<1,2>::InternalDataBase &, +// Mapping<1,2>::InternalDataBase &, +// FEValuesData<1,2> &) const +// { +// AssertThrow(false, ExcNotImplemented()); +// } + + +// template <> +// inline +// void +// FE_Poly,2,3>::fill_fe_subface_values (const Mapping<2,3> &, +// const Triangulation<2,3>::cell_iterator &, +// const unsigned int, +// const unsigned int, +// const Quadrature<1> &, +// Mapping<2,3>::InternalDataBase &, +// Mapping<2,3>::InternalDataBase &, +// FEValuesData<2,3> &) const +// { +// AssertThrow(false, ExcNotImplemented()); +// } diff --git a/deal.II/include/deal.II/numerics/error_estimator.h b/deal.II/include/deal.II/numerics/error_estimator.h index 9381a6bc95..af647adcf4 100644 --- a/deal.II/include/deal.II/numerics/error_estimator.h +++ b/deal.II/include/deal.II/numerics/error_estimator.h @@ -592,11 +592,11 @@ class KellyErrorEstimator<1,spacedim> static void estimate (const Mapping<1,spacedim> &mapping, const DH &dof, const Quadrature<0> &quadrature, - const FunctionMap<1>::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const std::vector &component_mask = std::vector(), - const Function<1> *coefficients = 0, + const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, const unsigned int material_id = numbers::invalid_unsigned_int); @@ -609,11 +609,11 @@ class KellyErrorEstimator<1,spacedim> template static void estimate (const DH &dof, const Quadrature<0> &quadrature, - const FunctionMap<1>::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const std::vector &component_mask = std::vector(), - const Function<1> *coefficients = 0, + const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, const unsigned int material_id = numbers::invalid_unsigned_int); @@ -649,11 +649,11 @@ class KellyErrorEstimator<1,spacedim> static void estimate (const Mapping<1,spacedim> &mapping, const DH &dof, const Quadrature<0> &quadrature, - const FunctionMap<1>::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const std::vector &component_mask = std::vector(), - const Function<1> *coefficients = 0, + const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, const unsigned int material_id = numbers::invalid_unsigned_int); @@ -666,11 +666,11 @@ class KellyErrorEstimator<1,spacedim> template static void estimate (const DH &dof, const Quadrature<0> &quadrature, - const FunctionMap<1>::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const std::vector &component_mask = std::vector(), - const Function<1> *coefficients = 0, + const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, const unsigned int material_id = numbers::invalid_unsigned_int); @@ -686,11 +686,11 @@ class KellyErrorEstimator<1,spacedim> static void estimate (const Mapping<1,spacedim> &mapping, const DH &dof, const hp::QCollection<0> &quadrature, - const typename FunctionMap<1>::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const std::vector &component_mask = std::vector(), - const Function<1> *coefficients = 0, + const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, const unsigned int material_id = numbers::invalid_unsigned_int); @@ -705,11 +705,11 @@ class KellyErrorEstimator<1,spacedim> template static void estimate (const DH &dof, const hp::QCollection<0> &quadrature, - const typename FunctionMap<1>::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const std::vector &component_mask = std::vector(), - const Function<1> *coefficients = 0, + const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, const unsigned int material_id = numbers::invalid_unsigned_int); @@ -725,11 +725,11 @@ class KellyErrorEstimator<1,spacedim> static void estimate (const Mapping<1,spacedim> &mapping, const DH &dof, const hp::QCollection<0> &quadrature, - const typename FunctionMap<1>::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const std::vector &component_mask = std::vector(), - const Function<1> *coefficients = 0, + const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, const unsigned int material_id = numbers::invalid_unsigned_int); @@ -744,11 +744,11 @@ class KellyErrorEstimator<1,spacedim> template static void estimate (const DH &dof, const hp::QCollection<0> &quadrature, - const typename FunctionMap<1>::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const std::vector &component_mask = std::vector(), - const Function<1> *coefficients = 0, + const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, const unsigned int material_id = numbers::invalid_unsigned_int); diff --git a/deal.II/source/numerics/error_estimator.cc b/deal.II/source/numerics/error_estimator.cc index 534ede17c6..1cf9a83043 100644 --- a/deal.II/source/numerics/error_estimator.cc +++ b/deal.II/source/numerics/error_estimator.cc @@ -1008,11 +1008,11 @@ KellyErrorEstimator<1,spacedim>:: estimate (const Mapping<1,spacedim> &mapping, const DH &dof_handler, const Quadrature<0> &quadrature, - const FunctionMap<1>::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const std::vector &component_mask, - const Function<1> *coefficients, + const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, const unsigned int material_id) @@ -1032,11 +1032,11 @@ void KellyErrorEstimator<1,spacedim>:: estimate (const DH &dof_handler, const Quadrature<0> &quadrature, - const FunctionMap<1>::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const std::vector &component_mask, - const Function<1> *coefficients, + const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, const unsigned int material_id) @@ -1054,11 +1054,11 @@ void KellyErrorEstimator<1,spacedim>:: estimate (const DH &dof_handler, const Quadrature<0> &quadrature, - const FunctionMap<1>::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const std::vector &component_mask, - const Function<1> *coefficients, + const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, const unsigned int material_id) @@ -1077,11 +1077,11 @@ KellyErrorEstimator<1,spacedim>:: estimate (const Mapping<1,spacedim> &mapping, const DH &dof_handler, const hp::QCollection<0> &quadrature, - const FunctionMap<1>::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const std::vector &component_mask, - const Function<1> *coefficients, + const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, const unsigned int material_id) @@ -1100,11 +1100,11 @@ void KellyErrorEstimator<1,spacedim>:: estimate (const DH &dof_handler, const hp::QCollection<0> &quadrature, - const FunctionMap<1>::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const std::vector &component_mask, - const Function<1> *coefficients, + const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, const unsigned int material_id) @@ -1122,11 +1122,11 @@ void KellyErrorEstimator<1,spacedim>:: estimate (const DH &dof_handler, const hp::QCollection<0> &quadrature, - const FunctionMap<1>::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const std::vector &component_mask, - const Function<1> *coefficients, + const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, const unsigned int material_id) @@ -1145,11 +1145,11 @@ void KellyErrorEstimator<1,spacedim>:: estimate (const Mapping<1,spacedim> &/*mapping*/, const DH &/*dof_handler*/, const hp::QCollection<0> &, - const FunctionMap<1>::type &/*neumann_bc*/, + const typename FunctionMap::type &/*neumann_bc*/, const std::vector &/*solutions*/, std::vector*> &/*errors*/, const std::vector &/*component_mask_*/, - const Function<1> */*coefficient*/, + const Function */*coefficient*/, const unsigned int, const types::subdomain_id_t /*subdomain_id*/, const unsigned int /*material_id*/) @@ -1165,11 +1165,11 @@ void KellyErrorEstimator<1,spacedim>:: estimate (const Mapping<1,spacedim> &mapping, const DH &dof_handler, const Quadrature<0> &, - const FunctionMap<1>::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const std::vector &component_mask_, - const Function<1> *coefficient, + const Function *coefficient, const unsigned int, const types::subdomain_id_t subdomain_id_, const unsigned int material_id) @@ -1208,7 +1208,7 @@ estimate (const Mapping<1,spacedim> &mapping, Assert (neumann_bc.find(255) == neumann_bc.end(), ExcInvalidBoundaryIndicator()); - for (FunctionMap<1>::type::const_iterator i=neumann_bc.begin(); + for (typename FunctionMap::type::const_iterator i=neumann_bc.begin(); i!=neumann_bc.end(); ++i) Assert (i->second->n_components == n_components, ExcInvalidBoundaryFunction()); @@ -1245,7 +1245,7 @@ estimate (const Mapping<1,spacedim> &mapping, (coefficient->n_components == 1), ExcInvalidCoefficient()); - for (FunctionMap<1>::type::const_iterator i=neumann_bc.begin(); + for (typename FunctionMap::type::const_iterator i=neumann_bc.begin(); i!=neumann_bc.end(); ++i) Assert (i->second->n_components == n_components, ExcInvalidBoundaryFunction()); @@ -1262,10 +1262,10 @@ estimate (const Mapping<1,spacedim> &mapping, // need several auxiliary fields, // depending on the way we get it // (see below) - std::vector > > > + std::vector > > > gradients_here (n_solution_vectors, - std::vector > >(2, std::vector >(n_components))); - std::vector > > > + std::vector > >(2, std::vector >(n_components))); + std::vector > > > gradients_neighbor (gradients_here); std::vector > grad_neighbor (n_solution_vectors, Vector(n_components)); diff --git a/deal.II/source/numerics/error_estimator.inst.in b/deal.II/source/numerics/error_estimator.inst.in index 387828adad..da65ff9c7a 100644 --- a/deal.II/source/numerics/error_estimator.inst.in +++ b/deal.II/source/numerics/error_estimator.inst.in @@ -84,7 +84,7 @@ estimate > (const DH const unsigned int , \ const unsigned int);\ -#if deal_II_dimension == 2 +#if deal_II_dimension == 2 || deal_II_dimension == 1 #define INSTANTIATE_CODIM(InputVector,DH,Q) \ template \ -- 2.39.5