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
Use nonlinear solver tolerance for "Stokes only" solver scheme #1276
Use nonlinear solver tolerance for "Stokes only" solver scheme #1276
Conversation
Looks good. I would assume all broken tests are only due to slightly different output, but please take a look at them. |
Hey Rene, I completely agree with these changes. While you are changing the test output, I would suggest 2 more changes:
@anne-glerum Do you have any other suggestions? |
const double stokes_residual = solve_stokes(); | ||
current_linearization_point = solution; | ||
|
||
pcout << " Nonlinear Stokes residual: " << stokes_residual << std::endl; | ||
if (stokes_residual < 1e-8) | ||
pcout << " Nonlinear Stokes residual: " << stokes_residual/initial_stokes_residual << std::endl; |
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.
Is this how the other solvers do it, i.e., output the relative residual? That makes no sense to me, but if that's what they all do, then I guess it makes sense to do the same here...
@bangerth: I do not quite recall why that decision was made, but every other nonlinear solver (iterated IMPES and iterated Stokes) currently interprets the nonlinear solver tolerance to be a relative tolerance compared to the residual of/before the first iteration. With this PR the interpretation (and output) is at least consistent. @MFraters: I have added the iteration number and made the output more uniform like you asked. Is there an application for the free surface? 'Stokes only' only solves one timestep and the surface is not changed anyway. Or are you interested because it changes the top boundary condition (and therefore the solution)? |
ff084a0
to
3860401
Compare
On 11/25/2016 03:27 PM, Rene Gassmöller wrote:
@bangerth <https://github.com/bangerth>: I do not quite recall why that
decision was made, but every other nonlinear solver (iterated IMPES and
iterated Stokes) currently interprets the nonlinear solver tolerance to be a
relative tolerance compared to the residual of/before the first iteration.
With this PR the interpretation (and output) is at least consistent.
Right, the relative interpretation is appropriate as a stopping criterion. I
was just surprised that we do not output the absolute size of the residual.
|
257f79e
to
111828b
Compare
@gassmoeller No, I wasn't personally interested in it, I just thought it could be useful to have it in there. But I am not really familiar with Stokes only, so leave it out if you think that makes more sense. |
0c8ee91
to
413b496
Compare
413b496
to
73896f3
Compare
Ok then let us keep the free surface out for now (we can handle that together with #1279 if we want). Otherwise this PR is ready from my side. |
looks good, thanks! |
See changes.h entry. We used a hard-coded value instead of an input parameter, and we computed the residual not consistently with the other nonlinear solver schemes. @MFraters maybe you can take a look? You have the most experience with these solver schemes.