[BUG] Hoist geometry queries out of pre-alloc loops#168
Merged
Conversation
Panel topology is invariant across time steps, so querying every step's geometry during wake pre-allocation and progress bar estimation is redundant. Use step-0 geometry once instead. This also fixes an incompatibility with the coupled solver, whose future steps do not exist at pre-allocation time.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #168 +/- ##
==========================================
- Coverage 91.69% 91.69% -0.01%
==========================================
Files 35 35
Lines 6831 6828 -3
==========================================
- Hits 6264 6261 -3
Misses 567 567 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Panel topology is invariant across time steps, so querying every time step's geometry during wake pre-allocation and progress bar estimation is redundant. Use step-0 geometry once instead.
Motivation
This fixes an incompatibility with the coupled solvers, whose future steps do not exist at pre allocation time.
Relevant Issues
Related to Issue #28 (being addressed in PR #156) and Issue #66.
Changes
Dependency Updates
None.
Change Magnitude
Minor: Small change such as a bug fix, small enhancement, or documentation update.
Checklist (check each item when completed or not applicable)
mainand is up to date with the upstreammainbranch.--in-place --black). See the style guide for type hints and docstrings for more details.pterasoftwarepackage use type hints. See the style guide for type hints and docstrings for more details.testspackage.testspackage.black,codespell, andisortGitHub actions.mypyGitHub action.testsGitHub actions.