Skip to content

ID lists: THRU ranges mixed with single IDs are read whole - #316

Closed
Valladarex wants to merge 1 commit into
MystranSolver:devfrom
Valladarex:pr/id-lists
Closed

Valladarex wants to merge 1 commit into
MystranSolver:devfrom
Valladarex:pr/id-lists

Conversation

@Valladarex

Copy link
Copy Markdown

Fixes #315.

One commit.

  • New: module Source/LK1/L1U/BDF_ID_LISTS.f03, subr READ_ID_LIST.
    • It reads an ID list from a field of the parent line through fields 2-9 of the continuations.
    • Items are single IDs or ranges "ID1 THRU ID2", in any mix and order; a range may run from one line to the next.
  • Readers using it: SPC1, ASET1/OMIT1, USET1, PARTVEC1 and SPOINT (both passes; SPOINT now reads its continuations).
    • A record is still (ID1, ID2), as the old THRU branch wrote it, so the later processing is unchanged.
  • PLOAD2: its range is the whole list, so IDs in fields 7-9 after it now stop with ERROR 1217.
  • A wrong list stops instead of being cut short:
    • ERROR 1214: a THRU that does not follow an ID;
    • ERROR 1216: a list ending in THRU;
    • ERROR 1128: a range that goes down;
    • ERROR 1215, or the field reader's own error (1702 for a word): a field that is not an ID.

Test: MYSTRAN_Validation MystranSolver/MYSTRAN_Validation#34, spc1_thru_mixed.bdf, a CBAR chain whose SPC1 is "1 THRU 2, 5" with "7" on a continuation. Four checks:

  • grids 5 and 7 do not move;
  • the free spans match the clamped-beam hand values: P a^3 b^3 / (3 E I L^3) at grid 4, and P L^3 / (192 E I) at grid 6.

On dev all four fail, with grids 5 and 7 moving 1.8E-3 and 3.8E-3. With this PR all four pass.

Also checked, outside the suite:

  • the same mixed lists on OMIT1 and ASET1 (SOL 103 eigenvalues), USET1 (the U1 table) and SPOINT (spring displacements) give the results of their IDs written one by one;
  • the seven wrong lists each stop with their error and write no results.

Validation suite: with both PRs, 1 failure of 3,259 checks, the same one current dev has without them ("mitc4 thermal strain free rectangle cylinder", near-zero stresses in a strain-free thermal case). The 4 new checks pass.

SPC1, ASET1/OMIT1, USET1 and PARTVEC1 took a range only as the whole entry
"ID1 THRU ID2": the IDs after the range (fields 7-9 and every continuation)
were dropped without a message, the warning for them being suppressed by
default. "SPC1 1 123456 1 THRU 2 5 / 7" held only grids 1 and 2 (a wrong
static answer), and "OMIT1 1 2 THRU 5 7" lost grid 7. SPOINT did not read
its continuations and dropped the IDs after a range.

New module BDF_ID_LISTS (LK1/L1U/BDF_ID_LISTS.f03), subr READ_ID_LIST: reads
the list from a field of the parent line through fields 2-9 of the
continuations. Items are single IDs or ranges "ID1 THRU ID2" (ID2 >= ID1) in
any mix and order; a range may run from one line to the next. Anything else
stops the run:
  - ERROR 1214: a "THRU" that does not follow an ID;
  - ERROR 1216: a list that ends with "THRU";
  - ERROR 1128: a range that goes down (now with its IDs);
  - ERROR 1215, or I4FLD's own message: a field that is not an ID.
A reader writes its records only if the whole entry is correct.

- SPC1, ASET1/OMIT1, USET1 and PARTVEC1 use READ_ID_LIST. A record is
  (ID1, ID2), the form the old THRU branch wrote, so the later processing is
  unchanged. BD_SPC1 now resets JERR on each entry (JERR is SAVEd).
- SPOINT: BD_SPOINT0 (first pass, count only) and BD_SPOINT both use
  READ_ID_LIST, so the count used to size GRID is the number of points
  entered. Both now take LARGE_FLD_INP and read the continuations.
- PLOAD2: its range is the whole list (fields 4-6); IDs in fields 7-9 after
  it stop with ERROR 1217 (before: a warning suppressed by default, and the
  IDs were lost).
- Unused declarations, imports and FORMATs of the rewritten readers removed.

Test (MYSTRAN_Validation): spc1_thru_mixed.bdf, a clamped bar chain whose
SPC1 list is "1 THRU 2, 5" and "7" on a continuation. Grids 5 and 7 must not
move, and the spans between the held grids match the hand values
(P a^3 b^3 / (3 E I L^3) and P L^3 / (192 E I)). Before the fix grids 5 and 7
move (T3 1.8E-3 and 3.8E-3) and there is no message.
@victorkemp

victorkemp commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

SPOINT doesn't have continuation lines in MSC or Mystran. It could be an error but should not read them.

"Items are single IDs or ranges "ID1 THRU ID2", in any mix and order; a range may run from one line to the next." This isn't correct MSC or Mystran format for USET1, ASET1, OMIT1, SPOINT, or SPC1. THRU and a list a mutually exclusive within the same entry.

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