]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid FunctionMap in code base
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 11 Jun 2018 14:53:59 +0000 (16:53 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 14 Jun 2018 08:05:26 +0000 (10:05 +0200)
39 files changed:
examples/step-13/step-13.cc
examples/step-14/step-14.cc
examples/step-15/step-15.cc
examples/step-16/step-16.cc
examples/step-17/step-17.cc
examples/step-18/step-18.cc
examples/step-22/step-22.cc
examples/step-26/step-26.cc
examples/step-27/step-27.cc
examples/step-28/step-28.cc
examples/step-31/step-31.cc
examples/step-32/step-32.cc
examples/step-40/step-40.cc
examples/step-42/step-42.cc
examples/step-45/step-45.cc
examples/step-46/doc/intro.dox
examples/step-46/step-46.cc
examples/step-50/step-50.cc
examples/step-51/step-51.cc
examples/step-55/step-55.cc
examples/step-57/step-57.cc
examples/step-6/step-6.cc
examples/step-7/step-7.cc
examples/step-8/step-8.cc
include/deal.II/dofs/dof_handler.h
include/deal.II/hp/dof_handler.h
include/deal.II/multigrid/mg_constrained_dofs.h
include/deal.II/multigrid/mg_tools.h
include/deal.II/numerics/error_estimator.h
include/deal.II/numerics/error_estimator.templates.h
include/deal.II/numerics/matrix_tools.h
include/deal.II/numerics/vector_tools.h
include/deal.II/numerics/vector_tools.templates.h
source/multigrid/mg_tools.cc
source/multigrid/mg_tools.inst.in
source/numerics/error_estimator.inst.in
source/numerics/error_estimator_1d.cc
source/numerics/error_estimator_1d.inst.in
source/numerics/vector_tools_constraints.inst.in

index 6dd3566ef3e7857a2c7a5f4d7e3f5a0b1471176b..6d06b10df04823f81ab9d0785d4417f579b1a2b3 100644 (file)
@@ -1239,11 +1239,12 @@ namespace Step13
     {
       Vector<float> estimated_error_per_cell(
         this->triangulation->n_active_cells());
-      KellyErrorEstimator<dim>::estimate(this->dof_handler,
-                                         QGauss<dim - 1>(3),
-                                         typename FunctionMap<dim>::type(),
-                                         this->solution,
-                                         estimated_error_per_cell);
+      KellyErrorEstimator<dim>::estimate(
+        this->dof_handler,
+        QGauss<dim - 1>(3),
+        std::map<types::boundary_id, const Function<dim> *>(),
+        this->solution,
+        estimated_error_per_cell);
       GridRefinement::refine_and_coarsen_fixed_number(*this->triangulation,
                                                       estimated_error_per_cell,
                                                       0.3,
index 34c3db408cb4f145de4679ecf5a7946a6fdbfd92..94db5a16e83f49fc8e7b1128c004ce22dbc2f0a4 100644 (file)
@@ -894,11 +894,12 @@ namespace Step14
     {
       Vector<float> estimated_error_per_cell(
         this->triangulation->n_active_cells());
-      KellyErrorEstimator<dim>::estimate(this->dof_handler,
-                                         QGauss<dim - 1>(3),
-                                         typename FunctionMap<dim>::type(),
-                                         this->solution,
-                                         estimated_error_per_cell);
+      KellyErrorEstimator<dim>::estimate(
+        this->dof_handler,
+        QGauss<dim - 1>(3),
+        std::map<types::boundary_id, const Function<dim> *>(),
+        this->solution,
+        estimated_error_per_cell);
       GridRefinement::refine_and_coarsen_fixed_number(*this->triangulation,
                                                       estimated_error_per_cell,
                                                       0.3,
@@ -970,9 +971,10 @@ namespace Step14
       // here is described in more detail in the documentation of that class.
       Vector<float> estimated_error_per_cell(
         this->triangulation->n_active_cells());
+      std::map<types::boundary_id, const Function<dim> *> dummy_function_map;
       KellyErrorEstimator<dim>::estimate(this->dof_handler,
                                          *this->face_quadrature,
-                                         typename FunctionMap<dim>::type(),
+                                         dummy_function_map,
                                          this->solution,
                                          estimated_error_per_cell);
 
index daf5166d6c60b85ac08dad4075768ea4ddf33da8..4fb050a82c1aeb35326cf81e402e6a1738f59299 100644 (file)
@@ -377,11 +377,12 @@ namespace Step15
   {
     Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
 
-    KellyErrorEstimator<dim>::estimate(dof_handler,
-                                       QGauss<dim - 1>(3),
-                                       typename FunctionMap<dim>::type(),
-                                       present_solution,
-                                       estimated_error_per_cell);
+    KellyErrorEstimator<dim>::estimate(
+      dof_handler,
+      QGauss<dim - 1>(3),
+      std::map<types::boundary_id, const Function<dim> *>(),
+      present_solution,
+      estimated_error_per_cell);
 
     GridRefinement::refine_and_coarsen_fixed_number(triangulation,
                                                     estimated_error_per_cell,
index 3e9faf5c41a96b48aa96f156f64e92c76c93059e..dafed9e4d22ab613dc3e357dc90e7485c08b8548 100644 (file)
@@ -280,10 +280,11 @@ namespace Step16
     constraints.clear();
     DoFTools::make_hanging_node_constraints(dof_handler, constraints);
 
-    std::set<types::boundary_id>          dirichlet_boundary_ids = {0};
-    Functions::ZeroFunction<dim>          homogeneous_dirichlet_bc;
-    const typename FunctionMap<dim>::type dirichlet_boundary_functions = {
-      {types::boundary_id(0), &homogeneous_dirichlet_bc}};
+    std::set<types::boundary_id> dirichlet_boundary_ids = {0};
+    Functions::ZeroFunction<dim> homogeneous_dirichlet_bc;
+    const std::map<types::boundary_id, const Function<dim> *>
+      dirichlet_boundary_functions = {
+        {types::boundary_id(0), &homogeneous_dirichlet_bc}};
     VectorTools::interpolate_boundary_values(
       static_cast<const DoFHandler<dim> &>(dof_handler),
       dirichlet_boundary_functions,
@@ -575,11 +576,12 @@ namespace Step16
   {
     Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
 
-    KellyErrorEstimator<dim>::estimate(dof_handler,
-                                       QGauss<dim - 1>(3),
-                                       typename FunctionMap<dim>::type(),
-                                       solution,
-                                       estimated_error_per_cell);
+    KellyErrorEstimator<dim>::estimate(
+      dof_handler,
+      QGauss<dim - 1>(3),
+      std::map<types::boundary_id, const Function<dim> *>(),
+      solution,
+      estimated_error_per_cell);
     GridRefinement::refine_and_coarsen_fixed_number(triangulation,
                                                     estimated_error_per_cell,
                                                     0.3,
index 24c4d3390c01d7bc336da3dbb5899d666438acc1..2b82fa39d440a5dd304d551e609ee98e9261dc98 100644 (file)
@@ -763,15 +763,16 @@ namespace Step17
     const Vector<double> localized_solution(solution);
 
     Vector<float> local_error_per_cell(triangulation.n_active_cells());
-    KellyErrorEstimator<dim>::estimate(dof_handler,
-                                       QGauss<dim - 1>(2),
-                                       typename FunctionMap<dim>::type(),
-                                       localized_solution,
-                                       local_error_per_cell,
-                                       ComponentMask(),
-                                       nullptr,
-                                       MultithreadInfo::n_threads(),
-                                       this_mpi_process);
+    KellyErrorEstimator<dim>::estimate(
+      dof_handler,
+      QGauss<dim - 1>(2),
+      std::map<types::boundary_id, const Function<dim> *>(),
+      localized_solution,
+      local_error_per_cell,
+      ComponentMask(),
+      nullptr,
+      MultithreadInfo::n_threads(),
+      this_mpi_process);
 
     // Now all processes have computed error indicators for their own
     // cells and stored them in the respective elements of the
index d741d992c3a7c8827cad747145df8410ebbde8ca..d1d3d4a448eb32be215a5d4a6fc9ec0a75f50b95 100644 (file)
@@ -1444,15 +1444,16 @@ namespace Step18
   {
     // First, let each process compute error indicators for the cells it owns:
     Vector<float> error_per_cell(triangulation.n_active_cells());
-    KellyErrorEstimator<dim>::estimate(dof_handler,
-                                       QGauss<dim - 1>(2),
-                                       typename FunctionMap<dim>::type(),
-                                       incremental_displacement,
-                                       error_per_cell,
-                                       ComponentMask(),
-                                       nullptr,
-                                       MultithreadInfo::n_threads(),
-                                       this_mpi_process);
+    KellyErrorEstimator<dim>::estimate(
+      dof_handler,
+      QGauss<dim - 1>(2),
+      std::map<types::boundary_id, const Function<dim> *>(),
+      incremental_displacement,
+      error_per_cell,
+      ComponentMask(),
+      nullptr,
+      MultithreadInfo::n_threads(),
+      this_mpi_process);
 
     // Then set up a global vector into which we merge the local indicators
     // from each of the %parallel processes:
index dcb7a8138a902db7b90e29233870428a0e892733..dadec522f16faf87a09cff25ad162524ee85b14d 100644 (file)
@@ -939,12 +939,13 @@ namespace Step22
     Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
 
     FEValuesExtractors::Scalar pressure(dim);
-    KellyErrorEstimator<dim>::estimate(dof_handler,
-                                       QGauss<dim - 1>(degree + 1),
-                                       typename FunctionMap<dim>::type(),
-                                       solution,
-                                       estimated_error_per_cell,
-                                       fe.component_mask(pressure));
+    KellyErrorEstimator<dim>::estimate(
+      dof_handler,
+      QGauss<dim - 1>(degree + 1),
+      std::map<types::boundary_id, const Function<dim> *>(),
+      solution,
+      estimated_error_per_cell,
+      fe.component_mask(pressure));
 
     GridRefinement::refine_and_coarsen_fixed_number(triangulation,
                                                     estimated_error_per_cell,
index 449118ff4aabc271eacfd3e362e7964f6c1c1138..b2438c9f9259514a6d0d044abca78308ba7ce7a6 100644 (file)
@@ -338,11 +338,12 @@ namespace Step26
   {
     Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
 
-    KellyErrorEstimator<dim>::estimate(dof_handler,
-                                       QGauss<dim - 1>(fe.degree + 1),
-                                       typename FunctionMap<dim>::type(),
-                                       solution,
-                                       estimated_error_per_cell);
+    KellyErrorEstimator<dim>::estimate(
+      dof_handler,
+      QGauss<dim - 1>(fe.degree + 1),
+      std::map<types::boundary_id, const Function<dim> *>(),
+      solution,
+      estimated_error_per_cell);
 
     GridRefinement::refine_and_coarsen_fixed_fraction(triangulation,
                                                       estimated_error_per_cell,
index 59995370507ee1e77a5dbce9c740aa21212dafb3..10b0a24f5bbe83a4c2eb7b23902e515689751b00 100644 (file)
@@ -411,11 +411,12 @@ namespace Step27
     // class as always. Estimating the smoothness is done in the respective
     // function of this class; that function is discussed further down below:
     Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
-    KellyErrorEstimator<dim>::estimate(dof_handler,
-                                       face_quadrature_collection,
-                                       typename FunctionMap<dim>::type(),
-                                       solution,
-                                       estimated_error_per_cell);
+    KellyErrorEstimator<dim>::estimate(
+      dof_handler,
+      face_quadrature_collection,
+      std::map<types::boundary_id, const Function<dim> *>(),
+      solution,
+      estimated_error_per_cell);
 
 
     Vector<float> smoothness_indicators(triangulation.n_active_cells());
index 09982a4c9ca8acc7a20cc4da643756955455a498..de76f24baf3a4c03e82630b3e7c34c2b6667eda4 100644 (file)
@@ -1053,11 +1053,12 @@ namespace Step28
   template <int dim>
   void EnergyGroup<dim>::estimate_errors(Vector<float> &error_indicators) const
   {
-    KellyErrorEstimator<dim>::estimate(dof_handler,
-                                       QGauss<dim - 1>(fe.degree + 1),
-                                       typename FunctionMap<dim>::type(),
-                                       solution,
-                                       error_indicators);
+    KellyErrorEstimator<dim>::estimate(
+      dof_handler,
+      QGauss<dim - 1>(fe.degree + 1),
+      std::map<types::boundary_id, const Function<dim> *>(),
+      solution,
+      error_indicators);
     error_indicators /= solution.linfty_norm();
   }
 
index 85fc938fc552aaaa21c65992a6cfcaa9be84c9bc..cfddddc28cef4b1e5c71c14b59785a70cc0ad966 100644 (file)
@@ -1973,11 +1973,12 @@ namespace Step31
   {
     Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
 
-    KellyErrorEstimator<dim>::estimate(temperature_dof_handler,
-                                       QGauss<dim - 1>(temperature_degree + 1),
-                                       typename FunctionMap<dim>::type(),
-                                       temperature_solution,
-                                       estimated_error_per_cell);
+    KellyErrorEstimator<dim>::estimate(
+      temperature_dof_handler,
+      QGauss<dim - 1>(temperature_degree + 1),
+      std::map<types::boundary_id, const Function<dim> *>(),
+      temperature_solution,
+      estimated_error_per_cell);
 
     GridRefinement::refine_and_coarsen_fixed_fraction(triangulation,
                                                       estimated_error_per_cell,
index 80a94881936be3f386ba7533042b110938d03cc0..04d905bbff2d944a67fa42156650fce7f08018ac 100644 (file)
@@ -3486,7 +3486,7 @@ namespace Step32
       KellyErrorEstimator<dim>::estimate(
         temperature_dof_handler,
         QGauss<dim - 1>(parameters.temperature_degree + 1),
-        typename FunctionMap<dim>::type(),
+        std::map<types::boundary_id, const Function<dim> *>(),
         temperature_solution,
         estimated_error_per_cell,
         ComponentMask(),
index 98794c8e70ee949e66bdb22155c5972ebc597b0e..adfcdb0b7e567ecd745c4f2a83bd923f65db4e5d 100644 (file)
@@ -527,11 +527,12 @@ namespace Step40
     TimerOutput::Scope t(computing_timer, "refine");
 
     Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
-    KellyErrorEstimator<dim>::estimate(dof_handler,
-                                       QGauss<dim - 1>(3),
-                                       typename FunctionMap<dim>::type(),
-                                       locally_relevant_solution,
-                                       estimated_error_per_cell);
+    KellyErrorEstimator<dim>::estimate(
+      dof_handler,
+      QGauss<dim - 1>(3),
+      std::map<types::boundary_id, const Function<dim> *>(),
+      locally_relevant_solution,
+      estimated_error_per_cell);
     parallel::distributed::GridRefinement::refine_and_coarsen_fixed_number(
       triangulation, estimated_error_per_cell, 0.3, 0.03);
     triangulation.execute_coarsening_and_refinement();
index 9ceafbe03e91a5a068f20ef6e03514274acf44db..76fd79da01f695cc7e1f39f83f12ae8354499653 100644 (file)
@@ -1918,11 +1918,12 @@ namespace Step42
     else
       {
         Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
-        KellyErrorEstimator<dim>::estimate(dof_handler,
-                                           QGauss<dim - 1>(fe.degree + 2),
-                                           typename FunctionMap<dim>::type(),
-                                           solution,
-                                           estimated_error_per_cell);
+        KellyErrorEstimator<dim>::estimate(
+          dof_handler,
+          QGauss<dim - 1>(fe.degree + 2),
+          std::map<types::boundary_id, const Function<dim> *>(),
+          solution,
+          estimated_error_per_cell);
 
         parallel::distributed::GridRefinement ::refine_and_coarsen_fixed_number(
           triangulation, estimated_error_per_cell, 0.3, 0.03);
index a97122899973595659c2f406a27d73e51c146cfe..b46802807a10e8bcc1853f963f8300dc8ad6126b 100644 (file)
@@ -723,12 +723,13 @@ namespace Step45
     Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
 
     FEValuesExtractors::Scalar pressure(dim);
-    KellyErrorEstimator<dim>::estimate(dof_handler,
-                                       QGauss<dim - 1>(degree + 1),
-                                       typename FunctionMap<dim>::type(),
-                                       solution,
-                                       estimated_error_per_cell,
-                                       fe.component_mask(pressure));
+    KellyErrorEstimator<dim>::estimate(
+      dof_handler,
+      QGauss<dim - 1>(degree + 1),
+      std::map<types::boundary_id, const Function<dim> *>(),
+      solution,
+      estimated_error_per_cell,
+      fe.component_mask(pressure));
 
     parallel::distributed::GridRefinement::refine_and_coarsen_fixed_number(
       triangulation, estimated_error_per_cell, 0.3, 0.0);
index 720d1aa788ea9e380bacc06f49c117c00e463eff..e4a31b6bc108b481b0db4835fa0cf8123c5ed341 100644 (file)
@@ -618,7 +618,7 @@ code like the following:
     stokes_component_mask[d] = true;
   KellyErrorEstimator<dim>::estimate (dof_handler,
                                       face_q_collection,
-                                      typename FunctionMap<dim>::type(),
+                                      std::map<types::boundary_id, const Function<dim>*>(),
                                       solution,
                                       stokes_estimated_error_per_cell,
                                       stokes_component_mask);
@@ -628,7 +628,7 @@ code like the following:
     elasticity_component_mask[dim+1+d] = true;
   KellyErrorEstimator<dim>::estimate (dof_handler,
                                       face_q_collection,
-                                      typename FunctionMap<dim>::type(),
+                                      std::map<types::boundary_id, const Function<dim>*>(),
                                       solution,
                                       elasticity_estimated_error_per_cell,
                                       elasticity_component_mask);
index 945239a67dea9b2ef28f7ab050c8d951c3c885e2..169acd16e656e9a8e10a01f6f1e647ab246b1ac3 100644 (file)
@@ -949,22 +949,22 @@ namespace Step46
     face_q_collection.push_back(elasticity_face_quadrature);
 
     const FEValuesExtractors::Vector velocities(0);
-    KellyErrorEstimator<dim>::estimate(dof_handler,
-                                       face_q_collection,
-                                       typename FunctionMap<dim>::type(),
-                                       solution,
-                                       stokes_estimated_error_per_cell,
-                                       fe_collection.component_mask(
-                                         velocities));
+    KellyErrorEstimator<dim>::estimate(
+      dof_handler,
+      face_q_collection,
+      std::map<types::boundary_id, const Function<dim> *>(),
+      solution,
+      stokes_estimated_error_per_cell,
+      fe_collection.component_mask(velocities));
 
     const FEValuesExtractors::Vector displacements(dim + 1);
-    KellyErrorEstimator<dim>::estimate(dof_handler,
-                                       face_q_collection,
-                                       typename FunctionMap<dim>::type(),
-                                       solution,
-                                       elasticity_estimated_error_per_cell,
-                                       fe_collection.component_mask(
-                                         displacements));
+    KellyErrorEstimator<dim>::estimate(
+      dof_handler,
+      face_q_collection,
+      std::map<types::boundary_id, const Function<dim> *>(),
+      solution,
+      elasticity_estimated_error_per_cell,
+      fe_collection.component_mask(displacements));
 
     // We then normalize error estimates by dividing by their norm and scale
     // the fluid error indicators by a factor of 4 as discussed in the
index c1dcc3a79a3ddbb5ca212aef2c22d014019f053d..4936ee9e2c4b2b870722beacc464b98726eed4be 100644 (file)
@@ -281,8 +281,8 @@ namespace Step50
     constraints.reinit(locally_relevant_set);
     DoFTools::make_hanging_node_constraints(mg_dof_handler, constraints);
 
-    std::set<types::boundary_id>     dirichlet_boundary_ids;
-    typename FunctionMap<dim>::type  dirichlet_boundary;
+    std::set<types::boundary_id>                        dirichlet_boundary_ids;
+    std::map<types::boundary_id, const Function<dim> *> dirichlet_boundary;
     Functions::ConstantFunction<dim> homogeneous_dirichlet_bc(1.0);
     dirichlet_boundary_ids.insert(0);
     dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
@@ -842,12 +842,12 @@ namespace Step50
     temp_solution.reinit(locally_relevant_set, MPI_COMM_WORLD);
     temp_solution = solution;
 
-    KellyErrorEstimator<dim>::estimate(static_cast<DoFHandler<dim> &>(
-                                         mg_dof_handler),
-                                       QGauss<dim - 1>(degree + 1),
-                                       typename FunctionMap<dim>::type(),
-                                       temp_solution,
-                                       estimated_error_per_cell);
+    KellyErrorEstimator<dim>::estimate(
+      mg_dof_handler,
+      QGauss<dim - 1>(degree + 1),
+      std::map<types::boundary_id, const Function<dim> *>(),
+      temp_solution,
+      estimated_error_per_cell);
 
     parallel::distributed::GridRefinement::refine_and_coarsen_fixed_fraction(
       triangulation, estimated_error_per_cell, 0.3, 0.0);
index 80fe60211ded9d5eb082a20019561bd4a51a457d..a6c78f5d33268317f1bc2f99ef029a200907fd01 100644 (file)
@@ -448,8 +448,8 @@ namespace Step51
 
     constraints.clear();
     DoFTools::make_hanging_node_constraints(dof_handler, constraints);
-    typename FunctionMap<dim>::type boundary_functions;
-    Solution<dim>                   solution_function;
+    std::map<types::boundary_id, const Function<dim> *> boundary_functions;
+    Solution<dim>                                       solution_function;
     boundary_functions[0] = &solution_function;
     VectorTools::project_boundary_values(dof_handler,
                                          boundary_functions,
@@ -1329,8 +1329,9 @@ namespace Step51
               Vector<float> estimated_error_per_cell(
                 triangulation.n_active_cells());
 
-              FEValuesExtractors::Scalar      scalar(dim);
-              typename FunctionMap<dim>::type neumann_boundary;
+              FEValuesExtractors::Scalar scalar(dim);
+              std::map<types::boundary_id, const Function<dim> *>
+                neumann_boundary;
               KellyErrorEstimator<dim>::estimate(dof_handler_local,
                                                  QGauss<dim - 1>(3),
                                                  neumann_boundary,
index 6b4aecf036e4c5091c5a2ed338fd5bf90cd317b9..dead482824997ba79a12d91031e24422d3ce747e 100644 (file)
@@ -690,12 +690,13 @@ namespace Step55
         Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
 
         FEValuesExtractors::Vector velocities(0);
-        KellyErrorEstimator<dim>::estimate(dof_handler,
-                                           QGauss<dim - 1>(3),
-                                           typename FunctionMap<dim>::type(),
-                                           locally_relevant_solution,
-                                           estimated_error_per_cell,
-                                           fe.component_mask(velocities));
+        KellyErrorEstimator<dim>::estimate(
+          dof_handler,
+          QGauss<dim - 1>(3),
+          std::map<types::boundary_id, const Function<dim> *>(),
+          locally_relevant_solution,
+          estimated_error_per_cell,
+          fe.component_mask(velocities));
         parallel::distributed::GridRefinement::refine_and_coarsen_fixed_number(
           triangulation, estimated_error_per_cell, 0.3, 0.0);
         triangulation.execute_coarsening_and_refinement();
index dd0f40b9804688245d81813dd80f2384a3635368..3ccca1355d61de24d6da4264971c57aeaf8f98e2 100644 (file)
@@ -588,12 +588,13 @@ namespace Step57
   {
     Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
     FEValuesExtractors::Vector velocity(0);
-    KellyErrorEstimator<dim>::estimate(dof_handler,
-                                       QGauss<dim - 1>(degree + 1),
-                                       typename FunctionMap<dim>::type(),
-                                       present_solution,
-                                       estimated_error_per_cell,
-                                       fe.component_mask(velocity));
+    KellyErrorEstimator<dim>::estimate(
+      dof_handler,
+      QGauss<dim - 1>(degree + 1),
+      std::map<types::boundary_id, const Function<dim> *>(),
+      present_solution,
+      estimated_error_per_cell,
+      fe.component_mask(velocity));
 
     GridRefinement::refine_and_coarsen_fixed_number(triangulation,
                                                     estimated_error_per_cell,
index 5aed7ce3845d907632f9039d7abd5cedb9d1fb6b..0afc1ef5aab1218f82f149972f6de78664e8b77a 100644 (file)
@@ -469,12 +469,12 @@ void Step6<dim>::solve()
 // Secondly, the function wants a list of boundary indicators for those
 // boundaries where we have imposed Neumann values of the kind
 // $\partial_n u(\mathbf x) = h(\mathbf x)$, along with a function $h(\mathbf
-// x)$ for each such boundary. This information is represented by an object of
-// type <code>FunctionMap::type</code> that is a typedef to a map from boundary
-// indicators to function objects describing the Neumann boundary values. In the
-// present example program, we do not use Neumann boundary values, so this map
-// is empty, and in fact constructed using the default constructor of the map in
-// the place where the function call expects the respective function argument.
+// x)$ for each such boundary. This information is represented by a map from
+// boundary indicators to function objects describing the Neumann boundary
+// values. In the present example program, we do not use Neumann boundary
+// values, so this map is empty, and in fact constructed using the default
+// constructor of the map in the place where the function call expects the
+// respective function argument.
 //
 // The output is a vector of values for all active cells. While it may
 // make sense to compute the <b>value</b> of a solution degree of freedom
@@ -487,11 +487,12 @@ void Step6<dim>::refine_grid()
 {
   Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
 
-  KellyErrorEstimator<dim>::estimate(dof_handler,
-                                     QGauss<dim - 1>(3),
-                                     typename FunctionMap<dim>::type(),
-                                     solution,
-                                     estimated_error_per_cell);
+  KellyErrorEstimator<dim>::estimate(
+    dof_handler,
+    QGauss<dim - 1>(3),
+    std::map<types::boundary_id, const Function<dim> *>(),
+    solution,
+    estimated_error_per_cell);
 
   // The above function returned one error indicator value for each cell in
   // the <code>estimated_error_per_cell</code> array. Refinement is now done
index ee0a7947b83795ac31151389b291b585fd25fb09..2fac5b0c7781248e7e8083195151313e8ebf4e2b 100644 (file)
@@ -819,7 +819,7 @@ namespace Step7
             KellyErrorEstimator<dim>::estimate(
               dof_handler,
               QGauss<dim - 1>(3),
-              typename FunctionMap<dim>::type(),
+              std::map<types::boundary_id, const Function<dim> *>(),
               solution,
               estimated_error_per_cell);
 
index 684bd6ac1ba8d1f98110f12360474de0116f47f7..f219e8997b8cc6c7f94a97aa123e6e00699b20e8 100644 (file)
@@ -487,11 +487,12 @@ namespace Step8
   {
     Vector<float> estimated_error_per_cell(triangulation.n_active_cells());
 
-    KellyErrorEstimator<dim>::estimate(dof_handler,
-                                       QGauss<dim - 1>(2),
-                                       typename FunctionMap<dim>::type(),
-                                       solution,
-                                       estimated_error_per_cell);
+    KellyErrorEstimator<dim>::estimate(
+      dof_handler,
+      QGauss<dim - 1>(2),
+      std::map<types::boundary_id, const Function<dim> *>(),
+      solution,
+      estimated_error_per_cell);
 
     GridRefinement::refine_and_coarsen_fixed_number(triangulation,
                                                     estimated_error_per_cell,
index e0118fcb4545836576c7fcfcd83ead64e6bb21ae..557abd90b650b8ac8ec249f1110b8f967d5d492a 100644 (file)
@@ -21,6 +21,7 @@
 #include <deal.II/base/config.h>
 
 #include <deal.II/base/exceptions.h>
+#include <deal.II/base/function.h>
 #include <deal.II/base/index_set.h>
 #include <deal.II/base/iterator_range.h>
 #include <deal.II/base/smartpointer.h>
@@ -29,7 +30,6 @@
 #include <deal.II/dofs/dof_faces.h>
 #include <deal.II/dofs/dof_iterator_selector.h>
 #include <deal.II/dofs/dof_levels.h>
-#include <deal.II/dofs/function_map.h>
 #include <deal.II/dofs/number_cache.h>
 
 #include <deal.II/hp/fe_collection.h>
@@ -855,8 +855,6 @@ public:
    * reason that a @p map rather than a @p set is used is the same as
    * described in the documentation of that variant of
    * DoFTools::make_boundary_sparsity_pattern() that takes a map.
-   * To this end, the type of the @p boundary_ids argument is the same
-   * as typename FunctionMap<spacedim,number>::type.
    *
    * There is, however, another overload of this function that takes
    * a @p set argument (see below).
index 1da049a872506eaf52939da3e72807438ba890ff..d2dbda18a271a80be181961f1f90fc662988173f 100644 (file)
 #include <deal.II/base/config.h>
 
 #include <deal.II/base/exceptions.h>
+#include <deal.II/base/function.h>
 #include <deal.II/base/iterator_range.h>
 #include <deal.II/base/smartpointer.h>
 #include <deal.II/base/template_constraints.h>
 
 #include <deal.II/dofs/dof_accessor.h>
 #include <deal.II/dofs/dof_iterator_selector.h>
-#include <deal.II/dofs/function_map.h>
 #include <deal.II/dofs/number_cache.h>
 
 #include <deal.II/hp/dof_faces.h>
@@ -648,8 +648,6 @@ namespace hp
      * reason that a @p map rather than a @p set is used is the same as
      * described in the documentation of that variant of
      * DoFTools::make_boundary_sparsity_pattern() that takes a map.
-     * To this end, the type of the @p boundary_ids argument is the same
-     * as typename FunctionMap<spacedim,number>::type.
      *
      * There is, however, another overload of this function that takes
      * a @p set argument (see below).
index 2bd38545a4d74134468cc7f4f5c492925b33bac0..04d443cd03c71813b43a4fb4e5fd9de1efafa683 100644 (file)
@@ -31,8 +31,6 @@ DEAL_II_NAMESPACE_OPEN
 
 template <int dim, int spacedim>
 class DoFHandler;
-template <int dim, typename Number>
-struct FunctionMap;
 
 
 /**
@@ -81,8 +79,9 @@ public:
    */
   template <int dim, int spacedim>
   DEAL_II_DEPRECATED void
-  initialize(const DoFHandler<dim, spacedim> &      dof,
-             const typename FunctionMap<dim>::type &function_map,
+  initialize(const DoFHandler<dim, spacedim> &dof,
+             const std::map<types::boundary_id, const Function<spacedim> *>
+               &                  function_map,
              const ComponentMask &component_mask = ComponentMask());
 
   /**
@@ -272,9 +271,9 @@ MGConstrainedDoFs::initialize(const DoFHandler<dim, spacedim> &dof)
 template <int dim, int spacedim>
 inline void
 MGConstrainedDoFs::initialize(
-  const DoFHandler<dim, spacedim> &      dof,
-  const typename FunctionMap<dim>::type &function_map,
-  const ComponentMask &                  component_mask)
+  const DoFHandler<dim, spacedim> &                               dof,
+  const std::map<types::boundary_id, const Function<spacedim> *> &function_map,
+  const ComponentMask &component_mask)
 {
   initialize(dof);
 
index b571e7c9cf769cc824f314e62b1431728c6cb426..229e2ef72b30cb67af55d8a36bbaca0fdf80baa0 100644 (file)
@@ -208,8 +208,9 @@ namespace MGTools
   template <int dim, int spacedim>
   void
   make_boundary_list(
-    const DoFHandler<dim, spacedim> &               mg_dof,
-    const typename FunctionMap<dim>::type &         function_map,
+    const DoFHandler<dim, spacedim> &mg_dof,
+    const std::map<types::boundary_id, const Function<spacedim> *>
+      &                                             function_map,
     std::vector<std::set<types::global_dof_index>> &boundary_indices,
     const ComponentMask &component_mask = ComponentMask());
 
@@ -222,10 +223,11 @@ namespace MGTools
    */
   template <int dim, int spacedim>
   void
-  make_boundary_list(const DoFHandler<dim, spacedim> &      mg_dof,
-                     const typename FunctionMap<dim>::type &function_map,
-                     std::vector<IndexSet> &                boundary_indices,
-                     const ComponentMask &component_mask = ComponentMask());
+  make_boundary_list(const DoFHandler<dim, spacedim> &           mg_dof,
+                     const std::map<types::boundary_id,
+                                    const Function<spacedim> *> &function_map,
+                     std::vector<IndexSet> &boundary_indices,
+                     const ComponentMask &  component_mask = ComponentMask());
 
   /**
    * The same function as above, but return an IndexSet rather than a
index 499d995b32d05683f367ee645013a5a74fcffa17..973ad4fe1c5a495b14a7b605a43ab324d056f60d 100644 (file)
@@ -22,8 +22,6 @@
 #include <deal.II/base/exceptions.h>
 #include <deal.II/base/function.h>
 
-#include <deal.II/dofs/function_map.h>
-
 #include <deal.II/fe/component_mask.h>
 
 #include <map>
@@ -339,7 +337,8 @@ public:
     const Mapping<dim, spacedim> &mapping,
     const DoFHandlerType &        dof,
     const Quadrature<dim - 1> &   quadrature,
-    const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+    const std::map<types::boundary_id,
+                   const Function<spacedim, typename InputVector::value_type> *>
       &                       neumann_bc,
     const InputVector &       solution,
     Vector<float> &           error,
@@ -359,7 +358,8 @@ public:
   estimate(
     const DoFHandlerType &     dof,
     const Quadrature<dim - 1> &quadrature,
-    const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+    const std::map<types::boundary_id,
+                   const Function<spacedim, typename InputVector::value_type> *>
       &                       neumann_bc,
     const InputVector &       solution,
     Vector<float> &           error,
@@ -389,7 +389,8 @@ public:
     const Mapping<dim, spacedim> &mapping,
     const DoFHandlerType &        dof,
     const Quadrature<dim - 1> &   quadrature,
-    const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+    const std::map<types::boundary_id,
+                   const Function<spacedim, typename InputVector::value_type> *>
       &                                     neumann_bc,
     const std::vector<const InputVector *> &solutions,
     std::vector<Vector<float> *> &          errors,
@@ -409,7 +410,8 @@ public:
   estimate(
     const DoFHandlerType &     dof,
     const Quadrature<dim - 1> &quadrature,
-    const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+    const std::map<types::boundary_id,
+                   const Function<spacedim, typename InputVector::value_type> *>
       &                                     neumann_bc,
     const std::vector<const InputVector *> &solutions,
     std::vector<Vector<float> *> &          errors,
@@ -431,7 +433,8 @@ public:
     const Mapping<dim, spacedim> &  mapping,
     const DoFHandlerType &          dof,
     const hp::QCollection<dim - 1> &quadrature,
-    const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+    const std::map<types::boundary_id,
+                   const Function<spacedim, typename InputVector::value_type> *>
       &                       neumann_bc,
     const InputVector &       solution,
     Vector<float> &           error,
@@ -452,7 +455,8 @@ public:
   estimate(
     const DoFHandlerType &          dof,
     const hp::QCollection<dim - 1> &quadrature,
-    const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+    const std::map<types::boundary_id,
+                   const Function<spacedim, typename InputVector::value_type> *>
       &                       neumann_bc,
     const InputVector &       solution,
     Vector<float> &           error,
@@ -474,7 +478,8 @@ public:
     const Mapping<dim, spacedim> &  mapping,
     const DoFHandlerType &          dof,
     const hp::QCollection<dim - 1> &quadrature,
-    const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+    const std::map<types::boundary_id,
+                   const Function<spacedim, typename InputVector::value_type> *>
       &                                     neumann_bc,
     const std::vector<const InputVector *> &solutions,
     std::vector<Vector<float> *> &          errors,
@@ -495,7 +500,8 @@ public:
   estimate(
     const DoFHandlerType &          dof,
     const hp::QCollection<dim - 1> &quadrature,
-    const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+    const std::map<types::boundary_id,
+                   const Function<spacedim, typename InputVector::value_type> *>
       &                                     neumann_bc,
     const std::vector<const InputVector *> &solutions,
     std::vector<Vector<float> *> &          errors,
@@ -619,7 +625,8 @@ public:
     const Mapping<1, spacedim> &mapping,
     const DoFHandlerType &      dof,
     const Quadrature<0> &       quadrature,
-    const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+    const std::map<types::boundary_id,
+                   const Function<spacedim, typename InputVector::value_type> *>
       &                       neumann_bc,
     const InputVector &       solution,
     Vector<float> &           error,
@@ -639,7 +646,8 @@ public:
   estimate(
     const DoFHandlerType &dof,
     const Quadrature<0> & quadrature,
-    const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+    const std::map<types::boundary_id,
+                   const Function<spacedim, typename InputVector::value_type> *>
       &                       neumann_bc,
     const InputVector &       solution,
     Vector<float> &           error,
@@ -669,7 +677,8 @@ public:
     const Mapping<1, spacedim> &mapping,
     const DoFHandlerType &      dof,
     const Quadrature<0> &       quadrature,
-    const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+    const std::map<types::boundary_id,
+                   const Function<spacedim, typename InputVector::value_type> *>
       &                                     neumann_bc,
     const std::vector<const InputVector *> &solutions,
     std::vector<Vector<float> *> &          errors,
@@ -689,7 +698,8 @@ public:
   estimate(
     const DoFHandlerType &dof,
     const Quadrature<0> & quadrature,
-    const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+    const std::map<types::boundary_id,
+                   const Function<spacedim, typename InputVector::value_type> *>
       &                                     neumann_bc,
     const std::vector<const InputVector *> &solutions,
     std::vector<Vector<float> *> &          errors,
@@ -711,7 +721,8 @@ public:
     const Mapping<1, spacedim> &mapping,
     const DoFHandlerType &      dof,
     const hp::QCollection<0> &  quadrature,
-    const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+    const std::map<types::boundary_id,
+                   const Function<spacedim, typename InputVector::value_type> *>
       &                       neumann_bc,
     const InputVector &       solution,
     Vector<float> &           error,
@@ -732,7 +743,8 @@ public:
   estimate(
     const DoFHandlerType &    dof,
     const hp::QCollection<0> &quadrature,
-    const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+    const std::map<types::boundary_id,
+                   const Function<spacedim, typename InputVector::value_type> *>
       &                       neumann_bc,
     const InputVector &       solution,
     Vector<float> &           error,
@@ -754,7 +766,8 @@ public:
     const Mapping<1, spacedim> &mapping,
     const DoFHandlerType &      dof,
     const hp::QCollection<0> &  quadrature,
-    const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+    const std::map<types::boundary_id,
+                   const Function<spacedim, typename InputVector::value_type> *>
       &                                     neumann_bc,
     const std::vector<const InputVector *> &solutions,
     std::vector<Vector<float> *> &          errors,
@@ -775,7 +788,8 @@ public:
   estimate(
     const DoFHandlerType &    dof,
     const hp::QCollection<0> &quadrature,
-    const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+    const std::map<types::boundary_id,
+                   const Function<spacedim, typename InputVector::value_type> *>
       &                                     neumann_bc,
     const std::vector<const InputVector *> &solutions,
     std::vector<Vector<float> *> &          errors,
index e4b84d1b80435a16745124773cfd1b0dec334cbc..ee5fdc2aa68214666cebf6ab87168f356a619c01 100644 (file)
@@ -176,9 +176,10 @@ namespace internal
        * Some more references to input data to the
        * KellyErrorEstimator::estimate() function.
        */
-      const typename FunctionMap<spacedim, number>::type *neumann_bc;
-      const ComponentMask                                 component_mask;
-      const Function<spacedim> *                          coefficients;
+      const std::map<types::boundary_id, const Function<spacedim, number> *>
+        *                       neumann_bc;
+      const ComponentMask       component_mask;
+      const Function<spacedim> *coefficients;
 
       /**
        * Constructor.
@@ -192,9 +193,10 @@ namespace internal
         const unsigned int        n_solution_vectors,
         const types::subdomain_id subdomain_id,
         const types::material_id  material_id,
-        const typename FunctionMap<spacedim, number>::type *neumann_bc,
-        const ComponentMask &                               component_mask,
-        const Function<spacedim> *                          coefficients);
+        const std::map<types::boundary_id, const Function<spacedim, number> *>
+          *                       neumann_bc,
+        const ComponentMask &     component_mask,
+        const Function<spacedim> *coefficients);
 
       /**
        * Resize the arrays so that they fit the number of quadrature points
@@ -216,9 +218,10 @@ namespace internal
       const unsigned int        n_solution_vectors,
       const types::subdomain_id subdomain_id,
       const types::material_id  material_id,
-      const typename FunctionMap<spacedim, number>::type *neumann_bc,
-      const ComponentMask &                               component_mask,
-      const Function<spacedim> *                          coefficients)
+      const std::map<types::boundary_id, const Function<spacedim, number> *>
+        *                       neumann_bc,
+      const ComponentMask &     component_mask,
+      const Function<spacedim> *coefficients)
       : finite_element(fe)
       , face_quadratures(face_quadratures)
       , fe_face_values_cell(mapping,
@@ -1075,7 +1078,8 @@ KellyErrorEstimator<dim, spacedim>::estimate(
   const Mapping<dim, spacedim> &mapping,
   const DoFHandlerType &        dof_handler,
   const Quadrature<dim - 1> &   quadrature,
-  const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+  const std::map<types::boundary_id,
+                 const Function<spacedim, typename InputVector::value_type> *>
     &                       neumann_bc,
   const InputVector &       solution,
   Vector<float> &           error,
@@ -1110,7 +1114,8 @@ void
 KellyErrorEstimator<dim, spacedim>::estimate(
   const DoFHandlerType &     dof_handler,
   const Quadrature<dim - 1> &quadrature,
-  const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+  const std::map<types::boundary_id,
+                 const Function<spacedim, typename InputVector::value_type> *>
     &                       neumann_bc,
   const InputVector &       solution,
   Vector<float> &           error,
@@ -1143,7 +1148,8 @@ KellyErrorEstimator<dim, spacedim>::estimate(
   const Mapping<dim, spacedim> &  mapping,
   const DoFHandlerType &          dof_handler,
   const hp::QCollection<dim - 1> &quadrature,
-  const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+  const std::map<types::boundary_id,
+                 const Function<spacedim, typename InputVector::value_type> *>
     &                       neumann_bc,
   const InputVector &       solution,
   Vector<float> &           error,
@@ -1178,7 +1184,8 @@ void
 KellyErrorEstimator<dim, spacedim>::estimate(
   const DoFHandlerType &          dof_handler,
   const hp::QCollection<dim - 1> &quadrature,
-  const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+  const std::map<types::boundary_id,
+                 const Function<spacedim, typename InputVector::value_type> *>
     &                       neumann_bc,
   const InputVector &       solution,
   Vector<float> &           error,
@@ -1212,7 +1219,8 @@ KellyErrorEstimator<dim, spacedim>::estimate(
   const Mapping<dim, spacedim> &  mapping,
   const DoFHandlerType &          dof_handler,
   const hp::QCollection<dim - 1> &face_quadratures,
-  const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+  const std::map<types::boundary_id,
+                 const Function<spacedim, typename InputVector::value_type> *>
     &                                     neumann_bc,
   const std::vector<const InputVector *> &solutions,
   std::vector<Vector<float> *> &          errors,
@@ -1256,13 +1264,10 @@ KellyErrorEstimator<dim, spacedim>::estimate(
   Assert(solutions.size() == errors.size(),
          ExcIncompatibleNumberOfElements(solutions.size(), errors.size()));
 
-  for (typename FunctionMap<spacedim, typename InputVector::value_type>::type::
-         const_iterator i = neumann_bc.begin();
-       i != neumann_bc.end();
-       ++i)
-    Assert(i->second->n_components == n_components,
-           ExcInvalidBoundaryFunction(i->first,
-                                      i->second->n_components,
+  for (const auto &boundary_function : neumann_bc)
+    Assert(boundary_function.second->n_components == n_components,
+           ExcInvalidBoundaryFunction(boundary_function.first,
+                                      boundary_function.second->n_components,
                                       n_components));
 
   Assert(component_mask.represents_n_components(n_components),
@@ -1383,7 +1388,8 @@ KellyErrorEstimator<dim, spacedim>::estimate(
   const Mapping<dim, spacedim> &mapping,
   const DoFHandlerType &        dof_handler,
   const Quadrature<dim - 1> &   quadrature,
-  const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+  const std::map<types::boundary_id,
+                 const Function<spacedim, typename InputVector::value_type> *>
     &                                     neumann_bc,
   const std::vector<const InputVector *> &solutions,
   std::vector<Vector<float> *> &          errors,
@@ -1416,7 +1422,8 @@ void
 KellyErrorEstimator<dim, spacedim>::estimate(
   const DoFHandlerType &     dof_handler,
   const Quadrature<dim - 1> &quadrature,
-  const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+  const std::map<types::boundary_id,
+                 const Function<spacedim, typename InputVector::value_type> *>
     &                                     neumann_bc,
   const std::vector<const InputVector *> &solutions,
   std::vector<Vector<float> *> &          errors,
@@ -1449,7 +1456,8 @@ void
 KellyErrorEstimator<dim, spacedim>::estimate(
   const DoFHandlerType &          dof_handler,
   const hp::QCollection<dim - 1> &quadrature,
-  const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+  const std::map<types::boundary_id,
+                 const Function<spacedim, typename InputVector::value_type> *>
     &                                     neumann_bc,
   const std::vector<const InputVector *> &solutions,
   std::vector<Vector<float> *> &          errors,
index d5d7269c46a4f88757abbcb57c9d63743b0d964b..66b56864789ed844a0a5e7d1195c1ecd82916d11 100644 (file)
@@ -23,8 +23,6 @@
 #include <deal.II/base/function.h>
 #include <deal.II/base/thread_management.h>
 
-#include <deal.II/dofs/function_map.h>
-
 #include <deal.II/lac/affine_constraints.h>
 
 #include <map>
index 905ac1e478932a7b9af7e4ca92505ad12c878712..dba9a1ced11785e86aa22a819e79e921f71cb35f 100644 (file)
 #include <deal.II/base/config.h>
 
 #include <deal.II/base/exceptions.h>
+#include <deal.II/base/function.h>
 #include <deal.II/base/point.h>
 #include <deal.II/base/quadrature_lib.h>
 
 #include <deal.II/dofs/dof_handler.h>
-#include <deal.II/dofs/function_map.h>
 
 #include <deal.II/hp/dof_handler.h>
 #include <deal.II/hp/mapping_collection.h>
@@ -1006,8 +1006,7 @@ namespace VectorTools
    * The keys of this map correspond to the number @p boundary_id of the face.
    * numbers::internal_face_boundary_id is an illegal value for this key since
    * it is reserved for interior faces. For an example of how to use this
-   * argument with a non-empty map, see the step-16 tutorial program. (Note
-   * that the argument type is equal to the FunctionMap type.)
+   * argument with a non-empty map, see the step-16 tutorial program.
    *
    * The flags in the last parameter, @p component_mask denote which
    * components of the finite element space shall be interpolated. If it is
@@ -1972,11 +1971,12 @@ namespace VectorTools
   template <int dim, int spacedim, template <int, int> class DoFHandlerType>
   void
   compute_nonzero_normal_flux_constraints(
-    const DoFHandlerType<dim, spacedim> & dof_handler,
-    const unsigned int                    first_vector_component,
-    const std::set<types::boundary_id> &  boundary_ids,
-    typename FunctionMap<spacedim>::type &function_map,
-    AffineConstraints<double> &           constraints,
+    const DoFHandlerType<dim, spacedim> &dof_handler,
+    const unsigned int                   first_vector_component,
+    const std::set<types::boundary_id> & boundary_ids,
+    const std::map<types::boundary_id, const Function<spacedim> *>
+      &                           function_map,
+    AffineConstraints<double> &   constraints,
     const Mapping<dim, spacedim> &mapping = StaticMappingQ1<dim>::mapping);
 
   /**
@@ -2019,11 +2019,12 @@ namespace VectorTools
   template <int dim, int spacedim, template <int, int> class DoFHandlerType>
   void
   compute_nonzero_tangential_flux_constraints(
-    const DoFHandlerType<dim, spacedim> & dof_handler,
-    const unsigned int                    first_vector_component,
-    const std::set<types::boundary_id> &  boundary_ids,
-    typename FunctionMap<spacedim>::type &function_map,
-    AffineConstraints<double> &           constraints,
+    const DoFHandlerType<dim, spacedim> &dof_handler,
+    const unsigned int                   first_vector_component,
+    const std::set<types::boundary_id> & boundary_ids,
+    const std::map<types::boundary_id, const Function<spacedim> *>
+      &                           function_map,
+    AffineConstraints<double> &   constraints,
     const Mapping<dim, spacedim> &mapping = StaticMappingQ1<dim>::mapping);
 
   /**
index 6a930eae8e90205714293878d44424197d5af244..437bb13a2ae96e2d1e5410c091224ef50f783f3a 100644 (file)
@@ -6916,8 +6916,8 @@ namespace VectorTools
     AffineConstraints<double> &          constraints,
     const Mapping<dim, spacedim> &       mapping)
   {
-    ZeroFunction<dim>                            zero_function(dim);
-    typename FunctionMap<spacedim>::type         function_map;
+    ZeroFunction<dim>                                        zero_function(dim);
+    std::map<types::boundary_id, const Function<spacedim> *> function_map;
     std::set<types::boundary_id>::const_iterator it = boundary_ids.begin();
     for (; it != boundary_ids.end(); ++it)
       function_map[*it] = &zero_function;
@@ -6932,12 +6932,13 @@ namespace VectorTools
   template <int dim, int spacedim, template <int, int> class DoFHandlerType>
   void
   compute_nonzero_normal_flux_constraints(
-    const DoFHandlerType<dim, spacedim> & dof_handler,
-    const unsigned int                    first_vector_component,
-    const std::set<types::boundary_id> &  boundary_ids,
-    typename FunctionMap<spacedim>::type &function_map,
-    AffineConstraints<double> &           constraints,
-    const Mapping<dim, spacedim> &        mapping)
+    const DoFHandlerType<dim, spacedim> &dof_handler,
+    const unsigned int                   first_vector_component,
+    const std::set<types::boundary_id> & boundary_ids,
+    const std::map<types::boundary_id, const Function<spacedim> *>
+      &                           function_map,
+    AffineConstraints<double> &   constraints,
+    const Mapping<dim, spacedim> &mapping)
   {
     Assert(dim > 1,
            ExcMessage("This function is not useful in 1d because it amounts "
@@ -7117,7 +7118,7 @@ namespace VectorTools
 
                     const Point<dim> point = fe_values.quadrature_point(i);
                     Vector<double>   b_values(dim);
-                    function_map[*b_id]->vector_value(point, b_values);
+                    function_map.at(*b_id)->vector_value(point, b_values);
 
                     // now enter the (dofs,(normal_vector,cell)) entry into
                     // the map
@@ -7528,8 +7529,8 @@ namespace VectorTools
     AffineConstraints<double> &          constraints,
     const Mapping<dim, spacedim> &       mapping)
   {
-    ZeroFunction<dim>                            zero_function(dim);
-    typename FunctionMap<spacedim>::type         function_map;
+    ZeroFunction<dim>                                        zero_function(dim);
+    std::map<types::boundary_id, const Function<spacedim> *> function_map;
     std::set<types::boundary_id>::const_iterator it = boundary_ids.begin();
     for (; it != boundary_ids.end(); ++it)
       function_map[*it] = &zero_function;
@@ -7544,12 +7545,13 @@ namespace VectorTools
   template <int dim, int spacedim, template <int, int> class DoFHandlerType>
   void
   compute_nonzero_tangential_flux_constraints(
-    const DoFHandlerType<dim, spacedim> & dof_handler,
-    const unsigned int                    first_vector_component,
-    const std::set<types::boundary_id> &  boundary_ids,
-    typename FunctionMap<spacedim>::type &function_map,
-    AffineConstraints<double> &           constraints,
-    const Mapping<dim, spacedim> &        mapping)
+    const DoFHandlerType<dim, spacedim> &dof_handler,
+    const unsigned int                   first_vector_component,
+    const std::set<types::boundary_id> & boundary_ids,
+    const std::map<types::boundary_id, const Function<spacedim> *>
+      &                           function_map,
+    AffineConstraints<double> &   constraints,
+    const Mapping<dim, spacedim> &mapping)
   {
     AffineConstraints<double> no_normal_flux_constraints(
       constraints.get_local_lines());
@@ -7647,7 +7649,7 @@ namespace VectorTools
 
                       const Point<dim> point = fe_values.quadrature_point(i);
                       const double     b_value =
-                        function_map[*b_id]->value(point, component);
+                        function_map.at(*b_id)->value(point, component);
                       dof_to_b_value.insert(
                         std::make_pair(face_dofs[i], b_value));
                     }
index e686c79c6d9447d37c6b5d45aeb9bab824862bcf..db1aee61e886efdcd41b67a21a018e42db98c903 100644 (file)
@@ -1253,8 +1253,9 @@ namespace MGTools
   template <int dim, int spacedim>
   void
   make_boundary_list(
-    const DoFHandler<dim, spacedim> &               dof,
-    const typename FunctionMap<dim>::type &         function_map,
+    const DoFHandler<dim, spacedim> &dof,
+    const std::map<types::boundary_id, const Function<spacedim> *>
+      &                                             function_map,
     std::vector<std::set<types::global_dof_index>> &boundary_indices,
     const ComponentMask &                           component_mask)
   {
@@ -1263,10 +1264,8 @@ namespace MGTools
                                 dof.get_triangulation().n_global_levels()));
 
     std::set<types::boundary_id> boundary_ids;
-    typename std::map<types::boundary_id, const Function<dim> *>::const_iterator
-      it = function_map.begin();
-    for (; it != function_map.end(); ++it)
-      boundary_ids.insert(it->first);
+    for (const auto &boundary_function : function_map)
+      boundary_ids.insert(boundary_function.first);
 
     std::vector<IndexSet> boundary_indexset;
     make_boundary_list(dof, boundary_ids, boundary_indexset, component_mask);
@@ -1278,20 +1277,19 @@ namespace MGTools
 
   template <int dim, int spacedim>
   void
-  make_boundary_list(const DoFHandler<dim, spacedim> &      dof,
-                     const typename FunctionMap<dim>::type &function_map,
-                     std::vector<IndexSet> &                boundary_indices,
-                     const ComponentMask &                  component_mask)
+  make_boundary_list(const DoFHandler<dim, spacedim> &           dof,
+                     const std::map<types::boundary_id,
+                                    const Function<spacedim> *> &function_map,
+                     std::vector<IndexSet> &boundary_indices,
+                     const ComponentMask &  component_mask)
   {
     Assert(boundary_indices.size() == dof.get_triangulation().n_global_levels(),
            ExcDimensionMismatch(boundary_indices.size(),
                                 dof.get_triangulation().n_global_levels()));
 
     std::set<types::boundary_id> boundary_ids;
-    typename std::map<types::boundary_id, const Function<dim> *>::const_iterator
-      it = function_map.begin();
-    for (; it != function_map.end(); ++it)
-      boundary_ids.insert(it->first);
+    for (const auto &boundary_function : function_map)
+      boundary_ids.insert(boundary_function.first);
 
     make_boundary_list(dof, boundary_ids, boundary_indices, component_mask);
   }
index cf997ecd8daa9ec5f8ff34412bfe477dc6c963f3..1a78b8e2ef2a2af514d30a995af697d5d4053d6b 100644 (file)
@@ -106,14 +106,16 @@ for (deal_II_dimension : DIMENSIONS)
 #if deal_II_dimension > 1
       template void
       make_boundary_list(const DoFHandler<deal_II_dimension> &,
-                         const FunctionMap<deal_II_dimension>::type &,
+                         const std::map<types::boundary_id,
+                                        const Function<deal_II_dimension> *> &,
                          std::vector<std::set<types::global_dof_index>> &,
                          const ComponentMask &);
 #endif
 
       template void
       make_boundary_list(const DoFHandler<deal_II_dimension> &,
-                         const FunctionMap<deal_II_dimension>::type &,
+                         const std::map<types::boundary_id,
+                                        const Function<deal_II_dimension> *> &,
                          std::vector<IndexSet> &,
                          const ComponentMask &);
 
index dd9e3cfe5e32de93518c51d9f43507de60a40915..209fb8995897def74700ec2903e90defc63ba3b5 100644 (file)
@@ -29,136 +29,160 @@ for (VEC : VECTOR_TYPES; deal_II_dimension : DIMENSIONS;
 #if deal_II_dimension != 1 && deal_II_dimension <= deal_II_space_dimension
 
     template void
-    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::
-      estimate<VEC, DH<deal_II_dimension, deal_II_space_dimension>>(
-        const Mapping<deal_II_dimension, deal_II_space_dimension> &,
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
-        const Quadrature<deal_II_dimension - 1> &,
-        const FunctionMap<deal_II_space_dimension, VEC::value_type>::type &,
-        const VEC &,
-        Vector<float> &,
-        const ComponentMask &,
-        const Function<deal_II_space_dimension> *,
-        const unsigned int,
-        const types::subdomain_id,
-        const types::material_id,
-        const KellyErrorEstimator<deal_II_dimension,
-                                  deal_II_space_dimension>::Strategy);
+    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::estimate<
+      VEC,
+      DH<deal_II_dimension, deal_II_space_dimension>>(
+      const Mapping<deal_II_dimension, deal_II_space_dimension> &,
+      const DH<deal_II_dimension, deal_II_space_dimension> &,
+      const Quadrature<deal_II_dimension - 1> &,
+      const std::map<types::boundary_id,
+                     const Function<deal_II_space_dimension, VEC::value_type> *>
+        &,
+      const VEC &,
+      Vector<float> &,
+      const ComponentMask &,
+      const Function<deal_II_space_dimension> *,
+      const unsigned int,
+      const types::subdomain_id,
+      const types::material_id,
+      const KellyErrorEstimator<deal_II_dimension,
+                                deal_II_space_dimension>::Strategy);
 
     template void
-    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::
-      estimate<VEC, DH<deal_II_dimension, deal_II_space_dimension>>(
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
-        const Quadrature<deal_II_dimension - 1> &,
-        const FunctionMap<deal_II_space_dimension, VEC::value_type>::type &,
-        const VEC &,
-        Vector<float> &,
-        const ComponentMask &,
-        const Function<deal_II_space_dimension> *,
-        const unsigned int,
-        const types::subdomain_id,
-        const types::material_id,
-        const KellyErrorEstimator<deal_II_dimension,
-                                  deal_II_space_dimension>::Strategy);
+    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::estimate<
+      VEC,
+      DH<deal_II_dimension, deal_II_space_dimension>>(
+      const DH<deal_II_dimension, deal_II_space_dimension> &,
+      const Quadrature<deal_II_dimension - 1> &,
+      const std::map<types::boundary_id,
+                     const Function<deal_II_space_dimension, VEC::value_type> *>
+        &,
+      const VEC &,
+      Vector<float> &,
+      const ComponentMask &,
+      const Function<deal_II_space_dimension> *,
+      const unsigned int,
+      const types::subdomain_id,
+      const types::material_id,
+      const KellyErrorEstimator<deal_II_dimension,
+                                deal_II_space_dimension>::Strategy);
 
     template void
-    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::
-      estimate<VEC, DH<deal_II_dimension, deal_II_space_dimension>>(
-        const Mapping<deal_II_dimension, deal_II_space_dimension> &,
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
-        const Quadrature<deal_II_dimension - 1> &,
-        const FunctionMap<deal_II_space_dimension, VEC::value_type>::type &,
-        const std::vector<const VEC *> &,
-        std::vector<Vector<float> *> &,
-        const ComponentMask &,
-        const Function<deal_II_space_dimension> *,
-        const unsigned int,
-        const types::subdomain_id,
-        const types::material_id,
-        const KellyErrorEstimator<deal_II_dimension,
-                                  deal_II_space_dimension>::Strategy);
+    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::estimate<
+      VEC,
+      DH<deal_II_dimension, deal_II_space_dimension>>(
+      const Mapping<deal_II_dimension, deal_II_space_dimension> &,
+      const DH<deal_II_dimension, deal_II_space_dimension> &,
+      const Quadrature<deal_II_dimension - 1> &,
+      const std::map<types::boundary_id,
+                     const Function<deal_II_space_dimension, VEC::value_type> *>
+        &,
+      const std::vector<const VEC *> &,
+      std::vector<Vector<float> *> &,
+      const ComponentMask &,
+      const Function<deal_II_space_dimension> *,
+      const unsigned int,
+      const types::subdomain_id,
+      const types::material_id,
+      const KellyErrorEstimator<deal_II_dimension,
+                                deal_II_space_dimension>::Strategy);
 
     template void
-    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::
-      estimate<VEC, DH<deal_II_dimension, deal_II_space_dimension>>(
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
-        const Quadrature<deal_II_dimension - 1> &,
-        const FunctionMap<deal_II_space_dimension, VEC::value_type>::type &,
-        const std::vector<const VEC *> &,
-        std::vector<Vector<float> *> &,
-        const ComponentMask &,
-        const Function<deal_II_space_dimension> *,
-        const unsigned int,
-        const types::subdomain_id,
-        const types::material_id,
-        const KellyErrorEstimator<deal_II_dimension,
-                                  deal_II_space_dimension>::Strategy);
+    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::estimate<
+      VEC,
+      DH<deal_II_dimension, deal_II_space_dimension>>(
+      const DH<deal_II_dimension, deal_II_space_dimension> &,
+      const Quadrature<deal_II_dimension - 1> &,
+      const std::map<types::boundary_id,
+                     const Function<deal_II_space_dimension, VEC::value_type> *>
+        &,
+      const std::vector<const VEC *> &,
+      std::vector<Vector<float> *> &,
+      const ComponentMask &,
+      const Function<deal_II_space_dimension> *,
+      const unsigned int,
+      const types::subdomain_id,
+      const types::material_id,
+      const KellyErrorEstimator<deal_II_dimension,
+                                deal_II_space_dimension>::Strategy);
 
     template void
-    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::
-      estimate<VEC, DH<deal_II_dimension, deal_II_space_dimension>>(
-        const Mapping<deal_II_dimension, deal_II_space_dimension> &,
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
-        const hp::QCollection<deal_II_dimension - 1> &,
-        const FunctionMap<deal_II_space_dimension, VEC::value_type>::type &,
-        const VEC &,
-        Vector<float> &,
-        const ComponentMask &,
-        const Function<deal_II_space_dimension> *,
-        const unsigned int,
-        const types::subdomain_id,
-        const types::material_id,
-        const KellyErrorEstimator<deal_II_dimension,
-                                  deal_II_space_dimension>::Strategy);
+    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::estimate<
+      VEC,
+      DH<deal_II_dimension, deal_II_space_dimension>>(
+      const Mapping<deal_II_dimension, deal_II_space_dimension> &,
+      const DH<deal_II_dimension, deal_II_space_dimension> &,
+      const hp::QCollection<deal_II_dimension - 1> &,
+      const std::map<types::boundary_id,
+                     const Function<deal_II_space_dimension, VEC::value_type> *>
+        &,
+      const VEC &,
+      Vector<float> &,
+      const ComponentMask &,
+      const Function<deal_II_space_dimension> *,
+      const unsigned int,
+      const types::subdomain_id,
+      const types::material_id,
+      const KellyErrorEstimator<deal_II_dimension,
+                                deal_II_space_dimension>::Strategy);
 
     template void
-    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::
-      estimate<VEC, DH<deal_II_dimension, deal_II_space_dimension>>(
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
-        const hp::QCollection<deal_II_dimension - 1> &,
-        const FunctionMap<deal_II_space_dimension, VEC::value_type>::type &,
-        const VEC &,
-        Vector<float> &,
-        const ComponentMask &,
-        const Function<deal_II_space_dimension> *,
-        const unsigned int,
-        const types::subdomain_id,
-        const types::material_id,
-        const KellyErrorEstimator<deal_II_dimension,
-                                  deal_II_space_dimension>::Strategy);
+    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::estimate<
+      VEC,
+      DH<deal_II_dimension, deal_II_space_dimension>>(
+      const DH<deal_II_dimension, deal_II_space_dimension> &,
+      const hp::QCollection<deal_II_dimension - 1> &,
+      const std::map<types::boundary_id,
+                     const Function<deal_II_space_dimension, VEC::value_type> *>
+        &,
+      const VEC &,
+      Vector<float> &,
+      const ComponentMask &,
+      const Function<deal_II_space_dimension> *,
+      const unsigned int,
+      const types::subdomain_id,
+      const types::material_id,
+      const KellyErrorEstimator<deal_II_dimension,
+                                deal_II_space_dimension>::Strategy);
 
     template void
-    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::
-      estimate<VEC, DH<deal_II_dimension, deal_II_space_dimension>>(
-        const Mapping<deal_II_dimension, deal_II_space_dimension> &,
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
-        const hp::QCollection<deal_II_dimension - 1> &,
-        const FunctionMap<deal_II_space_dimension, VEC::value_type>::type &,
-        const std::vector<const VEC *> &,
-        std::vector<Vector<float> *> &,
-        const ComponentMask &,
-        const Function<deal_II_space_dimension> *,
-        const unsigned int,
-        const types::subdomain_id,
-        const types::material_id,
-        const KellyErrorEstimator<deal_II_dimension,
-                                  deal_II_space_dimension>::Strategy);
+    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::estimate<
+      VEC,
+      DH<deal_II_dimension, deal_II_space_dimension>>(
+      const Mapping<deal_II_dimension, deal_II_space_dimension> &,
+      const DH<deal_II_dimension, deal_II_space_dimension> &,
+      const hp::QCollection<deal_II_dimension - 1> &,
+      const std::map<types::boundary_id,
+                     const Function<deal_II_space_dimension, VEC::value_type> *>
+        &,
+      const std::vector<const VEC *> &,
+      std::vector<Vector<float> *> &,
+      const ComponentMask &,
+      const Function<deal_II_space_dimension> *,
+      const unsigned int,
+      const types::subdomain_id,
+      const types::material_id,
+      const KellyErrorEstimator<deal_II_dimension,
+                                deal_II_space_dimension>::Strategy);
 
     template void
-    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::
-      estimate<VEC, DH<deal_II_dimension, deal_II_space_dimension>>(
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
-        const hp::QCollection<deal_II_dimension - 1> &,
-        const FunctionMap<deal_II_space_dimension, VEC::value_type>::type &,
-        const std::vector<const VEC *> &,
-        std::vector<Vector<float> *> &,
-        const ComponentMask &,
-        const Function<deal_II_space_dimension> *,
-        const unsigned int,
-        const types::subdomain_id,
-        const types::material_id,
-        const KellyErrorEstimator<deal_II_dimension,
-                                  deal_II_space_dimension>::Strategy);
+    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::estimate<
+      VEC,
+      DH<deal_II_dimension, deal_II_space_dimension>>(
+      const DH<deal_II_dimension, deal_II_space_dimension> &,
+      const hp::QCollection<deal_II_dimension - 1> &,
+      const std::map<types::boundary_id,
+                     const Function<deal_II_space_dimension, VEC::value_type> *>
+        &,
+      const std::vector<const VEC *> &,
+      std::vector<Vector<float> *> &,
+      const ComponentMask &,
+      const Function<deal_II_space_dimension> *,
+      const unsigned int,
+      const types::subdomain_id,
+      const types::material_id,
+      const KellyErrorEstimator<deal_II_dimension,
+                                deal_II_space_dimension>::Strategy);
 
 #endif
   }
index fdf20c7ef060446c72049f0e6f5b62c9a5d85fb4..badb32ca893c921400263660dd9fc7a8f22492b7 100644 (file)
@@ -64,7 +64,8 @@ KellyErrorEstimator<1, spacedim>::estimate(
   const Mapping<1, spacedim> &mapping,
   const DoFHandlerType &      dof_handler,
   const Quadrature<0> &       quadrature,
-  const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+  const std::map<types::boundary_id,
+                 const Function<spacedim, typename InputVector::value_type> *>
     &                       neumann_bc,
   const InputVector &       solution,
   Vector<float> &           error,
@@ -100,7 +101,8 @@ void
 KellyErrorEstimator<1, spacedim>::estimate(
   const DoFHandlerType &dof_handler,
   const Quadrature<0> & quadrature,
-  const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+  const std::map<types::boundary_id,
+                 const Function<spacedim, typename InputVector::value_type> *>
     &                       neumann_bc,
   const InputVector &       solution,
   Vector<float> &           error,
@@ -133,7 +135,8 @@ void
 KellyErrorEstimator<1, spacedim>::estimate(
   const DoFHandlerType &dof_handler,
   const Quadrature<0> & quadrature,
-  const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+  const std::map<types::boundary_id,
+                 const Function<spacedim, typename InputVector::value_type> *>
     &                                     neumann_bc,
   const std::vector<const InputVector *> &solutions,
   std::vector<Vector<float> *> &          errors,
@@ -167,7 +170,8 @@ KellyErrorEstimator<1, spacedim>::estimate(
   const Mapping<1, spacedim> &mapping,
   const DoFHandlerType &      dof_handler,
   const hp::QCollection<0> &  quadrature,
-  const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+  const std::map<types::boundary_id,
+                 const Function<spacedim, typename InputVector::value_type> *>
     &                       neumann_bc,
   const InputVector &       solution,
   Vector<float> &           error,
@@ -202,7 +206,8 @@ void
 KellyErrorEstimator<1, spacedim>::estimate(
   const DoFHandlerType &    dof_handler,
   const hp::QCollection<0> &quadrature,
-  const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+  const std::map<types::boundary_id,
+                 const Function<spacedim, typename InputVector::value_type> *>
     &                       neumann_bc,
   const InputVector &       solution,
   Vector<float> &           error,
@@ -235,7 +240,8 @@ void
 KellyErrorEstimator<1, spacedim>::estimate(
   const DoFHandlerType &    dof_handler,
   const hp::QCollection<0> &quadrature,
-  const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+  const std::map<types::boundary_id,
+                 const Function<spacedim, typename InputVector::value_type> *>
     &                                     neumann_bc,
   const std::vector<const InputVector *> &solutions,
   std::vector<Vector<float> *> &          errors,
@@ -269,7 +275,8 @@ KellyErrorEstimator<1, spacedim>::estimate(
   const Mapping<1, spacedim> & /*mapping*/,
   const DoFHandlerType & /*dof_handler*/,
   const hp::QCollection<0> &,
-  const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+  const std::map<types::boundary_id,
+                 const Function<spacedim, typename InputVector::value_type> *>
     & /*neumann_bc*/,
   const std::vector<const InputVector *> & /*solutions*/,
   std::vector<Vector<float> *> & /*errors*/,
@@ -292,7 +299,8 @@ KellyErrorEstimator<1, spacedim>::estimate(
   const Mapping<1, spacedim> &mapping,
   const DoFHandlerType &      dof_handler,
   const Quadrature<0> &,
-  const typename FunctionMap<spacedim, typename InputVector::value_type>::type
+  const std::map<types::boundary_id,
+                 const Function<spacedim, typename InputVector::value_type> *>
     &                                     neumann_bc,
   const std::vector<const InputVector *> &solutions,
   std::vector<Vector<float> *> &          errors,
@@ -340,13 +348,10 @@ KellyErrorEstimator<1, spacedim>::estimate(
                     "indicator for internal boundaries in your boundary "
                     "value map."));
 
-  for (typename FunctionMap<spacedim, typename InputVector::value_type>::type::
-         const_iterator i = neumann_bc.begin();
-       i != neumann_bc.end();
-       ++i)
-    Assert(i->second->n_components == n_components,
-           ExcInvalidBoundaryFunction(i->first,
-                                      i->second->n_components,
+  for (const auto boundary_function : neumann_bc)
+    Assert(boundary_function.second->n_components == n_components,
+           ExcInvalidBoundaryFunction(boundary_function.first,
+                                      boundary_function.second->n_components,
                                       n_components));
 
   Assert(component_mask.represents_n_components(n_components),
@@ -371,13 +376,10 @@ KellyErrorEstimator<1, spacedim>::estimate(
            (coefficient->n_components == 1),
          ExcInvalidCoefficient());
 
-  for (typename FunctionMap<spacedim, typename InputVector::value_type>::type::
-         const_iterator i = neumann_bc.begin();
-       i != neumann_bc.end();
-       ++i)
-    Assert(i->second->n_components == n_components,
-           ExcInvalidBoundaryFunction(i->first,
-                                      i->second->n_components,
+  for (const auto &boundary_function : neumann_bc)
+    Assert(boundary_function.second->n_components == n_components,
+           ExcInvalidBoundaryFunction(boundary_function.first,
+                                      boundary_function.second->n_components,
                                       n_components));
 
   // reserve one slot for each cell and set it to zero
index 5fd9c9a088a24302f47e8a447d199c3682a6778c..1c04d51fbda1679c8390070442dd9c4a2213f005 100644 (file)
@@ -21,128 +21,152 @@ for (VEC : VECTOR_TYPES; deal_II_dimension : DIMENSIONS;
 #if deal_II_dimension == 1 && deal_II_dimension <= deal_II_space_dimension
 
     template void
-    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::
-      estimate<VEC, DH<deal_II_dimension, deal_II_space_dimension>>(
-        const Mapping<deal_II_dimension, deal_II_space_dimension> &,
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
-        const Quadrature<deal_II_dimension - 1> &,
-        const FunctionMap<deal_II_space_dimension, VEC::value_type>::type &,
-        const VEC &,
-        Vector<float> &,
-        const ComponentMask &,
-        const Function<deal_II_space_dimension> *,
-        const unsigned int,
-        const types::subdomain_id,
-        const types::material_id,
-        const Strategy);
+    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::estimate<
+      VEC,
+      DH<deal_II_dimension, deal_II_space_dimension>>(
+      const Mapping<deal_II_dimension, deal_II_space_dimension> &,
+      const DH<deal_II_dimension, deal_II_space_dimension> &,
+      const Quadrature<deal_II_dimension - 1> &,
+      const std::map<types::boundary_id,
+                     const Function<deal_II_space_dimension, VEC::value_type> *>
+        &,
+      const VEC &,
+      Vector<float> &,
+      const ComponentMask &,
+      const Function<deal_II_space_dimension> *,
+      const unsigned int,
+      const types::subdomain_id,
+      const types::material_id,
+      const Strategy);
 
     template void
-    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::
-      estimate<VEC, DH<deal_II_dimension, deal_II_space_dimension>>(
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
-        const Quadrature<deal_II_dimension - 1> &,
-        const FunctionMap<deal_II_space_dimension, VEC::value_type>::type &,
-        const VEC &,
-        Vector<float> &,
-        const ComponentMask &,
-        const Function<deal_II_space_dimension> *,
-        const unsigned int,
-        const types::subdomain_id,
-        const types::material_id,
-        const Strategy);
+    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::estimate<
+      VEC,
+      DH<deal_II_dimension, deal_II_space_dimension>>(
+      const DH<deal_II_dimension, deal_II_space_dimension> &,
+      const Quadrature<deal_II_dimension - 1> &,
+      const std::map<types::boundary_id,
+                     const Function<deal_II_space_dimension, VEC::value_type> *>
+        &,
+      const VEC &,
+      Vector<float> &,
+      const ComponentMask &,
+      const Function<deal_II_space_dimension> *,
+      const unsigned int,
+      const types::subdomain_id,
+      const types::material_id,
+      const Strategy);
 
     template void
-    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::
-      estimate<VEC, DH<deal_II_dimension, deal_II_space_dimension>>(
-        const Mapping<deal_II_dimension, deal_II_space_dimension> &,
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
-        const Quadrature<deal_II_dimension - 1> &,
-        const FunctionMap<deal_II_space_dimension, VEC::value_type>::type &,
-        const std::vector<const VEC *> &,
-        std::vector<Vector<float> *> &,
-        const ComponentMask &,
-        const Function<deal_II_space_dimension> *,
-        const unsigned int,
-        const types::subdomain_id,
-        const types::material_id,
-        const Strategy);
+    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::estimate<
+      VEC,
+      DH<deal_II_dimension, deal_II_space_dimension>>(
+      const Mapping<deal_II_dimension, deal_II_space_dimension> &,
+      const DH<deal_II_dimension, deal_II_space_dimension> &,
+      const Quadrature<deal_II_dimension - 1> &,
+      const std::map<types::boundary_id,
+                     const Function<deal_II_space_dimension, VEC::value_type> *>
+        &,
+      const std::vector<const VEC *> &,
+      std::vector<Vector<float> *> &,
+      const ComponentMask &,
+      const Function<deal_II_space_dimension> *,
+      const unsigned int,
+      const types::subdomain_id,
+      const types::material_id,
+      const Strategy);
 
     template void
-    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::
-      estimate<VEC, DH<deal_II_dimension, deal_II_space_dimension>>(
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
-        const Quadrature<deal_II_dimension - 1> &,
-        const FunctionMap<deal_II_space_dimension, VEC::value_type>::type &,
-        const std::vector<const VEC *> &,
-        std::vector<Vector<float> *> &,
-        const ComponentMask &,
-        const Function<deal_II_space_dimension> *,
-        const unsigned int,
-        const types::subdomain_id,
-        const types::material_id,
-        const Strategy);
+    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::estimate<
+      VEC,
+      DH<deal_II_dimension, deal_II_space_dimension>>(
+      const DH<deal_II_dimension, deal_II_space_dimension> &,
+      const Quadrature<deal_II_dimension - 1> &,
+      const std::map<types::boundary_id,
+                     const Function<deal_II_space_dimension, VEC::value_type> *>
+        &,
+      const std::vector<const VEC *> &,
+      std::vector<Vector<float> *> &,
+      const ComponentMask &,
+      const Function<deal_II_space_dimension> *,
+      const unsigned int,
+      const types::subdomain_id,
+      const types::material_id,
+      const Strategy);
 
     template void
-    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::
-      estimate<VEC, DH<deal_II_dimension, deal_II_space_dimension>>(
-        const Mapping<deal_II_dimension, deal_II_space_dimension> &,
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
-        const hp::QCollection<deal_II_dimension - 1> &,
-        const FunctionMap<deal_II_space_dimension, VEC::value_type>::type &,
-        const VEC &,
-        Vector<float> &,
-        const ComponentMask &,
-        const Function<deal_II_space_dimension> *,
-        const unsigned int,
-        const types::subdomain_id,
-        const types::material_id,
-        const Strategy);
+    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::estimate<
+      VEC,
+      DH<deal_II_dimension, deal_II_space_dimension>>(
+      const Mapping<deal_II_dimension, deal_II_space_dimension> &,
+      const DH<deal_II_dimension, deal_II_space_dimension> &,
+      const hp::QCollection<deal_II_dimension - 1> &,
+      const std::map<types::boundary_id,
+                     const Function<deal_II_space_dimension, VEC::value_type> *>
+        &,
+      const VEC &,
+      Vector<float> &,
+      const ComponentMask &,
+      const Function<deal_II_space_dimension> *,
+      const unsigned int,
+      const types::subdomain_id,
+      const types::material_id,
+      const Strategy);
 
     template void
-    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::
-      estimate<VEC, DH<deal_II_dimension, deal_II_space_dimension>>(
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
-        const hp::QCollection<deal_II_dimension - 1> &,
-        const FunctionMap<deal_II_space_dimension, VEC::value_type>::type &,
-        const VEC &,
-        Vector<float> &,
-        const ComponentMask &,
-        const Function<deal_II_space_dimension> *,
-        const unsigned int,
-        const types::subdomain_id,
-        const types::material_id,
-        const Strategy);
+    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::estimate<
+      VEC,
+      DH<deal_II_dimension, deal_II_space_dimension>>(
+      const DH<deal_II_dimension, deal_II_space_dimension> &,
+      const hp::QCollection<deal_II_dimension - 1> &,
+      const std::map<types::boundary_id,
+                     const Function<deal_II_space_dimension, VEC::value_type> *>
+        &,
+      const VEC &,
+      Vector<float> &,
+      const ComponentMask &,
+      const Function<deal_II_space_dimension> *,
+      const unsigned int,
+      const types::subdomain_id,
+      const types::material_id,
+      const Strategy);
 
     template void
-    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::
-      estimate<VEC, DH<deal_II_dimension, deal_II_space_dimension>>(
-        const Mapping<deal_II_dimension, deal_II_space_dimension> &,
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
-        const hp::QCollection<deal_II_dimension - 1> &,
-        const FunctionMap<deal_II_space_dimension, VEC::value_type>::type &,
-        const std::vector<const VEC *> &,
-        std::vector<Vector<float> *> &,
-        const ComponentMask &,
-        const Function<deal_II_space_dimension> *,
-        const unsigned int,
-        const types::subdomain_id,
-        const types::material_id,
-        const Strategy);
+    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::estimate<
+      VEC,
+      DH<deal_II_dimension, deal_II_space_dimension>>(
+      const Mapping<deal_II_dimension, deal_II_space_dimension> &,
+      const DH<deal_II_dimension, deal_II_space_dimension> &,
+      const hp::QCollection<deal_II_dimension - 1> &,
+      const std::map<types::boundary_id,
+                     const Function<deal_II_space_dimension, VEC::value_type> *>
+        &,
+      const std::vector<const VEC *> &,
+      std::vector<Vector<float> *> &,
+      const ComponentMask &,
+      const Function<deal_II_space_dimension> *,
+      const unsigned int,
+      const types::subdomain_id,
+      const types::material_id,
+      const Strategy);
 
     template void
-    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::
-      estimate<VEC, DH<deal_II_dimension, deal_II_space_dimension>>(
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
-        const hp::QCollection<deal_II_dimension - 1> &,
-        const FunctionMap<deal_II_space_dimension, VEC::value_type>::type &,
-        const std::vector<const VEC *> &,
-        std::vector<Vector<float> *> &,
-        const ComponentMask &,
-        const Function<deal_II_space_dimension> *,
-        const unsigned int,
-        const types::subdomain_id,
-        const types::material_id,
-        const Strategy);
+    KellyErrorEstimator<deal_II_dimension, deal_II_space_dimension>::estimate<
+      VEC,
+      DH<deal_II_dimension, deal_II_space_dimension>>(
+      const DH<deal_II_dimension, deal_II_space_dimension> &,
+      const hp::QCollection<deal_II_dimension - 1> &,
+      const std::map<types::boundary_id,
+                     const Function<deal_II_space_dimension, VEC::value_type> *>
+        &,
+      const std::vector<const VEC *> &,
+      std::vector<Vector<float> *> &,
+      const ComponentMask &,
+      const Function<deal_II_space_dimension> *,
+      const unsigned int,
+      const types::subdomain_id,
+      const types::material_id,
+      const Strategy);
 
 #endif
   }
index b8418c43eb80443e0cbe378072bb8fba7d2486bc..f6bc1448a4b025c0a9acf57c499568de2f0a7082 100644 (file)
@@ -26,38 +26,42 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
 #  if deal_II_dimension != 1
       template void
       compute_nonzero_normal_flux_constraints(
-        const DoFHandler<deal_II_dimension> & dof_handler,
-        const unsigned int                    first_vector_component,
-        const std::set<types::boundary_id> &  boundary_ids,
-        FunctionMap<deal_II_dimension>::type &function_map,
-        AffineConstraints<double> &           constraints,
-        const Mapping<deal_II_dimension> &    mapping);
+        const DoFHandler<deal_II_dimension> &dof_handler,
+        const unsigned int                   first_vector_component,
+        const std::set<types::boundary_id> & boundary_ids,
+        const std::map<types::boundary_id, const Function<deal_II_dimension> *>
+          &                               function_map,
+        AffineConstraints<double> &       constraints,
+        const Mapping<deal_II_dimension> &mapping);
 
       template void
       compute_nonzero_normal_flux_constraints(
         const hp::DoFHandler<deal_II_dimension> &dof_handler,
         const unsigned int                       first_vector_component,
         const std::set<types::boundary_id> &     boundary_ids,
-        FunctionMap<deal_II_dimension>::type &   function_map,
-        AffineConstraints<double> &              constraints,
-        const Mapping<deal_II_dimension> &       mapping);
+        const std::map<types::boundary_id, const Function<deal_II_dimension> *>
+          &                               function_map,
+        AffineConstraints<double> &       constraints,
+        const Mapping<deal_II_dimension> &mapping);
 
       template void
       compute_nonzero_tangential_flux_constraints(
-        const DoFHandler<deal_II_dimension> & dof_handler,
-        const unsigned int                    first_vector_component,
-        const std::set<types::boundary_id> &  boundary_ids,
-        FunctionMap<deal_II_dimension>::type &function_map,
-        AffineConstraints<double> &           constraints,
-        const Mapping<deal_II_dimension> &    mapping);
+        const DoFHandler<deal_II_dimension> &dof_handler,
+        const unsigned int                   first_vector_component,
+        const std::set<types::boundary_id> & boundary_ids,
+        const std::map<types::boundary_id, const Function<deal_II_dimension> *>
+          &                               function_map,
+        AffineConstraints<double> &       constraints,
+        const Mapping<deal_II_dimension> &mapping);
       template void
       compute_nonzero_tangential_flux_constraints(
         const hp::DoFHandler<deal_II_dimension> &dof_handler,
         const unsigned int                       first_vector_component,
         const std::set<types::boundary_id> &     boundary_ids,
-        FunctionMap<deal_II_dimension>::type &   function_map,
-        AffineConstraints<double> &              constraints,
-        const Mapping<deal_II_dimension> &       mapping);
+        const std::map<types::boundary_id, const Function<deal_II_dimension> *>
+          &                               function_map,
+        AffineConstraints<double> &       constraints,
+        const Mapping<deal_II_dimension> &mapping);
 
       template void
       compute_no_normal_flux_constraints(

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.