From b3e08864eb2cfba80242fcb0972eb7012381c950 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 13 Apr 2018 11:51:13 -0600 Subject: [PATCH] Better document p::d::Triangulation::attach_mesh_data(). --- include/deal.II/distributed/tria.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/include/deal.II/distributed/tria.h b/include/deal.II/distributed/tria.h index cd129509cc..8dae2a39bc 100644 --- a/include/deal.II/distributed/tria.h +++ b/include/deal.II/distributed/tria.h @@ -890,7 +890,20 @@ namespace parallel /** * Internal function notifying all registered classes to attach their * data before repartitioning occurs. Called from - * execute_coarsening_and_refinement(). + * execute_coarsening_and_refinement() and save(). The function + * recursively visits all deal.II cells and corresponding p4est + * quadrants and calls the callbacks registered via + * register_data_attach() on the ones where data needs to be + * stored. + * + * This function is odd in that it is called on a p4est triangulation + * and a deal.II triangulation that may not be in sync when it is called + * from execute_coarsening_and_refinement(). Specifically, the p4est + * trees have already been refined and coarsened, but the deal.II + * triangulation has not. Consequently, when walking the two recursively, + * it can reason about which cells will remain after the deal.II + * triangulation has been brought up to date with regard to the p4est + * trees. */ void attach_mesh_data(); -- 2.39.5