Skip to content

Reject stateful outputs in the MOOSE target (#15) - #120

Open
petlenz wants to merge 2 commits into
mainfrom
fix-15-moose-stateful-output
Open

petlenz wants to merge 2 commits into
mainfrom
fix-15-moose-stateful-output

Conversation

@petlenz

@petlenz petlenz commented Jul 27, 2026

Copy link
Copy Markdown
Member

Fixes #15.

The MOOSE Phase A boundary guard checked only inputs for stateful roles. An add_output(..., roles::History) (or any is_stateful role) passed through silently and emitted a plain, non-stateful MaterialProperty write — a material that compiles but is semantically wrong (no old/new pair, no stateful init), leaving the user to deduce the bug from incorrect simulation results.

MooseMaterialTarget::emit() now applies the same guard symmetrically over outputs, throwing a clear error pointing at the Phase B roadmap.

  • src/targets/moose_material.cpp — mirror the stateful-input guard for outputs.
  • tests/MooseTargetTest.cpp — RejectsStatefulOutput negative test.

The comprehensive negative-path suite (#11) also covers this guard once it lands.

@petlenz
petlenz force-pushed the fix-15-moose-stateful-output branch from 857b3b7 to 9075efd Compare September 20, 2026 19:46
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.

MOOSE Phase A guard accepts stateful outputs silently (only inputs checked)

1 participant