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

Add constrained entries to partitioner_coarse in NonNestedMG #15812

Merged

Conversation

fdrmrc
Copy link
Contributor

@fdrmrc fdrmrc commented Jul 31, 2023

The following error

--------------------------------------------------------
An error occurred in line <861> of file </workspace/dealii/include/deal.II/base/partitioner.h> in function
    unsigned int dealii::Utilities::MPI::Partitioner::global_to_local(dealii::types::global_dof_index) const
The violated condition was: 
    in_local_range(global_index) || is_ghost_entry(global_index)
Additional information: 
    Global index 302 neither owned nor ghost on proc 5.

is triggered by:

constraint_info.read_dof_indices(i,
numbers::invalid_unsigned_int,
cell,
constraint_coarse,
this->partitioner_coarse);

when running with locally refined and a p::d::T triangulations. The present PR adds the missing constrained entries to the coarse partitioner (and a test with a locally-refined meshes)

Comment on lines 2229 to 2238
template <int dim, typename Number>
friend void
MGTwoLevelTransferNonNested<dim,
LinearAlgebra::distributed::Vector<Number>>::
reinit(const DoFHandler<dim> & dof_handler_fine,
const DoFHandler<dim> & dof_handler_coarse,
const Mapping<dim> & mapping_fine,
const Mapping<dim> & mapping_coarse,
const AffineConstraints<Number> &constraint_fine,
const AffineConstraints<Number> &constraint_coarse);
Copy link
Member

Choose a reason for hiding this comment

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

? I guess this should be in the .h file?

Copy link
Contributor Author

@fdrmrc fdrmrc Jul 31, 2023

Choose a reason for hiding this comment

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

The issue is that MGTwoLevelTransferImplementation::create_coarse_partitioner() is defined in .templates.h and is private. Some compilers are also not happy with the present PR, so I moved it to public members and removed the friend declaration. Do you agree with that? I don't know what would be the best option

@peterrum
Copy link
Member

peterrum commented Aug 1, 2023

/rebuild

@peterrum peterrum merged commit 7c0fd73 into dealii:master Aug 1, 2023
15 checks passed
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

2 participants