/* $Id$ */
/* */
-/* Copyright (C) 2001-2004, 2006-2009, 2011-2012 by the deal.II authors */
+/* Copyright (C) 2001-2004, 2006-2009, 2011-2013 by the deal.II authors */
/* */
/* This file is subject to QPL and may not be distributed */
/* without copyright and license information. Please refer */
assemble_matrix (LinearSystem &linear_system,
const typename DoFHandler<dim>::active_cell_iterator &begin_cell,
const typename DoFHandler<dim>::active_cell_iterator &end_cell,
- Threads::ThreadMutex &mutex) const;
+ Threads::Mutex &mutex) const;
};
// cells, and fill the matrix object with it. Since there is need for
// synchronization when filling the same matrix from different threads,
// we need a mutex here:
- Threads::ThreadMutex mutex;
+ Threads::Mutex mutex;
Threads::ThreadGroup<> threads;
for (unsigned int thread=0; thread<n_threads; ++thread)
threads += Threads::new_thread (&Solver<dim>::assemble_matrix,
Solver<dim>::assemble_matrix (LinearSystem &linear_system,
const typename DoFHandler<dim>::active_cell_iterator &begin_cell,
const typename DoFHandler<dim>::active_cell_iterator &end_cell,
- Threads::ThreadMutex &mutex) const
+ Threads::Mutex &mutex) const
{
FEValues<dim> fe_values (*fe, *quadrature,
update_gradients | update_JxW_values);
// function was exited by an exception that we did not forsee.
//
// deal.II implements the scoped locking pattern in the
- // ThreadMutex::ScopedLock class: it takes the mutex in the
+ // Treads::Mutex::ScopedLock class: it takes the mutex in the
// constructor and locks it; in its destructor, it unlocks it
// again. So here is how it is used:
- Threads::ThreadMutex::ScopedLock lock (mutex);
+ Threads::Mutex::ScopedLock lock (mutex);
for (unsigned int i=0; i<dofs_per_cell; ++i)
for (unsigned int j=0; j<dofs_per_cell; ++j)
linear_system.matrix.add (local_dof_indices[i],
/* $Id$ */
/* */
-/* Copyright (C) 2002-2012 by the deal.II authors */
+/* Copyright (C) 2002-2013 by the deal.II authors */
/* */
/* This file is subject to QPL and may not be distributed */
/* without copyright and license information. Please refer */
assemble_matrix (LinearSystem &linear_system,
const typename DoFHandler<dim>::active_cell_iterator &begin_cell,
const typename DoFHandler<dim>::active_cell_iterator &end_cell,
- Threads::ThreadMutex &mutex) const;
+ Threads::Mutex &mutex) const;
};
dof_handler.end (),
n_threads);
- Threads::ThreadMutex mutex;
+ Threads::Mutex mutex;
Threads::ThreadGroup<> threads;
for (unsigned int thread=0; thread<n_threads; ++thread)
threads += Threads::new_thread (&Solver<dim>::assemble_matrix,
Solver<dim>::assemble_matrix (LinearSystem &linear_system,
const typename DoFHandler<dim>::active_cell_iterator &begin_cell,
const typename DoFHandler<dim>::active_cell_iterator &end_cell,
- Threads::ThreadMutex &mutex) const
+ Threads::Mutex &mutex) const
{
FEValues<dim> fe_values (*fe, *quadrature,
update_gradients | update_JxW_values);
cell->get_dof_indices (local_dof_indices);
- Threads::ThreadMutex::ScopedLock lock (mutex);
+ Threads::Mutex::ScopedLock lock (mutex);
for (unsigned int i=0; i<dofs_per_cell; ++i)
for (unsigned int j=0; j<dofs_per_cell; ++j)
linear_system.matrix.add (local_dof_indices[i],
/* $Id$ */
/* */
-/* Copyright (C) 2000-2004, 2006-2008, 2010-2012 by the deal.II authors */
+/* Copyright (C) 2000-2004, 2006-2008, 2010-2013 by the deal.II authors */
/* */
/* This file is subject to QPL and may not be distributed */
/* without copyright and license information. Please refer */
// has to wait), then write to the matrix and finally release the
// lock. Note that if the library was not compiled to support
// multithreading (which you have to specify at the time you call the
- // <code>./configure</code> script in the top-level directory), then a
- // dummy the actual data type of the typedef
- // <code>Threads::ThreadMutex</code> is a class that provides all the
+ // <code>./configure</code> script in the top-level directory), then
+ // the actual data type of the typedef
+ // <code>Threads::Mutex</code> is a dummy class that provides all the
// functions needed for a mutex, but does nothing when they are called;
// this is reasonable, of course, since if only one thread is running at a
// time, there is no need to synchronize with other threads.
- Threads::ThreadMutex assembler_lock;
+ Threads::Mutex assembler_lock;
};