From: Timo Heister Date: Wed, 23 Oct 2019 15:43:00 +0000 (+0200) Subject: address comments X-Git-Tag: v9.2.0-rc1~951^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4412691e3aeb7ae7f2d1f658b11b0efb54980c4;p=dealii.git address comments --- diff --git a/include/deal.II/base/mpi.h b/include/deal.II/base/mpi.h index a5e897bc6f..35e136b5d8 100644 --- a/include/deal.II/base/mpi.h +++ b/include/deal.II/base/mpi.h @@ -233,6 +233,11 @@ namespace Utilities : comm(duplicate_communicator(communicator)) {} + /** + * Do not allow making copies. + */ + DuplicatedCommunicator(const DuplicatedCommunicator &) = delete; + /** * The destructor will free the communicator automatically. */ @@ -249,10 +254,6 @@ namespace Utilities return comm; } - /** - * Do not allow making copies. - */ - DuplicatedCommunicator(const DuplicatedCommunicator &) = delete; /** * Do not allow assignment of this class. diff --git a/source/base/mpi.cc b/source/base/mpi.cc index 3c7318b519..32bde89b6c 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -106,6 +106,7 @@ namespace Utilities void free_communicator(MPI_Comm &mpi_communicator) { + // MPI_Comm_free will set the argument to MPI_COMM_NULL automatically. const int ierr = MPI_Comm_free(&mpi_communicator); AssertThrowMPI(ierr); }