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
GridTools::compute_active_cell_halo_layer() for periodic meshes #16632
Conversation
Can we adapt some of our tests with shared triangulation to periodic boundary conditions, so we keep a record of correctness? |
55ab082
to
a1055cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
// 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; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines
dealii/source/dofs/dof_tools_constraints.cc
Lines 3236 to 3241 in a1055cd
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; | |
} |
I added an additional check for p:s:T.
(this is used internally used by
p:s:T
)