Skip to content

Reset fluid state after convergence failure#4088

Open
dkachuma wants to merge 4 commits into
developfrom
bug/bd713/kvalues
Open

Reset fluid state after convergence failure#4088
dkachuma wants to merge 4 commits into
developfrom
bug/bd713/kvalues

Conversation

@dkachuma

@dkachuma dkachuma commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

This PR fixes a bug breaking determinism in numerical Jacobian tests, where iterate-dependent constitutive state persisted across Newton attempts. While CompositionalMultiphaseBase::resetStateToBeginningOfStep correctly restored primary variables (pressure, compositional density, and temperature), it failed to clear m_kValues and other fluid properties.

This PR updates CompositionalMultiphaseBase::resetStateToBeginningOfStep to explicitly discard warm-started state held by the fluid model by calling fluid.initializeState(). This guarantees that rolled-back steps start clean and do not inherit iterate-dependent state from failed Newton attempts.

@dkachuma dkachuma added type: bug Something isn't working ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI flag: no rebaseline Does not require rebaseline ci: run code coverage enables running of the code coverage CI jobs labels Jun 22, 2026
@dkachuma dkachuma changed the title Draft Reset fluid state after convergence failure Jun 22, 2026
@dkachuma dkachuma marked this pull request as ready for review June 22, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: run code coverage enables running of the code coverage CI jobs ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI flag: no rebaseline Does not require rebaseline type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants