From: Martin Kronbichler Date: Wed, 31 May 2023 19:16:03 +0000 (+0200) Subject: Merge pull request #14536 from marcfehling/reinit-ghosted X-Git-Tag: v9.5.0-rc1~176 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e5ff53fb8fe27e059b603957f6f34c57a81c7b2;p=dealii.git Merge pull request #14536 from marcfehling/reinit-ghosted Choose to initialize ghost elements with reinit(partitioner). --- 3e5ff53fb8fe27e059b603957f6f34c57a81c7b2 diff --cc include/deal.II/lac/la_parallel_vector.h index dd71ae63e0,3111356866..9d4e6bd9ec --- a/include/deal.II/lac/la_parallel_vector.h +++ b/include/deal.II/lac/la_parallel_vector.h @@@ -401,8 -403,20 +401,20 @@@ namespace LinearAlgebr void reinit( const std::shared_ptr &partitioner, - const MPI_Comm &comm_sm = MPI_COMM_SELF); + const MPI_Comm comm_sm = MPI_COMM_SELF); + /** + * This function exists purely for reasons of compatibility with the + * PETScWrappers::MPI::Vector and TrilinosWrappers::MPI::Vector classes. + * + * It calls the function above, and ignores the parameter @p make_ghosted. + */ + void + reinit( + const std::shared_ptr &partitioner, + const bool make_ghosted, + const MPI_Comm &comm_sm = MPI_COMM_SELF); + /** * Initialize vector with @p local_size locally-owned and @p ghost_size * ghost degrees of freedoms. diff --cc include/deal.II/lac/petsc_vector.h index 3347055df1,0f654eea20..cfb3793932 --- a/include/deal.II/lac/petsc_vector.h +++ b/include/deal.II/lac/petsc_vector.h @@@ -353,8 -349,16 +356,9 @@@ namespace PETScWrapper */ void reinit( - const std::shared_ptr &partitioner); + const std::shared_ptr &partitioner, + const bool make_ghosted = true); - /** - * Return a reference to the MPI communicator object in use with this - * vector. - */ - const MPI_Comm & - get_mpi_communicator() const override; - /** * Print to a stream. @p precision denotes the desired precision with * which values shall be printed, @p scientific whether scientific