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

p:d:GridRefinement: accept other types of triangulations #14072

Merged
merged 1 commit into from Jul 14, 2022

Conversation

peterrum
Copy link
Member

@peterrum peterrum commented Jun 28, 2022

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.

Can you add a dynamic_cast check for parallel::DistributedTriangulationBase?

For Triangulation and parallel::shared::Triangulation we have the normal GridRefinement namespace.

@peterrum
Copy link
Member Author

Can you add a dynamic_cast check for parallel::DistributedTriangulationBase?
For Triangulation and parallel::shared::Triangulation we have the normal GridRefinement namespace.

As far as I see it, the functions are working for any triangulation. So I don't want to add a check. Furthermore, I see this more as a first step to move make these functions part of the normal namespace.

@marcfehling
Copy link
Member

As far as I see it, the functions are working for any triangulation. So I don't want to add a check. Furthermore, I see this more as a first step to move make these functions part of the normal namespace.

Yes, they should work for any Triangulation. I use some of the functionality also in the hp::Refinement namespace.

@marcfehling
Copy link
Member

/jenkins/workspace/dealii_PR-14072/source/distributed/grid_refinement.cc:108:44: error: ‘const class dealii::Triangulation<2, 3>’ has no member named ‘n_locally_owned_active_cells’
     Assert(locally_owned_indicators.size()

@marcfehling
Copy link
Member

I assume you want to use this functionality in the context of parallel::shared::Triangulation? Let's wait on more feedback to #14073 (comment) before merging this patch...

@peterrum
Copy link
Member Author

I assume you want to use this functionality in the context of parallel::shared::Triangulation? Let's wait on more feedback to #14073 (comment) before merging this patch...

No that one is unrelated.

Comment on lines 154 to +158
refine_and_coarsen_fixed_number(
parallel::distributed::Triangulation<dim, spacedim> &tria,
const dealii::Vector<Number> & criteria,
Triangulation<dim, spacedim> & tria,
const dealii::Vector<Number> & criteria,
Copy link
Member

Choose a reason for hiding this comment

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

The initial comment of this function still says Like dealii::GridRefinement::refine_and_coarsen_fixed_number, but for parallel distributed triangulations. - I am wondering if we can use a simpler-to-recognize name, e.g. Like dealii::GridRefinement::refine_and_coarsen_fixed_number, but designed for parallel computations. Together with the rest of the description, this would seem to be more accurate.

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 am have made the changes. I also have added the information what parallel means here.

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 otherwise.

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

5 participants