Skip to content
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

Add guess_nonlinear to NonlinearBlockGS. #1452

Merged
merged 5 commits into from Jun 9, 2020

Conversation

Kenneth-T-Moore
Copy link
Member

Summary

Add support for guess_nonlinear to the NonlinearBlockGS solver.

Related Issues

Backwards incompatibilities

None

New Dependencies

None

@@ -101,6 +101,9 @@ def _iter_initialize(self):
if system.under_complex_step and self.options['cs_reconverge']:
system._outputs._data += np.linalg.norm(system._outputs._data) * 1e-10

# Execute guess_nonlinear if specified.
system._guess_nonlinear()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check system._has_guess here before calling _guess_nonlinear? I noticed that ImplicitComponent does some stuff in its _guess_nonlinear that isn't needed if no guesses are provided. Broyden does the same thing. Pretty minor, but still...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we don't do it in Newton. The only place we check it is in Group._guess_nonlinear. I have added it into ImplicitComponent._guess_nonlinear to be consistent.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note though, the only time where this will come into play is the case where a nonlinear solver is plugged into a component. When the solver is in a group, we never recurse down to the component level if there isn't a guess.

@swryan swryan merged commit d67ac5d into OpenMDAO:master Jun 9, 2020
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.

NonlinearBlockGS should call guess_nonlinear
3 participants