Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterator filter predicates for boundary and manifold IDs #13154

Merged
merged 4 commits into from Dec 30, 2021

Conversation

jppelteret
Copy link
Member

No description provided.

std::size_t n_boundary_filtered_cells = 0;
for (const auto &filtered_cell :
tria.active_face_iterators() | IteratorFilters::AtBoundary() |
IteratorFilters::BoundaryIdEqualTo(boundary_id))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:-) That's just elegant!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm really happy that you implemented operator|. It's so nice to chain these filters!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like that syntax. It's been used on the unix command line for 50 years, of course, and I like that we'll be able to use it in C++ as well (or at least will be with C++20).

@bangerth
Copy link
Member

/rebuild

@luca-heltai luca-heltai merged commit d9151fc into dealii:master Dec 30, 2021
@jppelteret jppelteret deleted the iterator_filter_predicates_01 branch January 2, 2022 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants