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

GridTools::compute_active_cell_halo_layer() for periodic meshes #16632

Merged
merged 1 commit into from Feb 16, 2024

Conversation

peterrum
Copy link
Member

(this is used internally used by p:s:T)

@kronbichler
Copy link
Member

Can we adapt some of our tests with shared triangulation to periodic boundary conditions, so we keep a record of correctness?

@peterrum peterrum force-pushed the compute_active_cell_halo_layer_pbc branch from 55ab082 to a1055cd Compare February 12, 2024 17:58
Copy link
Member Author

@peterrum peterrum left a comment

Choose a reason for hiding this comment

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

@kronbichler

Can we adapt some of our tests with shared triangulation to periodic boundary conditions, so we keep a record of correctness?

I have added a test. However, it turned out that the generalization of the function was not completely enough to make p:s:T with artificial cells working for PBC. I needed to add an additional if-statement. See below.

Comment on lines +3243 to +3257
// In the case of shared Trinagulation with artificial cells all
// cells have valid DoF indices, i.e., the check above does not work.
if (const auto tria = dynamic_cast<
const parallel::shared::Triangulation<dim, spacedim> *>(
&face_1->get_triangulation()))
if (tria->with_artificial_cells() &&
(affine_constraints.get_local_lines().size() != 0))
for (unsigned int i = 0; i < dofs_per_face; ++i)
if ((affine_constraints.get_local_lines().is_element(dofs_1[i]) ==
false) ||
(affine_constraints.get_local_lines().is_element(dofs_2[i]) ==
false))
{
return;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

These lines

for (unsigned int i = 0; i < dofs_per_face; ++i)
if (dofs_1[i] == numbers::invalid_dof_index ||
dofs_2[i] == numbers::invalid_dof_index)
{
return;
}
do not work for p:s:T with artificial cells, since all DoFs are valid...

I added an additional check for p:s:T.

@tamiko tamiko merged commit 4994695 into dealii:master Feb 16, 2024
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

3 participants