-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: CompositionSet
-based solver API
#415
Conversation
Fix merge, preserving behavior of `develop`
CompositionSet
-based solver API
Codecov Report
@@ Coverage Diff @@
## develop #415 +/- ##
===========================================
- Coverage 90.67% 90.22% -0.45%
===========================================
Files 45 50 +5
Lines 6335 7696 +1361
===========================================
+ Hits 5744 6944 +1200
- Misses 591 752 +161
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Thanks for getting coverage working. Looks like Cython code isn't far from the rest of the repo in coverage. For the minimizer, it looks like a fixed compset + free state variable would cover many of the missed lines (not a blocker for this PR, IMO). |
@richardotis is this ready for re-review now? |
@bocklund It's ready as of 4d3910d. I made a small refactor to |
Update to the new internal pycalphad API from pycalphad/pycalphad#415
SystemState
andSystemSpecification
objects.SystemSpecification
captures the desired result of a particular calculation and associated convergence criteria, whileSystemState
represents the state of a calculation. The pre-existingSolver
object now uses aSystemSpecification
to evolve aSystemState
object until it achieves the convergence criteria in the specification (this is the specification'srun_loop
method).SystemSpecification
provides a convenience method,get_new_state
, which allows users to pass in a list ofCompositionSet
objects and get back aSystemState
.update_composition_sets
andsolve_and_update
in eqsolverSolver.solve
can still be used as normal, but because the solver internals have been modularized, users have more control over the minimization process now. For example, solves can now be performed with a listCompositionSet
objects as both input and output (mutated in place).This is also useful for toggling the
fixed
state of a list ofCompositionSet
objects in place, which makes it convenient to do sequences of minimization operations with varying conditions.