From 712b5c0c566fcfad1eb5aeebc87bf3fb1f151696 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 16 Jan 2020 11:41:03 -0700 Subject: [PATCH] Introduce CellAccessor::is_active(). The CellAccessor::active() function did not satisfy the usual naming scheme of that class in which functions are called CellAccessor::is_ghost(), CellAccessor::is_locally_owned(), etc. As a consequence, there is now a new function CellAccessor::is_active(), with the old function deprecated. --- include/deal.II/grid/tria_accessor.h | 21 +++++++++++++++++-- .../deal.II/grid/tria_accessor.templates.h | 9 ++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/include/deal.II/grid/tria_accessor.h b/include/deal.II/grid/tria_accessor.h index f961522042..dd51bbdf75 100644 --- a/include/deal.II/grid/tria_accessor.h +++ b/include/deal.II/grid/tria_accessor.h @@ -3411,16 +3411,33 @@ public: */ /** - * Test whether the cell has children (this is the criterion for activity of - * a cell). + * Test that the cell has no children (this is the criterion for whether a + * cell is called "active"). * * See the * @ref GlossActive "glossary" * for more information. + * + * @deprecated This function is deprecated. Use the is_active() + * function instead, which satisfies the naming scheme of other + * functions inquiring about yes/no properties of cells (e.g., + * is_ghost(), is_locally_owned(), etc.). */ + DEAL_II_DEPRECATED bool active() const; + /** + * Test that the cell has no children (this is the criterion for whether a + * cell is called "active"). + * + * See the + * @ref GlossActive "glossary" + * for more information. + */ + bool + is_active() const; + /** * Return whether this cell is owned by the current processor or is owned by * another processor. The function always returns true if applied to an diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index 92cdd0cc6e..65f9afe04e 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -3581,6 +3581,15 @@ CellAccessor::active() const +template +inline bool +CellAccessor::is_active() const +{ + return !this->has_children(); +} + + + template inline bool CellAccessor::is_locally_owned() const -- 2.39.5