Skip to content

Conversation

JordiManyer
Copy link
Member

@JordiManyer JordiManyer commented Aug 16, 2025

Attempt to fix issues #177 and #170.

Summary of the issue:

The usual workflow is: You create a triangulation, that by default has no ghost. When you then want to use the triangulation to create an FESpace, the ghosts are added back. The issue is that we loose the information on ghosts when we delete them, so we actually have to reconstruct the information we used to have but threw away. On top of being expensive, this also had the side effect of changing the type of the serial triangulations.

Fix:

Both for efficiency and traceability, I think it is convenient to keep the parents if possible. I have added a new attribute metadata to DistributedTriangulation, which stores the parents so that they can be used later.

A couple comments:

  • Because of how the triangulations were being created, I've had to change quite a bit of code to make this work elegantly. We now create an unghosted distributed triangulation, and then remove the ghosts from it. It makes sense, and the high-level API is kept unchanged. So this should have no repercussions on people's codes, but I guess we'll see? I've kept the low-level functions that (I think) are now unused, to try to minimise the damage the change might cause.
  • In terms of efficiency, I think we are not loosing anything. In the case of BodyFittedTriangulations, the parent is quite innexpensive. In the case of BoundaryTriangulations, the child is a view of the parent, so we were keeping the parent anyway. So memory-wise, this change has no cost whatsoever.

Other:

When testing these changes, I came across the following: Calling Boundary(with_ghost, model) would return the local processor boundaries (which include the faces at the interface between processors) instead of returning the local part of the global boundary. This is a technical issue, but it makes a difference when trying to keep track of the parent.

Copy link

codecov bot commented Sep 16, 2025

Codecov Report

❌ Patch coverage is 0% with 127 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (aa71c9c) to head (90fd338).

Files with missing lines Patch % Lines
src/Geometry.jl 0.00% 127 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##           master    #180   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files          15      15           
  Lines        3882    3948   +66     
======================================
- Misses       3882    3948   +66     
Flag Coverage Δ
mpi 0.00% <0.00%> (ø)
sequential 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant