Add optional x1 to provide the scipy secant method with a second guess#3515
Add optional x1 to provide the scipy secant method with a second guess#3515lewisgross1296 wants to merge 1 commit intoopenmc-dev:developfrom
Conversation
paulromano
left a comment
There was a problem hiding this comment.
Thanks for proposing this @lewisgross1296. Note that there is some recent discussion on search_for_keff in #2693 and #1656. I think the direction I'd like to go is to 1) use scipy.optimize.root_scalar and allow the user to pass through whatever arguments are needed for a given method (which would allow passing x1 as you've proposed here), and 2) also add a method for uncertainty-aware root-finding (which would likely become the default).
|
Thanks for directing me towards that PR! I'm very interested how that turns out, as we're planning on doing some multiphysics search for keff work soon. Do you propose for the changes to allow the user to specify args to happen there instead of this PR? It looks like |
|
Yes, I think those changes will probably get incorporated in a separate PR, so I'll go ahead and close this one for now. |
Description
Closes #3512. I tried to find existing tests that involve
search_for_keffbut I'm not sure we have any regression tests for this. If I were to implement one specifically for this, I'd just query theguessesreturned and make sure thatguess[0]andguess[1]are what the user supplies. I guess this opens up a question to how we'd like to testsearch_for_keff(if we'd like to)Locally, this modification seems to work, but if people would like a demo, I can provide a zip of an example demonstrating the capability, which could maybe be inspiration for a test.
Checklist
[ ] I have run clang-format (version 15) on any C++ source files (if applicable)