]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Avoid the use of member templates when spawning, as this confuses compilers.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 17 May 2001 16:07:15 +0000 (16:07 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 17 May 2001 16:07:15 +0000 (16:07 +0000)
git-svn-id: https://svn.dealii.org/trunk@4659 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/dof_tools.cc
deal.II/deal.II/source/numerics/derivative_approximation.cc

index f11ce7eedb1e5e3fdcecdc1c499523d2985fab54..d43032d5af60f9ac54c4930152786ea9e7c6fad7 100644 (file)
@@ -1139,9 +1139,12 @@ DoFTools::count_dofs_per_component (const DoFHandler<dim>     &dof_handler,
   Threads::ThreadManager thread_manager;
   for (unsigned int i=0; i<n_components; ++i)
     {
+      void (*fun_ptr) (const DoFHandler<dim>      &,
+                      const std::vector<bool>    &,
+                      std::vector<bool>          &) = &DoFTools::template extract_dofs<dim>;
       component_select[i][i] = true;
       Threads::spawn (thread_manager,
-                     Threads::encapsulate (&DoFTools::template extract_dofs<dim>)
+                     Threads::encapsulate (fun_ptr)
                      .collect_args (dof_handler, component_select[i],
                                     dofs_in_component[i]));
     };
@@ -1739,9 +1742,18 @@ DoFTools::compute_intergrid_weights_2 (const DoFHandler<dim>              &coars
                                                                 multithread_info.n_default_threads);
 
   Threads::ThreadManager thread_manager;
+  void (*fun_ptr) (const DoFHandler<dim>              &,
+                  const unsigned int                  ,
+                  const InterGridMap<DoFHandler,dim> &,
+                  const std::vector<Vector<double> > &,
+                  const std::vector<int>             &,
+                  std::vector<std::map<unsigned int, float> > &,
+                  const typename DoFHandler<dim>::active_cell_iterator &,
+                  const typename DoFHandler<dim>::active_cell_iterator &)
+    = &DoFTools::template compute_intergrid_weights_3<dim>;
   for (unsigned int i=0; i<multithread_info.n_default_threads; ++i)
     Threads::spawn (thread_manager,
-                   Threads::encapsulate (&DoFTools::template compute_intergrid_weights_3<dim>)
+                   Threads::encapsulate (fun_ptr)
                    .collect_args (coarse_grid, coarse_component,
                                   coarse_to_fine_grid_map, parameter_dofs,
                                   weight_mapping, weights,
index 053ad80c8dc4d15f75bdbf9f818041a1c01a4c51..ee006ca738761facdd5e83b188b3e147033b6c5b 100644 (file)
@@ -471,11 +471,16 @@ approximate_derivative (const Mapping<dim>    &mapping,
     = Threads::split_interval (0, dof_handler.get_tria().n_active_cells(),
                               n_threads);
   Threads::ThreadManager thread_manager;
+  void (*fun_ptr) (const Mapping<dim>    &,
+                  const DoFHandler<dim> &,
+                  const Vector<double>  &,
+                  const unsigned int     ,
+                  const IndexInterval   &,
+                  Vector<float>         &)
+    = &DerivativeApproximation::template approximate<DerivativeDescription,dim>;
   for (unsigned int i=0; i<n_threads; ++i)
     Threads::spawn (thread_manager,
-                   Threads::encapsulate
-                   (&DerivativeApproximation::
-                    template approximate<DerivativeDescription,dim>)
+                   Threads::encapsulate(fun_ptr)
                    .collect_args (mapping, dof_handler, solution, component,
                                   index_intervals[i],
                                   derivative_norm));

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.