]> https://gitweb.dealii.org/ - dealii.git/commitdiff
replace n_default_threads by n_threads()
authorTimo Heister <timo.heister@gmail.com>
Wed, 2 Oct 2013 17:52:30 +0000 (17:52 +0000)
committerTimo Heister <timo.heister@gmail.com>
Wed, 2 Oct 2013 17:52:30 +0000 (17:52 +0000)
git-svn-id: https://svn.dealii.org/trunk@31076 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/multithread_info.h
deal.II/include/deal.II/lac/sparse_vanka.h
deal.II/include/deal.II/matrix_free/dof_info.h
deal.II/include/deal.II/matrix_free/dof_info.templates.h
deal.II/include/deal.II/matrix_free/matrix_free.h
deal.II/include/deal.II/numerics/data_out_faces.h
deal.II/include/deal.II/numerics/data_out_rotation.h
deal.II/source/dofs/dof_tools_constraints.cc
deal.II/source/numerics/derivative_approximation.cc
deal.II/source/numerics/matrix_tools.cc

index 38a3f214649b47b7c50d29099ac05ea54e0362f7..4fca80774a9b97f6e7e9bff9a3cabf1309042ed2 100644 (file)
@@ -93,7 +93,7 @@ public:
 
   /*
    * Returns the number of threads to use. This is governed by the number
-   * of cores the system has and can be further restricted by
+   * of cores the system has (n_cpus) and can be further restricted by
    * set_thread_limit().
    */
   unsigned int n_threads() const;
index fba90664de9ad4bdfa1f9bc187c9b2f1a63e2a70..4fef3f67d140f8501db24ce5a3fb3fa2468436ca 100644 (file)
@@ -55,7 +55,7 @@ template <typename number> class SparseBlockVanka;
  * Objects of this class are constructed by passing a vector of indices
  * of the degrees of freedom of the Lagrange multiplier. In the actual
  * preconditioning method, these rows are traversed in the order in which
- * the appear in the matrix. Since this is a Gauß-Seidel like procedure,
+ * the appear in the matrix. Since this is a Gau-Seidel like procedure,
  * remember to have a good ordering in advance (for transport dominated
  * problems, Cuthill-McKee algorithms are a good means for this, if points
  * on the inflow boundary are chosen as starting points for the renumbering).
@@ -189,15 +189,12 @@ public:
    * building the inverses of the
    * diagonal blocks. This
    * parameter is ignored if not in
-   * multithreaded mode. By
-   * default, this variable is set
-   * to the value of
-   * <tt>multithread_info.n_default_threads</tt>.
+   * multithreaded mode.
    */
   SparseVanka(const SparseMatrix<number> &M,
               const std::vector<bool>    &selected,
               const bool                  conserve_memory = false,
-              const unsigned int          n_threads       = multithread_info.n_default_threads);
+              const unsigned int          n_threads       = multithread_info.n_threads());
 
   /**
    * Destructor.
@@ -546,7 +543,7 @@ public:
                     const unsigned int          n_blocks,
                     const BlockingStrategy      blocking_strategy,
                     const bool                  conserve_memory = false,
-                    const unsigned int          n_threads       = multithread_info.n_default_threads);
+                    const unsigned int          n_threads       = multithread_info.n_threads());
 
   /**
    * Apply the preconditioner.
index d6a4e2661228af7ff4646645252a4269a5d05fc6..6fdc4f49282b9808916e46d322cd4ac472b1bceb 100644 (file)
@@ -208,8 +208,7 @@ namespace internal
        * This helper function determines a block size if the user decided not
        * to force a block size through MatrixFree::AdditionalData. This is
        * computed based on the number of hardware threads on the system
-       * (multithread_info.n_default_threads) and the number of macro cells
-       * that we should work on.
+       *  and the number of macro cells that we should work on.
        */
       void guess_block_size (const SizeInfo &size_info,
                              TaskInfo       &task_info);
index 8ab56dcc92974e3c823509b3534a81ad53c8baf2..bb7a62128d8b96012b66f04ce523942f1e2d1392 100644 (file)
@@ -796,7 +796,7 @@ no_constraint:
           // we would like to have enough work to do, so as first guess, try
           // to get 50 times as many chunks as we have threads on the system.
           task_info.block_size =
-            size_info.n_macro_cells / (multithread_info.n_default_threads * 50);
+            size_info.n_macro_cells / (multithread_info.n_threads() * 50);
 
           // if there are too few degrees of freedom per cell, need to
           // increase the block size
index c3fe2de0f111f080a7235db803e8084bf5a60cb2..8c8b0a83f66385ecdb23e319b1d66a1541fbcc1e 100644 (file)
@@ -207,8 +207,8 @@ public:
     /**
      * Sets the number of so-called macro cells that should form one
      * partition. If zero size is given, the class tries to find a good size
-     * for the blocks based on the number of threads stored in
-     * multithread_info.n_default_threads and the number of cells
+     * for the blocks based on
+     * multithread_info.n_threads() and the number of cells
      * present. Otherwise, the given number is used. If the given number is
      * larger than one third of the number of total cells, this means no
      * parallelism. Note that in the case vectorization is used, a macro cell
index defebb091e7b49726ee615f4b953e86bcd632137..ada6d1aa91b79d207b8fdf214786944463755cf6 100644 (file)
@@ -147,10 +147,7 @@ public:
    * The function supports
    * multithreading, if deal.II is
    * compiled in multithreading
-   * mode. The default number of
-   * threads to be used to build
-   * the patches is set to
-   * <tt>multithread_info.n_default_threads</tt>.
+   * mode.
    */
   virtual void
   build_patches (const unsigned int n_subdivisions = 0);
index bdf5a847783a28d0e6a76765e23d4e14db190f19..f8e8d8aa9110483e19515c2152974c7d6a4edc8c 100644 (file)
@@ -150,10 +150,7 @@ public:
    * The function supports
    * multithreading, if deal.II is
    * compiled in multithreading
-   * mode. The default number of
-   * threads to be used to build
-   * the patches is set to
-   * <tt>multithread_info.n_default_threads</tt>.
+   * mode.
    */
   virtual void build_patches (const unsigned int n_patches_per_circle,
                               const unsigned int n_subdivisions = 0);
index 4909d3a7b5935537d3aab09681a838ca0feac1e8..d0f497919b46b5474a9a954677a9a35f22be94ba 100644 (file)
@@ -2285,7 +2285,7 @@ namespace DoFTools
         std::vector<std::pair<active_cell_iterator,active_cell_iterator> >
         cell_intervals = Threads::split_range<active_cell_iterator> (coarse_grid.begin_active(),
                          coarse_grid.end(),
-                         multithread_info.n_default_threads);
+                         multithread_info.n_threads());
 
         // TODO: use WorkStream here
 
@@ -2299,7 +2299,7 @@ namespace DoFTools
                          const typename dealii::DoFHandler<dim,spacedim>::active_cell_iterator &,
                          const typename dealii::DoFHandler<dim,spacedim>::active_cell_iterator &)
           = &compute_intergrid_weights_3<dim>;
-        for (unsigned int i=0; i<multithread_info.n_default_threads; ++i)
+        for (unsigned int i=0; i<multithread_info.n_threads(); ++i)
           tasks += Threads::new_task (fun_ptr,
                                       coarse_grid, coarse_component,
                                       coarse_to_fine_grid_map, parameter_dofs,
index bea59d99596781e4a3097443dde9f5ff96aba152..ce8f37fde0d245d4a79977f4aba604793a04f09a 100644 (file)
@@ -626,7 +626,7 @@ approximate_derivative (const Mapping<dim,spacedim>    &mapping,
   Assert (component < dof_handler.get_fe().n_components(),
           ExcIndexRange (component, 0, dof_handler.get_fe().n_components()));
 
-  const unsigned int n_threads = multithread_info.n_default_threads;
+  const unsigned int n_threads = multithread_info.n_threads();
   std::vector<IndexInterval> index_intervals
     = Threads::split_interval (0, dof_handler.get_tria().n_active_cells(),
                                n_threads);
index 32119a2330eda2513a9ee80406e7a29b3c7e6849..af0e940cc8bbdbc591900945156a28f28d586cb4 100644 (file)
@@ -1184,7 +1184,7 @@ namespace MatrixCreator
     else
       AssertDimension (n_components, component_mapping.size());
 
-    const unsigned int n_threads = multithread_info.n_default_threads;
+    const unsigned int n_threads = multithread_info.n_threads();
     Threads::ThreadGroup<> threads;
 
     // define starting and end point
@@ -1660,7 +1660,7 @@ namespace MatrixCreator
     else
       AssertDimension (n_components, component_mapping.size());
 
-    const unsigned int n_threads = multithread_info.n_default_threads;
+    const unsigned int n_threads = multithread_info.n_threads();
     Threads::ThreadGroup<> threads;
 
     // define starting and end point

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.