Subject: [Fenics] preconditioner in demos

From: Roland Siegbert <[email-masked]>
Date: Fri, 01 Feb 2013 14:15:34 +0100

Dear Fenics,

after following this:

http://fenicsproject.org/documentation/dolfin/1.1.0/python/demo/pde/navier-stokes/python/documentation.html

I think this, doesn't work anymore:

# Use amg preconditioner if available
prec = "amg" if has_krylov_solver_preconditioner("amg") else "default"

Best,

Roland

---

From: Johannes Ring <[email-masked]>
Date: Mon, 4 Feb 2013 12:22:07 +0100

> prec = "amg" if has_krylov_solver_preconditioner("amg") else "default"

Can you be a bit more specific? What is the error message you get?

Johannes

---

From: Roland Siegbert <[email-masked]>
Date: Sat, 09 Feb 2013 11:48:56 +0100

> Can you be a bit more specific? What is the error message you get?
I'm very sorry, but I forgot the exact error message. However, the
demo in /usr/share/fenics didn't contain that line at all and I simply
used the file there. I remember that the the calling function had
"amg" as argument per default later. That was the solution. No
wrapping call using has_krylov_solver_preconditioner anymore.

Thanks for the immediate reply,

Roland

PS: I'll have a look at it at the weekend and can recreate it maybe then.

---

From: Roland Siegbert <[email-masked]>
Date: Mon, 11 Feb 2013 19:38:29 +0100

Dear Johannes,

I recreated the error message:

<console>

>> python demo_navier-stokes.py
Traceback (most recent call last):
  File "demo_navier-stokes.py", line 97, in <module>
    prec = "amg" if has_krylov_solver_preconditioner("amg") else "default"
NameError: name 'has_krylov_solver_preconditioner' is not defined

</console>

It seems, has_krylov_solver_preconditioner, as used in the documentation on the
website, is deprecated.

>> aptitude show fenics

gives me:

<console>

Package: fenics
State: installed
Automatically installed: no
Version: 1:1.0.0-1
Priority: extra
Section: universe/math
Maintainer: Ubuntu Developers <[email-masked]>
Architecture: all
Uncompressed Size: 34.8 k
Depends: libdolfin1.0-dev (>= 1.0.0), python-dolfin (>= 1.0.0),
dolfin-doc (>= 1.0.0), dolfin-bin (>= 1.0.0), python-ferari (>= 1.0.0),
python-ffc (>= 1.0.0), python-fiat (>= 1.0.0),
         python-instant (>= 1.0.0), ufc (>= 2.0.5), python-ufc (>=
2.0.5), ufc-doc (>= 2.0.5), python-viper (>= 1.0.0), python-ufl (>=
1.0.0), python-ufl-doc (>= 1.0.0), libsyfi1.0-dev (>=
         1.0-beta), python-syfi (>= 1.0-beta), syfi-doc (>= 1.0-beta),
sfc (>= 1.0-beta)
Recommends: python-scitools

</console>

Best,

Roland

---

From: Johannes Ring <[email-masked]>
Date: Mon, 11 Feb 2013 21:42:02 +0100

Hi Roland,

The 1.0.0 release did not have the "has_krylov_solver_preconditioner"
function. You should either use the documentation for the 1.0.0
release:

http://fenicsproject.org/documentation/doc_1.0.0.html

or you can upgrade your installation to version 1.1.0 by adding the
FEniCS PPA as described here:

http://fenicsproject.org/download/ubuntu_details.html#ubuntu-ppa

Johannes