Skip to content

added multiline output keyword support; propogated ions into product …#52

Merged
markleader merged 1 commit intonasa:mainfrom
markleader:fix/cearun-input
Mar 2, 2026
Merged

added multiline output keyword support; propogated ions into product …#52
markleader merged 1 commit intonasa:mainfrom
markleader:fix/cearun-input

Conversation

@markleader
Copy link
Contributor

Summary

Fix two legacy CLI compatibility issues affecting CEARUN-style inputs:

  1. Prevent EqSolver_init element-list mismatch crashes for ionized legacy problems by ensuring reactants/products are initialized with consistent ions handling.
  2. Restore legacy cumulative parsing behavior for repeated output datasets (multiple output ... lines in one problem).

Changes

  • Updated product mixture construction to propagate ions=prob%problem%include_ions in:
    • run_thermo_problem (source/main.f90)
    • run_shock_problem (source/main.f90)
    • run_deton_problem (source/main.f90)
  • Updated input parser dataset read loop in source/input.f90:
    • When currently parsing an outp dataset, consecutive outp keyword lines are merged into the same buffer instead of starting a new dataset that overwrites prior output options.
    • This matches legacy cea2.f behavior for repeated output directives.
  • Added parser regression coverage in source/input_test.pf:
    • New test test_parse_outp_repeated_dataset_keywords
    • Verifies repeated outp tokens cumulatively set mass_fractions, transport, trace, and preserve siunit.

Testing

  • Manual legacy CLI runs in build-dev-ub-hunt/source:
    • ./cea cearun -t ../../data/thermo.lib -r ../../data/trans.lib
    • ./cea example1 -t ../../data/thermo.lib -r ../../data/trans.lib
  • Output/reference check:
    • diff -u cearun-ref.out cearun.out (verified crash is resolved and expected output sections are present; formatting/style differences remain vs legacy reference formatting)
  • Full tests:
    • cd build-dev-ub-hunt && ctest --output-on-failure (12/12 passed)

Compatibility / Numerical behavior

  • No expected changes to numerical results
  • Expected changes (explain and provide validation)

Expected behavior change: ionized legacy CLI cases that previously aborted with
CRITICAL: eqsolver_init: Element lists for products and reactants must match.
now run to completion. No solver algorithm changes were introduced; updates are limited to initialization consistency and legacy-compatible output parsing.

@markleader markleader merged commit f9b4002 into nasa:main Mar 2, 2026
23 checks passed
@markleader markleader deleted the fix/cearun-input branch March 2, 2026 21:35
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