From 8f0cc101bb162f6d16ea59c0eeb82028507c89a8 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Tue, 3 Nov 2020 12:21:26 +0100 Subject: [PATCH] Extend docu on global_active_cell_index --- include/deal.II/grid/tria_accessor.h | 15 +++++++++++++-- source/grid/tria.cc | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/include/deal.II/grid/tria_accessor.h b/include/deal.II/grid/tria_accessor.h index a5a22bfe88..c0d7f44fe0 100644 --- a/include/deal.II/grid/tria_accessor.h +++ b/include/deal.II/grid/tria_accessor.h @@ -3450,13 +3450,24 @@ public: */ /** - * Return global active cell index for an active cell. + * Return globally unique cell index for a non-artificial active cell. The + * value is identical to active_cell_index() in the context of a serial + * triangulation. + * + * In the context of parallel triangulations, locally-owned cells are + * enumerated contiguously within each subdomain of the mesh. + * + * If a cell-data vector has been set up with + * parallel::TriangulationBase::global_active_cell_index_partitioner(), the + * returned index can be used to access the correct vector entry. */ types::global_cell_index global_active_cell_index() const; /** - * Return global level cell index for a level cell. + * Return a globally unique index for a non-artificial level cell. + * + * @note Similar to global_active_cell_index(). */ types::global_cell_index global_level_cell_index() const; diff --git a/source/grid/tria.cc b/source/grid/tria.cc index 13daa80bfa..a8e053e185 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -12696,7 +12696,7 @@ Triangulation::reset_global_cell_indices() { types::global_cell_index cell_index = 0; for (const auto &cell : active_cell_iterators()) - cell->set_active_cell_index(cell_index++); + cell->set_global_active_cell_index(cell_index++); } for (unsigned int l = 0; l < levels.size(); ++l) -- 2.39.5