From: Wolfgang Bangerth Date: Thu, 16 Jan 2020 18:41:03 +0000 (-0700) Subject: Introduce CellAccessor::is_active(). X-Git-Tag: v9.2.0-rc1~653^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=712b5c0c566fcfad1eb5aeebc87bf3fb1f151696;p=dealii.git 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. --- 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