From: Wolfgang Bangerth Date: Fri, 17 Nov 2017 16:42:59 +0000 (-0700) Subject: Change the boundary value type to match the vector type. X-Git-Tag: v9.0.0-rc1~734^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e511d205eb6fa21f45efe973d4bc1b4687844f3;p=dealii.git Change the boundary value type to match the vector type. --- diff --git a/include/deal.II/numerics/error_estimator.h b/include/deal.II/numerics/error_estimator.h index 6247cfdf2c..92f846d8e4 100644 --- a/include/deal.II/numerics/error_estimator.h +++ b/include/deal.II/numerics/error_estimator.h @@ -330,7 +330,7 @@ public: (const Mapping &mapping, const DoFHandlerType &dof, const Quadrature &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const ComponentMask &component_mask = ComponentMask(), @@ -348,7 +348,7 @@ public: static void estimate (const DoFHandlerType &dof, const Quadrature &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const ComponentMask &component_mask = ComponentMask(), @@ -376,7 +376,7 @@ public: (const Mapping &mapping, const DoFHandlerType &dof, const Quadrature &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const ComponentMask &component_mask = ComponentMask(), @@ -394,7 +394,7 @@ public: static void estimate (const DoFHandlerType &dof, const Quadrature &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const ComponentMask &component_mask = ComponentMask(), @@ -414,7 +414,7 @@ public: (const Mapping &mapping, const DoFHandlerType &dof, const hp::QCollection &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const ComponentMask &component_mask = ComponentMask(), @@ -433,7 +433,7 @@ public: static void estimate (const DoFHandlerType &dof, const hp::QCollection &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const ComponentMask &component_mask = ComponentMask(), @@ -453,7 +453,7 @@ public: (const Mapping &mapping, const DoFHandlerType &dof, const hp::QCollection &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const ComponentMask &component_mask = ComponentMask(), @@ -472,7 +472,7 @@ public: static void estimate (const DoFHandlerType &dof, const hp::QCollection &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const ComponentMask &component_mask = ComponentMask(), @@ -576,7 +576,7 @@ public: (const Mapping<1,spacedim> &mapping, const DoFHandlerType &dof, const Quadrature<0> &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const ComponentMask &component_mask = ComponentMask(), @@ -593,7 +593,7 @@ public: static void estimate (const DoFHandlerType &dof, const Quadrature<0> &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const ComponentMask &component_mask = ComponentMask(), @@ -620,7 +620,7 @@ public: (const Mapping<1,spacedim> &mapping, const DoFHandlerType &dof, const Quadrature<0> &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const ComponentMask &component_mask = ComponentMask(), @@ -637,7 +637,7 @@ public: static void estimate (const DoFHandlerType &dof, const Quadrature<0> &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const ComponentMask &component_mask = ComponentMask(), @@ -656,7 +656,7 @@ public: (const Mapping<1,spacedim> &mapping, const DoFHandlerType &dof, const hp::QCollection<0> &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const ComponentMask &component_mask = ComponentMask(), @@ -674,7 +674,7 @@ public: static void estimate (const DoFHandlerType &dof, const hp::QCollection<0> &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const ComponentMask &component_mask = ComponentMask(), @@ -693,7 +693,7 @@ public: (const Mapping<1,spacedim> &mapping, const DoFHandlerType &dof, const hp::QCollection<0> &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const ComponentMask &component_mask = ComponentMask(), @@ -711,7 +711,7 @@ public: static void estimate (const DoFHandlerType &dof, const hp::QCollection<0> &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const ComponentMask &component_mask = ComponentMask(), diff --git a/include/deal.II/numerics/error_estimator.templates.h b/include/deal.II/numerics/error_estimator.templates.h index b0e8d70213..dc3a7fa53e 100644 --- a/include/deal.II/numerics/error_estimator.templates.h +++ b/include/deal.II/numerics/error_estimator.templates.h @@ -169,9 +169,9 @@ namespace internal * Some more references to input data to the * KellyErrorEstimator::estimate() function. */ - const typename FunctionMap::type *neumann_bc; - const ComponentMask component_mask; - const Function *coefficients; + const typename FunctionMap::type *neumann_bc; + const ComponentMask component_mask; + const Function *coefficients; /** * Constructor. @@ -184,7 +184,7 @@ namespace internal const unsigned int n_solution_vectors, const types::subdomain_id subdomain_id, const types::material_id material_id, - const typename FunctionMap::type *neumann_bc, + const typename FunctionMap::type *neumann_bc, const ComponentMask &component_mask, const Function *coefficients); @@ -208,7 +208,7 @@ namespace internal const unsigned int n_solution_vectors, const types::subdomain_id subdomain_id, const types::material_id material_id, - const typename FunctionMap::type *neumann_bc, + const typename FunctionMap::type *neumann_bc, const ComponentMask &component_mask, const Function *coefficients) : @@ -420,7 +420,7 @@ namespace internal // get the values of the boundary function at the quadrature points if (n_components == 1) { - std::vector g(n_q_points); + std::vector g(n_q_points); parallel_data.neumann_bc->find(boundary_id)->second ->value_list (fe_face_values_cell.get_present_fe_values() .get_quadrature_points(), g); @@ -431,8 +431,8 @@ namespace internal } else { - std::vector > - g(n_q_points, dealii::Vector(n_components)); + std::vector > + g(n_q_points, dealii::Vector(n_components)); parallel_data.neumann_bc->find(boundary_id)->second ->vector_value_list (fe_face_values_cell.get_present_fe_values() .get_quadrature_points(), @@ -971,7 +971,7 @@ KellyErrorEstimator:: estimate (const Mapping &mapping, const DoFHandlerType &dof_handler, const Quadrature &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const ComponentMask &component_mask, @@ -995,7 +995,7 @@ void KellyErrorEstimator:: estimate (const DoFHandlerType &dof_handler, const Quadrature &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const ComponentMask &component_mask, @@ -1018,7 +1018,7 @@ KellyErrorEstimator:: estimate (const Mapping &mapping, const DoFHandlerType &dof_handler, const hp::QCollection &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const ComponentMask &component_mask, @@ -1042,7 +1042,7 @@ void KellyErrorEstimator:: estimate (const DoFHandlerType &dof_handler, const hp::QCollection &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const ComponentMask &component_mask, @@ -1067,7 +1067,7 @@ KellyErrorEstimator:: estimate (const Mapping &mapping, const DoFHandlerType &dof_handler, const hp::QCollection &face_quadratures, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const ComponentMask &component_mask, @@ -1113,7 +1113,7 @@ estimate (const Mapping &mapping, Assert (solutions.size() == errors.size(), ExcIncompatibleNumberOfElements(solutions.size(), errors.size())); - for (typename FunctionMap::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(i->first, @@ -1231,7 +1231,7 @@ KellyErrorEstimator:: estimate (const Mapping &mapping, const DoFHandlerType &dof_handler, const Quadrature &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const ComponentMask &component_mask, @@ -1255,7 +1255,7 @@ template void KellyErrorEstimator::estimate (const DoFHandlerType &dof_handler, const Quadrature &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const ComponentMask &component_mask, @@ -1277,7 +1277,7 @@ template void KellyErrorEstimator::estimate (const DoFHandlerType &dof_handler, const hp::QCollection &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const ComponentMask &component_mask, diff --git a/source/numerics/error_estimator.inst.in b/source/numerics/error_estimator.inst.in index 4fac2a9289..5c45b395c0 100644 --- a/source/numerics/error_estimator.inst.in +++ b/source/numerics/error_estimator.inst.in @@ -31,7 +31,7 @@ for (VEC : VECTOR_TYPES ; deal_II_dimension : DIMENSIONS; deal_II_space_dimensio estimate > (const Mapping &, const DH &, const Quadrature &, - const FunctionMap::type &, + const FunctionMap::type &, const VEC &, Vector &, const ComponentMask &, @@ -47,7 +47,7 @@ for (VEC : VECTOR_TYPES ; deal_II_dimension : DIMENSIONS; deal_II_space_dimensio estimate > ( const DH &, const Quadrature &, - const FunctionMap::type &, + const FunctionMap::type &, const VEC &, Vector &, const ComponentMask &, @@ -63,7 +63,7 @@ for (VEC : VECTOR_TYPES ; deal_II_dimension : DIMENSIONS; deal_II_space_dimensio estimate > (const Mapping &, const DH &, const Quadrature &, - const FunctionMap::type &, + const FunctionMap::type &, const std::vector &, std::vector *> &, const ComponentMask &, @@ -79,7 +79,7 @@ for (VEC : VECTOR_TYPES ; deal_II_dimension : DIMENSIONS; deal_II_space_dimensio estimate > ( const DH &, const Quadrature &, - const FunctionMap::type &, + const FunctionMap::type &, const std::vector &, std::vector *> &, const ComponentMask &, @@ -95,7 +95,7 @@ for (VEC : VECTOR_TYPES ; deal_II_dimension : DIMENSIONS; deal_II_space_dimensio estimate > (const Mapping &, const DH &, const hp::QCollection &, - const FunctionMap::type &, + const FunctionMap::type &, const VEC &, Vector &, const ComponentMask &, @@ -111,7 +111,7 @@ for (VEC : VECTOR_TYPES ; deal_II_dimension : DIMENSIONS; deal_II_space_dimensio estimate > ( const DH &, const hp::QCollection &, - const FunctionMap::type &, + const FunctionMap::type &, const VEC &, Vector &, const ComponentMask &, @@ -127,7 +127,7 @@ for (VEC : VECTOR_TYPES ; deal_II_dimension : DIMENSIONS; deal_II_space_dimensio estimate > (const Mapping &, const DH &, const hp::QCollection &, - const FunctionMap::type &, + const FunctionMap::type &, const std::vector &, std::vector *> &, const ComponentMask &, @@ -143,7 +143,7 @@ for (VEC : VECTOR_TYPES ; deal_II_dimension : DIMENSIONS; deal_II_space_dimensio estimate > ( const DH &, const hp::QCollection &, - const FunctionMap::type &, + const FunctionMap::type &, const std::vector &, std::vector *> &, const ComponentMask &, diff --git a/source/numerics/error_estimator_1d.cc b/source/numerics/error_estimator_1d.cc index 0211ca4c88..3d85f3f562 100644 --- a/source/numerics/error_estimator_1d.cc +++ b/source/numerics/error_estimator_1d.cc @@ -58,7 +58,7 @@ KellyErrorEstimator<1,spacedim>:: estimate (const Mapping<1,spacedim> &mapping, const DoFHandlerType &dof_handler, const Quadrature<0> &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const ComponentMask &component_mask, @@ -82,7 +82,7 @@ void KellyErrorEstimator<1,spacedim>:: estimate (const DoFHandlerType &dof_handler, const Quadrature<0> &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const ComponentMask &component_mask, @@ -103,7 +103,7 @@ void KellyErrorEstimator<1,spacedim>:: estimate (const DoFHandlerType &dof_handler, const Quadrature<0> &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const ComponentMask &component_mask, @@ -125,7 +125,7 @@ KellyErrorEstimator<1,spacedim>:: estimate (const Mapping<1,spacedim> &mapping, const DoFHandlerType &dof_handler, const hp::QCollection<0> &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const ComponentMask &component_mask, @@ -148,7 +148,7 @@ void KellyErrorEstimator<1,spacedim>:: estimate (const DoFHandlerType &dof_handler, const hp::QCollection<0> &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const InputVector &solution, Vector &error, const ComponentMask &component_mask, @@ -169,7 +169,7 @@ void KellyErrorEstimator<1,spacedim>:: estimate (const DoFHandlerType &dof_handler, const hp::QCollection<0> &quadrature, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const ComponentMask &component_mask, @@ -191,7 +191,7 @@ void KellyErrorEstimator<1,spacedim>:: estimate (const Mapping<1,spacedim> & /*mapping*/, const DoFHandlerType & /*dof_handler*/, const hp::QCollection<0> &, - const typename FunctionMap::type & /*neumann_bc*/, + const typename FunctionMap::type & /*neumann_bc*/, const std::vector & /*solutions*/, std::vector*> & /*errors*/, const ComponentMask & /*component_mask_*/, @@ -211,7 +211,7 @@ void KellyErrorEstimator<1,spacedim>:: estimate (const Mapping<1,spacedim> &mapping, const DoFHandlerType &dof_handler, const Quadrature<0> &, - const typename FunctionMap::type &neumann_bc, + const typename FunctionMap::type &neumann_bc, const std::vector &solutions, std::vector*> &errors, const ComponentMask &component_mask, @@ -257,7 +257,7 @@ estimate (const Mapping<1,spacedim> &mapping, "indicator for internal boundaries in your boundary " "value map.")); - for (typename FunctionMap::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(i->first, @@ -288,7 +288,7 @@ estimate (const Mapping<1,spacedim> &mapping, (coefficient->n_components == 1), ExcInvalidCoefficient()); - for (typename FunctionMap::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(i->first, @@ -395,7 +395,7 @@ estimate (const Mapping<1,spacedim> &mapping, { if (n_components==1) { - const double + const typename InputVector::value_type v = neumann_bc.find(n)->second->value(cell->vertex(n)); for (unsigned int s=0; s &mapping, } else { - Vector v(n_components); + Vector v(n_components); neumann_bc.find(n)->second->vector_value(cell->vertex(n), v); for (unsigned int s=0; s > (const Mapping &, const DH &, const Quadrature &, - const FunctionMap::type &, + const FunctionMap::type &, const VEC &, Vector &, const ComponentMask &, @@ -39,7 +39,7 @@ for (VEC : VECTOR_TYPES ; deal_II_dimension : DIMENSIONS; deal_II_space_dimensio estimate > ( const DH &, const Quadrature &, - const FunctionMap::type &, + const FunctionMap::type &, const VEC &, Vector &, const ComponentMask &, @@ -54,7 +54,7 @@ for (VEC : VECTOR_TYPES ; deal_II_dimension : DIMENSIONS; deal_II_space_dimensio estimate > (const Mapping &, const DH &, const Quadrature &, - const FunctionMap::type &, + const FunctionMap::type &, const std::vector &, std::vector *> &, const ComponentMask &, @@ -69,7 +69,7 @@ for (VEC : VECTOR_TYPES ; deal_II_dimension : DIMENSIONS; deal_II_space_dimensio estimate > ( const DH &, const Quadrature &, - const FunctionMap::type &, + const FunctionMap::type &, const std::vector &, std::vector *> &, const ComponentMask &, @@ -84,7 +84,7 @@ for (VEC : VECTOR_TYPES ; deal_II_dimension : DIMENSIONS; deal_II_space_dimensio estimate > (const Mapping &, const DH &, const hp::QCollection &, - const FunctionMap::type &, + const FunctionMap::type &, const VEC &, Vector &, const ComponentMask &, @@ -99,7 +99,7 @@ for (VEC : VECTOR_TYPES ; deal_II_dimension : DIMENSIONS; deal_II_space_dimensio estimate > ( const DH &, const hp::QCollection &, - const FunctionMap::type &, + const FunctionMap::type &, const VEC &, Vector &, const ComponentMask &, @@ -114,7 +114,7 @@ for (VEC : VECTOR_TYPES ; deal_II_dimension : DIMENSIONS; deal_II_space_dimensio estimate > (const Mapping &, const DH &, const hp::QCollection &, - const FunctionMap::type &, + const FunctionMap::type &, const std::vector &, std::vector *> &, const ComponentMask &, @@ -129,7 +129,7 @@ for (VEC : VECTOR_TYPES ; deal_II_dimension : DIMENSIONS; deal_II_space_dimensio estimate > ( const DH &, const hp::QCollection &, - const FunctionMap::type &, + const FunctionMap::type &, const std::vector &, std::vector *> &, const ComponentMask &,