Skip to content

Deduplicate target emission helpers (#139) - #159

Open
petlenz wants to merge 1 commit into
fix-137-can-emitfrom
fix-139-target-dedup
Open

Deduplicate target emission helpers (#139)#159
petlenz wants to merge 1 commit into
fix-137-can-emitfrom
fix-139-target-dedup

Conversation

@petlenz

@petlenz petlenz commented Aug 2, 2026

Copy link
Copy Markdown
Member

Addresses #139 (largest items; two smaller ones remain — see below).

STACKED PR — base is fix-137-can-emit (PR #158), NOT main. Merge #158 first, then retarget this to main (REST PATCH, not gh pr edit — the latter silently no-ops on this org) or merge as-is after #158 lands.

  • Intra-file (numsim_material.cpp): the rate and residual paths' duplicated blocks extracted into file-local helpers — collect_scalar_params/collect_tensor_inputs (CollectedSymbols + structured bindings), reject_non_finite_default, emit_parameters_schema(...) parameterized on the solver_source/integrator_source difference, and MemberUniquenessGuard::claim.
  • Cross-target: uses_linear_algebra(body, la) (linear_algebra_emitter.h) and uses_spectral_runtime(body) (spectral_decompose_emit.h) replace the verbatim include-gating logic duplicated across standalone_cxx.cpp and moose_material.cpp.

Emitted text proven byte-identical: full suite green with zero test edits (the exact-substring assertions + compile-check drivers are the oracle), plus a diff -r of the standalone registry output regenerated before/after — clean.

Remaining #139 scope (follow-up): the EmittedOutput/register_* local-structure pair in numsim_material.cpp.

gcc-14 Debug (-Werror): ctest 331/331.

@petlenz

petlenz commented Aug 2, 2026

Copy link
Copy Markdown
Member Author

No CI checks appear here by design: build.yml triggers only on PRs targeting main, and this PR's base is fix-137-can-emit (stacked). Validated locally (gcc-14 Debug -Werror, ctest 331/331). Once #158 merges and this is retargeted to main (REST PATCH), the full matrix runs.

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