#include <deal.II/base/config.h>
#include <deal.II/base/array_view.h>
-#include <deal.II/base/index_set.h>
#include <deal.II/base/mpi_tags.h>
#include <deal.II/base/numbers.h>
#include <deal.II/base/template_constraints.h>
+#include <deal.II/base/utilities.h>
#include <boost/signals2.hpp>
* return the @p my_partition_id 's IndexSet.
*/
IndexSet
- create_evenly_distributed_partitioning(const unsigned int my_partition_id,
- const unsigned int n_partitions,
- const IndexSet::size_type total_size);
+ create_evenly_distributed_partitioning(
+ const unsigned int my_partition_id,
+ const unsigned int n_partitions,
+ const types::global_dof_index total_size);
/**
* A namespace for utility functions that abstract certain operations using
* starts at the index one larger than the last one stored on process p.
*/
std::vector<IndexSet>
- create_ascending_partitioning(const MPI_Comm & comm,
- const IndexSet::size_type locally_owned_size);
+ create_ascending_partitioning(
+ const MPI_Comm & comm,
+ const types::global_dof_index locally_owned_size);
/**
* Given the total number of elements @p total_size, create an evenly
*/
IndexSet
create_evenly_distributed_partitioning(
- const MPI_Comm & comm,
- const IndexSet::size_type total_size);
+ const MPI_Comm & comm,
+ const types::global_dof_index total_size);
#ifdef DEAL_II_WITH_MPI
/**
#include <deal.II/base/config.h>
#include <deal.II/base/exceptions.h>
-#include <deal.II/base/partitioner.h>
#include <deal.II/base/vectorization.h>
#include <deal.II/matrix_free/face_info.h>
#include <deal.II/matrix_free/shape_info.h>
-#include <deal.II/matrix_free/task_info.h>
#include <deal.II/matrix_free/vector_data_exchange.h>
#include <array>
template <typename, typename>
struct FPArrayComparator;
+
+ struct TaskInfo;
} // namespace MatrixFreeFunctions
} // namespace internal
template <int, int, bool>
class DoFCellAccessor;
+namespace Utilities
+{
+ namespace MPI
+ {
+ class Partitioner;
+ }
+} // namespace Utilities
+
#endif
namespace internal
#include <deal.II/matrix_free/dof_info.h>
#include <deal.II/matrix_free/mapping_info_storage.h>
#include <deal.II/matrix_free/shape_info.h>
-#include <deal.II/matrix_free/type_traits.h>
DEAL_II_NAMESPACE_OPEN
#include <deal.II/base/config.h>
#include <deal.II/base/exceptions.h>
-#include <deal.II/base/index_set.h>
#include <deal.II/base/memory_consumption.h>
+#include <deal.II/base/mpi.h>
#include <deal.II/base/tensor.h>
#include <deal.II/base/thread_management.h>
#include <deal.II/base/utilities.h>
#include <deal.II/base/config.h>
-#include <deal.II/base/partitioner.h>
+#include <deal.II/base/array_view.h>
+#include <deal.II/base/mpi.h>
+
+#include <deal.II/lac/vector_operation.h>
DEAL_II_NAMESPACE_OPEN
+#ifndef DOXYGEN
+
+// forward declaration
+namespace Utilities
+{
+ namespace MPI
+ {
+ class Partitioner;
+ }
+} // namespace Utilities
+
+#endif
+
+
namespace internal
{
namespace MatrixFreeFunctions
namespace Utilities
{
IndexSet
- create_evenly_distributed_partitioning(const unsigned int my_partition_id,
- const unsigned int n_partitions,
- const IndexSet::size_type total_size)
+ create_evenly_distributed_partitioning(
+ const unsigned int my_partition_id,
+ const unsigned int n_partitions,
+ const types::global_dof_index total_size)
{
+ static_assert(
+ std::is_same<types::global_dof_index, IndexSet::size_type>::value,
+ "IndexSet::size_type must match types::global_dof_index for "
+ "using this function");
const unsigned int remain = total_size % n_partitions;
const IndexSet::size_type min_size = total_size / n_partitions;
std::vector<IndexSet>
- create_ascending_partitioning(const MPI_Comm & comm,
- const IndexSet::size_type locally_owned_size)
+ create_ascending_partitioning(
+ const MPI_Comm & comm,
+ const types::global_dof_index locally_owned_size)
{
+ static_assert(
+ std::is_same<types::global_dof_index, IndexSet::size_type>::value,
+ "IndexSet::size_type must match types::global_dof_index for "
+ "using this function");
const unsigned int n_proc = n_mpi_processes(comm);
const std::vector<IndexSet::size_type> sizes =
all_gather(comm, locally_owned_size);
IndexSet
- create_evenly_distributed_partitioning(const MPI_Comm & comm,
- const IndexSet::size_type total_size)
+ create_evenly_distributed_partitioning(
+ const MPI_Comm & comm,
+ const types::global_dof_index total_size)
{
const unsigned int this_proc = this_mpi_process(comm);
const unsigned int n_proc = n_mpi_processes(comm);
std::vector<IndexSet>
- create_ascending_partitioning(const MPI_Comm & /*comm*/,
- const IndexSet::size_type locally_owned_size)
+ create_ascending_partitioning(
+ const MPI_Comm & /*comm*/,
+ const types::global_dof_index locally_owned_size)
{
return std::vector<IndexSet>(1, complete_index_set(locally_owned_size));
}
IndexSet
- create_evenly_distributed_partitioning(const MPI_Comm & /*comm*/,
- const IndexSet::size_type total_size)
+ create_evenly_distributed_partitioning(
+ const MPI_Comm & /*comm*/,
+ const types::global_dof_index total_size)
{
return complete_index_set(total_size);
}
#include <deal.II/base/mpi.templates.h>
#include <deal.II/base/mpi_compute_index_owner_internal.h>
#include <deal.II/base/mpi_consensus_algorithms.h>
+#include <deal.II/base/partitioner.h>
#include <deal.II/base/timer.h>
#include <deal.II/matrix_free/vector_data_exchange.h>