Fix reading of paginated SET1 and CORD2R continuations in the Nastran modal solver - #2860
binggao1230 wants to merge 1 commit into
Conversation
…ader The sorted bulk data echo of an f06 file is paginated: page titles, carriage control lines and column rulers can interrupt an entry at any point. The SET1 and CORD2R readers consumed the next physical line as the continuation, so any page break inside an entry made the reader fail (issue su2code#2313). Continuation markers other than a bare + were also mishandled: Nastran generated markers such as +000001 were silently appended to the marker set as grid point 1. Continuation lines are now located by their marker field, skipping the page furniture, and THRU ranges of the SET1 entry are supported.
pcarruscag
left a comment
There was a problem hiding this comment.
Please add the unit tests to the regression script or see if they can be run in our unit tests, part of the github action runs the c++ unit tests.
|
Feel free to reopen once the comment is addressed. To keep the PR page tidy I'll close this for now. |
|
Addressed in signed commit |
Proposed Changes
The mesh reader of the Nastran modal solver fails on the f06 output of larger models because the sorted bulk data echo is paginated: reading a SET1 whose continuations span a page break dies with
ValueError: invalid literal for int() with base 10: 'NOVEMBER'— the page title is consumed as if it were the continuation line (issue #2313).The root cause is that the SET1 and CORD2R readers take the next physical line as the logical continuation, and only recognise a bare
+as marker. Auditing that code path turned up more of the same class:+000001(the automatic continuation the QRG recommends, and what the sorted echo prints for blank-field continuations) are silently appended to the marker set as grid point 1, sinceint("+000001") == 1— a corrupted FSI coupling surface with no error. User-named markers (+PB1) raiseValueError.THRU, legal on SET1 per the Quick Reference Guide (its Example 2), raisedValueError.Continuation lines are now located by their marker field, skipping page titles, carriage control lines and column rulers; a truncated file or a missing continuation raises a clear error instead, and THRU ranges are expanded.
Related Work
Closes #2313. The page-header block in the new tests reproduces the one reported there verbatim: 8 of the 10 tests fail on current develop, all pass with the fix (
python -m unittest discover -s SU2_PY/SU2_Nastran). The tutorialmodal.f06of the unsteady FSI tutorial parses bit-identically before and after (124 points, 123 in the moving marker).#2859 fixes the small-field value parsing in the same file; the two branches are independent and merge cleanly (combined test suite passes locally).
PR Checklist
pre-commit run --allto format old commits.