]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid lambda function to compile with Intel 18/19.
authorMarc Fehling <mafehling.git@gmail.com>
Tue, 6 Jul 2021 21:08:09 +0000 (16:08 -0500)
committerMarc Fehling <mafehling.git@gmail.com>
Tue, 6 Jul 2021 21:10:37 +0000 (16:10 -0500)
include/deal.II/numerics/vector_tools_evaluate.h

index ec8aec1776e3738439fbdc6db37fb28347fedad0..9ba6455ebee5dd5ce3bf51f525774301b8e1151b 100644 (file)
@@ -268,18 +268,6 @@ namespace VectorTools
           std::vector<std::unique_ptr<FEPointEvaluation<n_components, dim>>>
             evaluators(dof_handler.get_fe_collection().size());
 
-          const auto get_evaluator = [&](const unsigned int active_fe_index)
-            -> FEPointEvaluation<n_components, dim> & {
-            if (evaluators[active_fe_index] == nullptr)
-              evaluators[active_fe_index] =
-                std::make_unique<FEPointEvaluation<n_components, dim>>(
-                  cache.get_mapping(),
-                  dof_handler.get_fe(active_fe_index),
-                  update_flags);
-
-            return *evaluators[active_fe_index];
-          };
-
           for (unsigned int i = 0; i < cell_data.cells.size(); ++i)
             {
               typename DoFHandler<dim>::active_cell_iterator cell = {
@@ -300,7 +288,11 @@ namespace VectorTools
                                    solution_values.begin(),
                                    solution_values.end());
 
-              auto &evaluator = get_evaluator(cell->active_fe_index());
+              if (evaluators[cell->active_fe_index()] == nullptr)
+                evaluators[cell->active_fe_index()] =
+                  std::make_unique<FEPointEvaluation<n_components, dim>>(
+                    cache.get_mapping(), cell->get_fe(), update_flags);
+              auto &evaluator = *evaluators[cell->active_fe_index()];
 
               evaluator.reinit(cell, unit_points);
               evaluator.evaluate(solution_values, evaluation_flags);

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.