From: Wolfgang Bangerth Date: Thu, 20 Apr 2023 20:13:23 +0000 (-0600) Subject: Merge pull request #15086 from luca-heltai/stefanozampini/get_mpi_comm_nonref X-Git-Tag: v9.5.0-rc1~306 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3d5e99640cbbadaa64390231b3d054528366e36;p=dealii.git Merge pull request #15086 from luca-heltai/stefanozampini/get_mpi_comm_nonref All get_mpi_communicator methods now return MPI_Comm by value --- c3d5e99640cbbadaa64390231b3d054528366e36 diff --cc include/deal.II/lac/petsc_block_vector.h index 1036745888,3935a0f2c7..9bec0c860d --- a/include/deal.II/lac/petsc_block_vector.h +++ b/include/deal.II/lac/petsc_block_vector.h @@@ -570,19 -515,12 +569,14 @@@ namespace PETScWrapper - inline const MPI_Comm & + inline MPI_Comm BlockVector::get_mpi_communicator() const { - static MPI_Comm comm = PETSC_COMM_SELF; - MPI_Comm pcomm = - PetscObjectComm(reinterpret_cast(petsc_nest_vector)); - if (pcomm != MPI_COMM_NULL) - comm = pcomm; - return comm; + return PetscObjectComm(reinterpret_cast(petsc_nest_vector)); } + + inline bool BlockVector::has_ghost_elements() const {