Suppressing output from solve

Asked by imranal

When I am running the solver for a nonlinear problem using newton's method, I wish to suppress output such as :

solve(F==0,appropriate space,boundary conditions, solver_parameter{"newton_solver" : {"maximum_iterations" : 30}})
>> python
Solving nonlinear variational problem.
 Newton iteration 1: r (abs) = 1.132e+02 (tol = 1.000e-10) r (rel) = 1.269e+01 (tol = 1.000e-09)
 Newton iteration 2: r (abs) = 2.834e+01 (tol = 1.000e-10) r (rel) = 3.178e+00 (tol = 1.000e-09)
 Newton iteration 3: r (abs) = 7.083e+00 (tol = 1.000e-10) r (rel) = 7.942e-01 (tol = 1.000e-09)
 Newton iteration 4: r (abs) = 1.729e+00 (tol = 1.000e-10) r (rel) = 1.939e-01 (tol = 1.000e-09)
 Newton iteration 5: r (abs) = 3.653e-01 (tol = 1.000e-10) r (rel) = 4.097e-02 (tol = 1.000e-09)
 Newton iteration 6: r (abs) = 4.353e-02 (tol = 1.000e-10) r (rel) = 4.881e-03 (tol = 1.000e-09)
 Newton iteration 7: r (abs) = 9.828e-04 (tol = 1.000e-10) r (rel) = 1.102e-04 (tol = 1.000e-09)
 Newton iteration 8: r (abs) = 5.251e-07 (tol = 1.000e-10) r (rel) = 5.888e-08 (tol = 1.000e-09)
 Newton iteration 9: r (abs) = 1.658e-13 (tol = 1.000e-10) r (rel) = 1.859e-14 (tol = 1.000e-09)
 Newton solver finished in 9 iterations and 9 linear solver iterations.

Question information

English Edit question
FEniCS Project Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
imranal (imranal) said :

A similar post was made some time ago :

however the provided answer does not work anymore.

Revision history for this message
Johannes Ring (johannr) said :

FEniCS no longer uses Launchpad for Questions & Answers. Please consult the documentation on the FEniCS web page for where and how to (re)post your question:

Can you help with this problem?

Provide an answer of your own, or ask imranal for more information if necessary.

To post a message you must log in.