]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use lambdas to make code more readable. 10892/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 4 Sep 2020 17:00:10 +0000 (11:00 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 4 Sep 2020 17:00:10 +0000 (11:00 -0600)
source/fe/fe_values.cc

index 30a696b15f10978fb3fdbc0a89f1a18a4384552d..34f1d8c6b842bc8a8edd783f924140c79622bb75 100644 (file)
@@ -4442,20 +4442,19 @@ FEValues<dim, spacedim>::initialize(const UpdateFlags update_flags)
   // intermediate data used across calls to reinit. we can do this in parallel
   Threads::Task<
     std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>>
-    fe_get_data = Threads::new_task(&FiniteElement<dim, spacedim>::get_data,
-                                    *this->fe,
-                                    flags,
-                                    *this->mapping,
-                                    quadrature,
-                                    this->finite_element_output);
+    fe_get_data = Threads::new_task([&]() {
+      return this->fe->get_data(flags,
+                                *this->mapping,
+                                quadrature,
+                                this->finite_element_output);
+    });
+
   Threads::Task<
     std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>>
     mapping_get_data;
   if (flags & update_mapping)
-    mapping_get_data = Threads::new_task(&Mapping<dim, spacedim>::get_data,
-                                         *this->mapping,
-                                         flags,
-                                         quadrature);
+    mapping_get_data = Threads::new_task(
+      [&]() { return this->mapping->get_data(flags, quadrature); });
 
   this->update_flags = 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.