Skip to content

Restore the -lMass flag in the strict elastic beam parsers#5

Open
joecga4 wants to merge 1 commit into
aschellenberg74:masterfrom
joecga4:fix/elasticbeam-lmass-regression
Open

Restore the -lMass flag in the strict elastic beam parsers#5
joecga4 wants to merge 1 commit into
aschellenberg74:masterfrom
joecga4:fix/elasticbeam-lmass-regression

Conversation

@joecga4

@joecga4 joecga4 commented Jul 6, 2026

Copy link
Copy Markdown

The strict optional-argument counting recently introduced in the elasticBeamColumn / ElasticTimoshenkoBeam / ModElasticBeam3d parsers (numOptionalArgs + OPS_ResetCurrentInputArg(-numArgs)) recognizes -cMass but not the documented -lMass flag. An unrecognized token is not counted as optional, so the positional-argument count comes out wrong and parsing fails or misreads arguments:

element elasticBeamColumn 1 1 2 $A $E $Iz $transfTag -lMass
-> WARNING transfTag is not integer ... expected integer but got "72.3"

This PR accepts -lMass again as an explicit no-op (lumped mass is the default), in ElasticBeam2d (both parsers), ElasticBeam3d, ElasticTimoshenkoBeam2d/3d and ModElasticBeam3d, matching the pre-regression behavior.

It also fixes the typo in EXAMPLES/verification/PortalFrame2d.tcl that this regression exposed: $M &massType$M $massType (two call sites). With the typo, the literal string &massType was passed through and the verification suite aborted at PortalFrame2d.

Validation: runVerificationSuite.tcl back to 18/18 PASSED (was aborting at PortalFrame2d); results byte-identical for the previously passing cases.

🤖 Generated with Claude Code

The new strict optional-argument counting in the elasticBeamColumn /
ElasticTimoshenkoBeam / ModElasticBeam3d parsers (numOptionalArgs +
OPS_ResetCurrentInputArg(-numArgs)) recognizes -cMass but not the
documented -lMass flag. An unrecognized token is not counted as an
optional argument, so the positional-argument count comes out wrong and
parsing fails or misreads arguments, e.g.

  element elasticBeamColumn 1 1 2 $A $E $Iz $transfTag -lMass
  -> WARNING transfTag is not integer ... expected integer but got "72.3"

-lMass (lumped mass, the default) is accepted again as an explicit
no-op, matching the pre-regression behavior. ElasticBeam2d gets the
branch in both of its parsers.

Also fixes a typo in EXAMPLES/verification/PortalFrame2d.tcl that this
regression exposed: "$M &massType" -> "$M $massType" (two call sites);
with the typo the literal string "&massType" was passed through and the
suite aborted instead of reporting PASSED.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant