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

Added Triangulation::create_cell_iterator(). #11365

Merged
merged 1 commit into from
Dec 21, 2020

Conversation

marcfehling
Copy link
Member

@marcfehling marcfehling commented Dec 13, 2020

Closes #11362. Blocked by #11364. (EDIT: merged)

include/deal.II/grid/cell_id.h Outdated Show resolved Hide resolved
@@ -2743,6 +2744,13 @@ class Triangulation : public Subscriptor
active_cell_iterator
last_active() const;

/**
* Return an iterator to a cell of this Triangulation object constructed from
* an independent CellId object.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add a sentence like this:

Suggested change
* an independent CellId object.
* an independent CellId object. If the given argument corresponds to a valid
* cell in this triangulation, this operation will always succeed for sequential
* triangulations where the current processor stores all cells that are part
* of the triangulation. On the other hand, if this is a parallel triangulation,
* then the current processor may not actually know about this cell and in this
* case ...
  • add what actually happens. I suspect that the operation is ok if it's a locally owned or ghost cell, but may not work if it's an artificial cell. Maybe say so.

Copy link
Member Author

Choose a reason for hiding this comment

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

I suspect so, too. Artificial cells may not be refined enough to create a cell iterator. I've adjusted the documentation and the error message accordingly.

include/deal.II/grid/tria.h Outdated Show resolved Hide resolved
source/grid/tria.cc Outdated Show resolved Hide resolved
@bangerth
Copy link
Member

/rebuild

Copy link
Member

@tjhei tjhei left a comment

Choose a reason for hiding this comment

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

Thank you for working on cleaning up my badly designed code. :-)

Copy link
Member

@kronbichler kronbichler left a comment

Choose a reason for hiding this comment

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

Looks good to me once we have agreed on a solution for #11364.

@marcfehling
Copy link
Member Author

Rebased on master. Ready for final review/merge.

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.

CellId::get_cell() should have been a member function of the Triangulation class
5 participants