Thank you Andrew.   We will look at that closely.


But if we are solving a linear system using LU then we shouldn't be using snes though should we?  That is the error we are getting in convergence.



------------------
Francis Poulin                    
Associate Professor
Department of Applied Mathematics
University of Waterloo

email:           fpoulin@uwaterloo.ca
Web:            https://uwaterloo.ca/poulin-research-group/
Telephone:  +1 519 888 4567 x32637


From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Andrew McRae <A.T.T.McRae@bath.ac.uk>
Sent: Wednesday, June 21, 2017 10:47:53 AM
To: firedrake@imperial.ac.uk
Cc: Keegan Cove
Subject: Re: [firedrake] problem solving a linear system
 
This section of the documentation might help: http://www.firedrakeproject.org/solving-interface.html#debugging-convergence-failures

On 21 June 2017 at 15:40, Francis Poulin <fpoulin@uwaterloo.ca> wrote:

Hello,


We are trying to solve a 2-layer Quasi-Geostrophic model to determine a steady linear solution, basically building on a demo that we already wrote.


When we try running it we get the following error, copied below.


It seems to have a problem with the nonlinear solver, even though we are solving a linear problem.  Can anyone give us some advice on how we might be able to fix this?


Code is attached in case you wanted to see the details.


Cheers, Francis


(firedrake) fpoulin@domlt32:~/Dropbox/Research_Keegan/Code$ python test.py 
Traceback (most recent call last):
  File "test.py", line 91, in <module>
    soln0 = steadylinearQG2d(Ztrial, Ztest, Gwinds, bcs)
  File "test.py", line 46, in steadylinearQG2d
    linear_solver.solve()
  File "/home/fpoulin/software/firedrake/src/firedrake/firedrake/variational_solver.py", line 223, in solve
    solving_utils.check_snes_convergence(self.snes)
  File "/home/fpoulin/software/firedrake/src/firedrake/firedrake/solving_utils.py", line 233, in check_snes_convergence
    %s""" % (snes.getIterationNumber(), msg))
firedrake.exceptions.ConvergenceError: Nonlinear solve failed to converge after 0 nonlinear iterations.
Reason:
   Inner linear solve failed to converge after 0 iterations with reason: unknown reason (petsc4py enum incomplete?), try with -snes_converged_reason and -ksp_converged_reason




------------------
Francis Poulin                    
Associate Professor
Department of Applied Mathematics
University of Waterloo

email:           fpoulin@uwaterloo.ca
Web:            https://uwaterloo.ca/poulin-research-group/
Telephone:  +1 519 888 4567 x32637