From 1f4d8319f56324e37cb4481bcaa693ffa14d0f29 Mon Sep 17 00:00:00 2001
From: Wolfgang Bangerth <bangerth@colostate.edu>
Date: Thu, 29 Sep 2022 10:27:32 -0600
Subject: [PATCH] Add to the documentation of a function in GridTools.

---
 include/deal.II/grid/grid_tools.h | 17 +++++++++++++++--
 source/grid/grid_tools.cc         |  2 +-
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h
index d38176e604..66e73e3ed6 100644
--- a/include/deal.II/grid/grid_tools.h
+++ b/include/deal.II/grid/grid_tools.h
@@ -3375,8 +3375,21 @@ namespace GridTools
     std::map<unsigned int, unsigned int> &vertex_to_coinciding_vertex_group);
 
   /**
-   * Return a map that, for each vertex, lists all the processes whose
-   * subdomains are adjacent to that vertex.
+   * Return a map that, for each vertex of the given triangulation,
+   * provides a set of all the process subdomain ids whose subdomains
+   * are adjacent to that vertex. The set excludes the subdomain id
+   * of the current process. As a consequence, for a given vertex,
+   * the returned set consists of exactly those subdomain ids that
+   * correspond to the
+   * @ref GlossGhostCell "ghost cells"
+   * adjacent to that vertex, assuming there are any such ghost cells.
+   *
+   * For vertices that are not adjacent to a ghost cell, the map contains
+   * no entries, and this should be interpreted in the same way as if
+   * the map contained an entry for a given vertex index, but that the
+   * `std::set` associated with that map entry is simply empty.
+   * For non-parallel triangulations, the map is consequently empty
+   * since no vertex has adjacent ghost cells.
    *
    * @param[in] tria Triangulation.
    */
diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc
index a86aec6123..78b73d0097 100644
--- a/source/grid/grid_tools.cc
+++ b/source/grid/grid_tools.cc
@@ -6736,7 +6736,7 @@ namespace GridTools
       for (const unsigned int v : cell->vertex_indices())
         vertex_of_own_cell[cell->vertex_index(v)] = true;
 
-    // 3) for each vertex belonging to a locally owned cell all ghost
+    // 3) for each vertex belonging to a locally owned cell, find all ghost
     //    neighbors (including the periodic own)
     std::map<unsigned int, std::set<types::subdomain_id>> result;
 
-- 
2.39.5