]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Reduce the number of arguments of a helper function from 10 to 9 to make it work...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 10 Oct 2008 23:32:01 +0000 (23:32 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 10 Oct 2008 23:32:01 +0000 (23:32 +0000)
git-svn-id: https://svn.dealii.org/trunk@17177 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/error_estimator.h
deal.II/deal.II/source/numerics/error_estimator.cc

index f2f342ff57bc7876f6f516f68ed8dfe837619f18..ad66e67c754305288f73bd902465da827946c9ac 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -699,8 +699,7 @@ class KellyErrorEstimator
                                const hp::QCollection<dim-1>         &quadrature,
                                const typename FunctionMap<dim>::type &neumann_bc,
                                const std::vector<const InputVector *> &solutions,
-                               const std::vector<bool>                  &component_mask,
-                               const Function<dim>                 *coefficients,
+                              const std::pair<const std::vector<bool>*,const Function<dim>*> &component_mask_and_coefficients,
                                const std::pair<unsigned int, unsigned int> this_thread,
                                typename FaceIntegrals<DH>::type    &face_integrals,
                                PerThreadData                       &per_thread_data);
index 4abda8a0d8aaee0c039d4e6ba8b72b26f3a621ac..5e35be9482a52df29c0f1c8ea6299c40db9ea5c0 100644 (file)
@@ -643,12 +643,14 @@ estimate_some (const hp::MappingCollection<dim>                  &mapping,
                const hp::QCollection<dim-1>             &quadrature,
                const typename FunctionMap<dim>::type &neumann_bc,
                const std::vector<const InputVector *> &solutions,
-               const std::vector<bool>                  &component_mask,
-               const Function<dim>                 *coefficients,
+              const std::pair<const std::vector<bool>*,const Function<dim>*> &component_mask_and_coefficients,
                const std::pair<unsigned int, unsigned int> this_thread,
                typename FaceIntegrals<DH>::type                       &face_integrals,
                PerThreadData                       &per_thread_data)
 {
+  const std::vector<bool> &component_mask = *component_mask_and_coefficients.first;
+  const Function<dim>     *coefficients   = component_mask_and_coefficients.second;
+
   const unsigned int n_solution_vectors = solutions.size();
   const unsigned int n_components       = dof_handler.get_fe().n_components();
   
@@ -1020,8 +1022,7 @@ estimate (const Mapping<dim>                  &mapping,
                             const hp::QCollection<dim-1>             &,
                             const typename FunctionMap<dim>::type &,
                             const std::vector<const InputVector *> &,
-                            const std::vector<bool>               &,
-                            const Function<dim>                 *,
+                            const std::pair<const std::vector<bool>*,const Function<dim>*> &,
                             const std::pair<unsigned int, unsigned int>,
                             typename FaceIntegrals<DH>::type                       &,
                             PerThreadData                       &)
@@ -1034,7 +1035,7 @@ estimate (const Mapping<dim>                  &mapping,
     threads += Threads::spawn (estimate_some_ptr)
                (mapping_collection, dof_handler,
                 face_quadratures, neumann_bc, solutions,
-                component_mask, coefficients,
+                std::make_pair(&component_mask, coefficients),
                 std::make_pair(i, n_threads),
                 face_integrals,
                 *data_structures[i]);

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.