From bc47eea31d9e3c8c03c2cc3055f562368a2dbced Mon Sep 17 00:00:00 2001 From: Alexander Grayver Date: Thu, 31 Oct 2019 15:53:46 +0100 Subject: [PATCH] Do not transfer the MPI communicator when copying the triangulation --- doc/news/changes/minor/20193110Grayver | 4 ++++ include/deal.II/distributed/tria_base.h | 5 +++++ source/distributed/tria_base.cc | 2 -- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 doc/news/changes/minor/20193110Grayver diff --git a/doc/news/changes/minor/20193110Grayver b/doc/news/changes/minor/20193110Grayver new file mode 100644 index 0000000000..54fa72404e --- /dev/null +++ b/doc/news/changes/minor/20193110Grayver @@ -0,0 +1,4 @@ +Changed: parallel::TriangulationBase::copy_triangulation does not +copy the MPI communicator from the given source triangulation. +
+(Alexander Grayver, 2019/10/31) diff --git a/include/deal.II/distributed/tria_base.h b/include/deal.II/distributed/tria_base.h index 64b983080d..ffdb86988f 100644 --- a/include/deal.II/distributed/tria_base.h +++ b/include/deal.II/distributed/tria_base.h @@ -98,6 +98,11 @@ namespace parallel /** * Implementation of the same function as in the base class. + * + * @note This function copies the cells, but not the communicator, + * of the source triangulation. In other words, the resulting + * triangulation will operate on the communicator it was constructed + * with. */ virtual void copy_triangulation( diff --git a/source/distributed/tria_base.cc b/source/distributed/tria_base.cc index bad673e21e..0fb62f9a79 100644 --- a/source/distributed/tria_base.cc +++ b/source/distributed/tria_base.cc @@ -77,8 +77,6 @@ namespace parallel dynamic_cast *>(&other_tria)) { - mpi_communicator = other_tria_x->get_communicator(); - // release unused vector memory because we will have very different // vectors now ::dealii::internal::GrowingVectorMemoryImplementation:: -- 2.39.5