Skip to content

Vectorize equilibrium derivatives and reuse Jacobian factorization - #107

Merged
markleader merged 3 commits into
nasa:mainfrom
markleader:fix/derivative-refactor
Aug 24, 2026
Merged

Vectorize equilibrium derivatives and reuse Jacobian factorization#107
markleader merged 3 commits into
nasa:mainfrom
markleader:fix/derivative-refactor

Conversation

@markleader

Copy link
Copy Markdown
Contributor

Summary

Reformulate equilibrium derivative post-processing as a vector-valued response Jacobian and reduce direct-method solve cost by reusing one Jacobian factorization for all sensitivity right-hand sides.

Changes

  • Add explicit input mapping from [state1, state2, w0] to the residual inputs.
  • Assemble derivatives for temperature, mixture/species amounts, and thermodynamic properties in a response Jacobian.
  • Solve the direct sensitivity system as a multiple-right-hand-side system.
  • Preserve the existing public derivative fields by unpacking the response Jacobian.
  • Add coverage for the block linear solve and response-matrix mapping.

Testing

  • ctest --test-dir build-dev -R cea_core_test --output-on-failure (118 tests passed)

Compatibility / Numerical behavior

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

The public derivative interface and scientific behavior are preserved; only the internal formulation and solve strategy have changed.

@markleader
markleader merged commit 49b9ff2 into nasa:main Aug 24, 2026
23 checks passed
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