From e7b8a348c6eb9b78cca9531e0364824a9fd01472 Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Thu, 18 Feb 2016 12:38:27 -0500 Subject: [PATCH] Add a new IteratorFilters AtBoundary. --- include/deal.II/grid/filtered_iterator.h | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/include/deal.II/grid/filtered_iterator.h b/include/deal.II/grid/filtered_iterator.h index 0be6f669c5..3ba88db584 100644 --- a/include/deal.II/grid/filtered_iterator.h +++ b/include/deal.II/grid/filtered_iterator.h @@ -299,6 +299,24 @@ namespace IteratorFilters */ const bool only_locally_owned; }; + + /** + * Filter for iterators that evaluates to true if the iterator of the object + * pointed to is on the boundary. + * + * @author Bruno Turcksin, 2016 + * + * @ingroup Iterators + */ + class AtBoundary + { + public: + /** + * Evaluate the iterator and return true if the object at the boundary. + */ + template + bool operator () (const Iterator &i) const; + }; } @@ -1215,6 +1233,17 @@ namespace IteratorFilters active_fe_indices.find(i->active_fe_index()) != active_fe_indices.end(); } + + +// ---------------- IteratorFilters::AtBoundary --------- + + template + inline + bool + AtBoundary::operator () (const Iterator &i) const + { + return (i->at_boundary()); + } } -- 2.39.5