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

hp::Collection: allow range-based loop #12893

Merged
merged 1 commit into from Oct 27, 2021

Conversation

peterrum
Copy link
Member

... just like in the case of VectorizedArray.

Copy link
Member

@marcfehling marcfehling left a comment

Choose a reason for hiding this comment

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

I like this!

Your test is about FECollection objects. For a moment I thought that a test for MappingCollection objects would be nice, but it's really not necessary as the both inherit from hp::Collection.

@marcfehling
Copy link
Member

doxygen complains:

/home/runner/work/dealii/dealii/include/deal.II/hp/collection.h:39: warning: argument 'lane' of command @param is not found in the argument list of hp::CollectionIterator< T >::CollectionIterator(const std::vector< std::shared_ptr< const T >> &data, const std::size_t index)
/home/runner/work/dealii/dealii/include/deal.II/hp/collection.h:44: warning: The following parameters of hp::CollectionIterator::CollectionIterator(const std::vector< std::shared_ptr< const T >> &data, const std::size_t index) are not documented:
  parameter 'index'

Copy link
Member

@bangerth bangerth left a comment

Choose a reason for hiding this comment

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

Yes, very nice! I had briefly looked at this after you had mentioned the issue in a comment, but found that we store a collection of pointers and that iterating over them wasn't going to be as easy as iterating over the pointers because we want to get back the objects. Nice work encoding this in your CollectionIterator class :-)

/rebuild

@peterrum
Copy link
Member Author

/rebuild

@bangerth bangerth merged commit f959ed1 into dealii:master Oct 27, 2021
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