From: Bruno Turcksin Date: Thu, 18 Feb 2016 17:38:27 +0000 (-0500) Subject: Add a new IteratorFilters AtBoundary. X-Git-Tag: v8.5.0-rc1~1250^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7b8a348c6eb9b78cca9531e0364824a9fd01472;p=dealii.git Add a new IteratorFilters AtBoundary. --- 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()); + } }