From 4c55fc2cd0e138a85930c92291face0b38d29152 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 18 Apr 2018 21:37:04 -0600 Subject: [PATCH] Minor improvements to some code in p::d::Triangulation. --- source/distributed/tria.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc index 73b8b48b70..2d8e0844fc 100644 --- a/source/distributed/tria.cc +++ b/source/distributed/tria.cc @@ -3267,10 +3267,12 @@ namespace parallel const void *)> &unpack_callback) { Assert (offset >= sizeof(CellStatus), - ExcMessage ("invalid offset in notify_ready_to_unpack()")); + ExcMessage ("Invalid offset.")); Assert (offset < sizeof(CellStatus)+attached_data_size, - ExcMessage ("invalid offset in notify_ready_to_unpack()")); - Assert (n_attached_datas > 0, ExcMessage ("notify_ready_to_unpack() called too often")); + ExcMessage ("Invalid offset.")); + Assert (n_attached_datas > 0, + ExcMessage ("The notify_ready_to_unpack() has already been called " + "once for each registered callback.")); // Recurse over p4est and hand the caller the data back for (typename Triangulation::cell_iterator @@ -3313,7 +3315,7 @@ namespace parallel // would destroy the saved data before the second SolutionTransfer can // get it. This created a bug that is documented in // tests/mpi/p4est_save_03 with more than one SolutionTransfer. - if (!n_attached_datas && n_attached_deserialize == 0) + if (n_attached_datas == 0 && n_attached_deserialize == 0) { // everybody got their data, time for cleanup! attached_data_size = 0; -- 2.39.5