-
Notifications
You must be signed in to change notification settings - Fork 244
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
[CORE] Move initial residual assignment #12604
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that you're always doing a non-linear iteration (with the corresponding call to the linear solver) even though the residual criteria are fulfilled. If so, this is in my opinion a delicate change that requires careful discussion.
With this new implementation, convergence could be achieved in the first iteration in an absolute sense. Is that what you mean? @rubenzorrilla |
I mean in zero iteration (if provided guess already accomplishes with the convergence criteria) |
Ok, having a closer look at the implementation of The confusion comes from |
I agree with @matekelemen on this point. What do you think @rubenzorrilla? |
|
This PR addresses #12394 [Incorrect initial residuals for convergence criteria in CoSim]
Changes
We moved the initial residual assignment from
InitializeSolutionStep
toPostCriteria
with the condition that theNL_ITERATION_NUMBER
must be 1. This ensures that the initial residual is updated between coupling iterations.Drawback
The initial residual is computed after the first non-linear iteration, since we do not have access to the residual before the first one.
Outlook
Properly solving this problem would mean adding new virtual functions for the initialization and finalization of the non linear solvers and related objects. This would be an extensive change what we are planning to implement in the future,. However, for now, this solution is less inaccurate than the current state.
FYI @philbucher @matekelemen @sunethwarna @Igarizza