From: Martin Kronbichler Date: Sat, 5 Dec 2015 10:02:47 +0000 (+0100) Subject: Provide read access to the MPI partitioner, improve documentation X-Git-Tag: v8.4.0-rc2~147^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8ebcb84a345f68ec69f25e92b15da86420c24b8;p=dealii.git Provide read access to the MPI partitioner, improve documentation --- diff --git a/include/deal.II/lac/parallel_vector.h b/include/deal.II/lac/parallel_vector.h index dbc39aa93b..74c9e58da7 100644 --- a/include/deal.II/lac/parallel_vector.h +++ b/include/deal.II/lac/parallel_vector.h @@ -144,12 +144,12 @@ namespace parallel * * This vector class is based on two different number types for indexing. * The so-called global index type encodes the overall size of the vector. - * Its type is types::global_dof_index. The largest possible - * value is 2^32-1 or approximately four billion in case 64 - * bit integers are disabled at configuration of deal.II (default case) or + * Its type is types::global_dof_index. The largest possible value is + * 2^32-1 or approximately 4 billion in case 64 bit integers + * are disabled at configuration of deal.II (default case) or * 2^64-1 or approximately 10^19 if 64 bit - * integers are enabled (see the glossary entry on - * @ref GlobalDoFIndex for further information). + * integers are enabled (see the glossary entry on @ref GlobalDoFIndex for + * further information). * * The second relevant index type is the local index used within one MPI * rank. As opposed to the global index, the implementation assumes 32-bit @@ -983,14 +983,24 @@ namespace parallel */ const MPI_Comm &get_mpi_communicator () const; + /** + * Return the MPI partitioner that describes the parallel layout of the + * vector. This object can be used to initialize another vector with the + * respective reinit() call, for additional queries regarding the + * parallel communication, or the compatibility of partitioners. + */ + std_cxx11::shared_ptr + get_partitioner () const; + /** * Checks whether the given partitioner is compatible with the * partitioner used for this vector. Two partitioners are compatible if * they have the same local size and the same ghost indices. They do not - * necessarily need to be the same data field. This is a local operation - * only, i.e., if only some processors decide that the partitioning is - * not compatible, only these processors will return @p false, whereas - * the other processors will return @p true. + * necessarily need to be the same data field of the shared + * pointer. This is a local operation only, i.e., if only some + * processors decide that the partitioning is not compatible, only these + * processors will return @p false, whereas the other processors will + * return @p true. */ bool partitioners_are_compatible (const Utilities::MPI::Partitioner &part) const; @@ -2387,6 +2397,16 @@ namespace parallel return partitioner->get_communicator(); } + + + template + inline + std_cxx11::shared_ptr + Vector::get_partitioner () const + { + return partitioner; + } + #endif // ifndef DOXYGEN } // end of namespace distributed