Skip to content

Fix two output bugs in pysu2_nastran - #2901

Merged
pcarruscag merged 2 commits into
su2code:developfrom
ManasBagul23:fix-nastran-marker-point-count
Sep 17, 2026
Merged

pcarruscag merged 2 commits into
su2code:developfrom
ManasBagul23:fix-nastran-marker-point-count

Conversation

@ManasBagul23

@ManasBagul23 ManasBagul23 commented Sep 16, 2026

Copy link
Copy Markdown

Proposed Changes

In SU2_PY/SU2_Nastran/pysu2_nastran.py, the mesh summary prints "Number of points in the moving marker".format(len(...)). The string has no {} placeholder, so the count is computed but never shown. This adds the missing placeholder.

Before: Number of points in the moving marker
After: Number of points in the moving marker: 123

Found with pyflakes ('...'.format(...) has unused arguments at position(s): 0).

The exception for an unknown imposed motion type referenced self.tipo, which does not exist, so it raised AttributeError: 'ImposedMotionClass' object has no attribute 'tipo' instead of the intended message. It now uses self.typeOfMotion.

Related Work

None. This does not touch the SET1 parsing discussed in #2313.

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary

The format string had no placeholder, so the number of points in the
FSI marker was computed but never shown in the mesh summary.
Copilot AI lite review requested due to automatic review settings September 16, 2026 16:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused change has no unresolved review issues.

Pull request overview

Fixes the Nastran mesh summary to display the moving-marker point count.

Changes:

  • Adds the missing format placeholder to the output string.
File summaries
File Description
SU2_PY/SU2_Nastran/pysu2_nastran.py Corrects moving-marker point-count output.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

The exception referenced self.tipo, which does not exist, so an unknown
motion type raised AttributeError instead of the intended message.
Use self.typeOfMotion.
@ManasBagul23 ManasBagul23 changed the title Print moving marker point count in pysu2_nastran Fix two output bugs in pysu2_nastran Sep 16, 2026
@pcarruscag
pcarruscag merged commit 426f307 into su2code:develop Sep 17, 2026
2 checks passed
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.

3 participants