Skip to content

Make MeshTools::n_connected_components() much faster#4449

Open
roystgnr wants to merge 5 commits intolibMesh:develfrom
roystgnr:faster_n_components
Open

Make MeshTools::n_connected_components() much faster#4449
roystgnr wants to merge 5 commits intolibMesh:develfrom
roystgnr:faster_n_components

Conversation

@roystgnr
Copy link
Copy Markdown
Member

@roystgnr roystgnr commented May 5, 2026

This is mostly just an analysis tool I was using to verify some Flex IGA meshes, it's just that it was supposed to be so fast in general that I could just throw it in the calculator app and forget about it, and it turned out that it wasn't.

This is still taking seconds on an interestingly-ordered multimillion-element mesh, when it should be taking fractions of a second, but it used to be taking hours, so I'm stopping here for now and calling it a win. Now it's at least faster than a calculator solve.

roystgnr added 5 commits May 5, 2026 13:08
Not fast enough yet, but 2.5x improvement is a start.
This is faster, though not by as much as I'd hoped.
This is orders of magnitude faster than merging larger into smaller.
This is usually correct, which means we only do the linear search
through other components 1/4 of the time and we run 4x faster.
I think we still have room for another OOM improvement on typical
multi-million-element problems here, and this output would be helpful
for getting runs on those under a second, but now I'm getting results in
seconds rather than in hours and that's good enough for me.
@moosebuild
Copy link
Copy Markdown

Job Coverage, step Generate coverage on 7088e01 wanted to post the following:

Coverage

707101 #4449 7088e0
Total Total +/- New
Rate 65.47% 65.48% +0.01% 100.00%
Hits 78231 78238 +7 17
Misses 41259 41253 -6 0

Diff coverage report

Full coverage report

This comment will be updated on new commits.

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.

2 participants