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

OfflineData: 3D support: normal and normal mass may not be computed correctly across MPI ranks #39

Open
tamiko opened this issue Feb 6, 2024 · 1 comment
Labels
Milestone

Comments

@tamiko
Copy link
Member

tamiko commented Feb 6, 2024

The logic in OfflineData<dim, Number>::construct_boundary_map currently reads as follows:

for (auto cell = begin; cell != end; ++cell) {

  if (!cell->is_artificial() /* !cell->is_artificial_on_level() /*)
    continue;

  for (auto f : GeometryInfo<dim>::face_indices()) {
    const auto face = cell->face(f);
    const auto id = face->boundary_id();

    if (!face->at_boundary())
      continue;

    // ...

    /* Skip nonlocal degrees of freedom: */                                
    if (index >= n_locally_owned_)                                         
      continue; 
  }   /* f */
}     /* cell */

This logic only works in 2D and will fail in 3D when we encounter hanging nodes on boundaries. We might also miss to set up boundary degrees of freedom.

@tamiko tamiko added the bug label Feb 6, 2024
@tamiko tamiko changed the title Local refinement: normal and mass are not computed correctly across MPI ranks OfflineData: normal and mass are not computed correctly across MPI ranks Feb 7, 2024
@tamiko tamiko added this to the ryujin v1.0 milestone Apr 11, 2024
@tamiko
Copy link
Member Author

tamiko commented Jun 5, 2024

Fix should be straightforward: We need to assemble the normal (and boundary mass) into a temporary vector with AffineConstraints::add_local_to_global() and compress(VectorOperation::add) after assembly.
Then, we can collect the normal and put it into our BoundaryMap.

@tamiko tamiko changed the title OfflineData: normal and mass are not computed correctly across MPI ranks OfflineData: 3D support: normal and mass are not computed correctly across MPI ranks Jun 15, 2024
@tamiko tamiko changed the title OfflineData: 3D support: normal and mass are not computed correctly across MPI ranks OfflineData: 3D support: normal and normal mass may not be computed correctly across MPI ranks Nov 18, 2024
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