/*
* 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;
* 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).
* 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.
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.
* 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);
// 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
/**
* 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
* 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);
* 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);
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
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,
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);
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
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