← Back to team overview

dolfin team mailing list archive

[Bug 767050] Re: PETScUserPreconditioner is not defined

 

I have now exposed 'PETScUserPreconditioner' to python and made it a
Directory class, meaning that whenever you overload solve it will
eventually be called in the C++ solve routine.

Note that this is really not tested. Please report further issues as new
bugs. If you manage to get something going it would be very cool if you
could assemble a small unit test and add it to

  test/unit/la/python/Matrix.py

You can just add a method to class PETScTester.
  

Johan

-- 
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.
https://bugs.launchpad.net/bugs/767050

Title:
  PETScUserPreconditioner is not defined

Status in DOLFIN:
  Fix Committed

Bug description:
  I suspect I found another swig problem: it is not possible in Python to derive a class from 
  PETScUserPreconditioner. The code

  from dolfin import *
  class DiagonalPreconditioner(PETScUserPreconditioner) :
       def __init__(self) :
           PETScUserPreconditioner.__init__(self)

  fails with

  NameError: name 'PETScUserPreconditioner' is not defined

  (The corresponding line in dolfin/swig/import/la.i is indeed missing, but I'm not sure if that 
  is the whole problem.)



References