Skip to content

[BUG] Hoist geometry queries out of pre-alloc loops#168

Merged
camUrban merged 1 commit intomainfrom
bug/coupled_solver_pre_allocation
May 5, 2026
Merged

[BUG] Hoist geometry queries out of pre-alloc loops#168
camUrban merged 1 commit intomainfrom
bug/coupled_solver_pre_allocation

Conversation

@camUrban
Copy link
Copy Markdown
Owner

@camUrban camUrban commented May 5, 2026

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

  • Pre-allocate wake arrays and perform progress bar estimation without iterating across all time steps.

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)

  • I am familiar with the current contribution guidelines.
  • PR description links all relevant issues and follows this template.
  • My branch is based on main and is up to date with the upstream main branch.
  • All calculations use S.I. units.
  • Code is formatted with black (line length = 88).
  • Code is well documented with block comments where appropriate.
  • Any external code, algorithms, or equations used have been cited in comments or docstrings.
  • All new modules, classes, functions, and methods have docstrings in reStructuredText format, and are formatted using docformatter (--in-place --black). See the style guide for type hints and docstrings for more details.
  • All new classes, functions, and methods in the pterasoftware package use type hints. See the style guide for type hints and docstrings for more details.
  • If any major functionality was added or significantly changed, I have added or updated tests in the tests package.
  • Code locally passes all tests in the tests package.
  • This PR passes the ReadTheDocs build check (this runs automatically with the other workflows).
  • This PR passes the black, codespell, and isort GitHub actions.
  • This PR passes the mypy GitHub action.
  • This PR passes all the tests GitHub actions.

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.
@camUrban camUrban self-assigned this May 5, 2026
@camUrban camUrban added the bug Something isn't working label May 5, 2026
@camUrban camUrban added this to the v5.1.0 milestone May 5, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.69%. Comparing base (e4f177e) to head (a485e5a).

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.
📢 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.

@camUrban camUrban merged commit 81c73b3 into main May 5, 2026
13 checks passed
@camUrban camUrban deleted the bug/coupled_solver_pre_allocation branch May 5, 2026 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant