From: Wolfgang Bangerth Date: Thu, 19 Apr 2018 03:37:04 +0000 (-0600) Subject: Minor improvements to some code in p::d::Triangulation. X-Git-Tag: v9.0.0-rc1~160^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c55fc2cd0e138a85930c92291face0b38d29152;p=dealii.git Minor improvements to some code in p::d::Triangulation. --- 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;