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() not working for PBC #14100

Open
peterrum opened this issue Jul 6, 2022 · 0 comments
Open

GridTools::compute_active_cell_halo_layer() not working for PBC #14100

peterrum opened this issue Jul 6, 2022 · 0 comments
Labels

Comments

@peterrum
Copy link
Member

peterrum commented Jul 6, 2022

While having a look at the implementation of GridTools::compute_active_cell_halo_layer(), I have noticed that they cannot work for periodicity, since they do not consider coinciding vertices here:

for (const auto &cell : mesh.active_cell_iterators())
if (predicate(cell)) // True predicate --> Part of subdomain
for (const auto v : cell->vertex_indices())
locally_active_vertices_on_subdomain[cell->vertex_index(v)] = true;

They should however, as done here:

for (const auto v : cell->vertex_indices())
{
vertices_owned_by_locally_owned_cells[cell->vertex_index(
v)] = true;
const auto coinciding_vertex_group =
vertex_to_coinciding_vertex_group.find(
cell->vertex_index(v));
if (coinciding_vertex_group !=
vertex_to_coinciding_vertex_group.end())
for (const auto &co_vertex : coinciding_vertex_groups.at(
coinciding_vertex_group->second))
vertices_owned_by_locally_owned_cells[co_vertex] = true;
}

This also implies that p:s:T with artificial cells does not work either for periodicity.

@peterrum peterrum added the Bug label Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant