Skip to content

Fix System::get_info() on uninitialized systems#4400

Merged
roystgnr merged 2 commits intolibMesh:develfrom
roystgnr:get_uninitialized_info
Mar 1, 2026
Merged

Fix System::get_info() on uninitialized systems#4400
roystgnr merged 2 commits intolibMesh:develfrom
roystgnr:get_uninitialized_info

Conversation

@roystgnr
Copy link
Copy Markdown
Member

Not sure what regressed this - the last time we added more output to get_info()? The DofMapBase refactoring? But currently if you call get_info() on an uninitialized system it will fail in the n_local_dofs() call, because _first_df hasn't even been resized yet.

Arguably DofMapBase calls like that should also be made more robust in the uninitialized case, but asking for data that obviously depends on initialization feels more avoidable at the application level than asking for a general info summary.

Most code doesn't do this, but when a code does it should still get some
info, not just an assertion failure or a segfault.
@roystgnr
Copy link
Copy Markdown
Member Author

Actually, this might have been due to a behavioral change elsewhere, an app's post-EquationSystems::init add_system() that was no longer getting individually initialized. Regardless IMHO this change is an improvement.

@moosebuild
Copy link
Copy Markdown

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

Coverage

7786fa #4400 b4a418
Total Total +/- New
Rate 65.34% 65.34% +0.00% 100.00%
Hits 77847 77849 +2 12
Misses 41291 41291 - 0

Diff coverage report

Full coverage report

This comment will be updated on new commits.

@roystgnr roystgnr merged commit a291924 into libMesh:devel Mar 1, 2026
26 checks passed
@roystgnr roystgnr deleted the get_uninitialized_info branch March 1, 2026 15:24
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