← Back to team overview

dolfin team mailing list archive

Re: uBLASKrylovMatrix and Python callbacks: now the fun begins

 

Aha.  I forgot about the inheritance issue.This should die on forming an ILU
since I don't have matrix values.

doflin::none is not exposed to PyDOLFIN, so I can't set the preconditioner
to do nothing rather than attempt to compute an ILU.

Thanks,
Rob

On Mon, Apr 13, 2009 at 2:30 PM, Johan Hake <hake@xxxxxxxxx> wrote:

> On Wednesday 08 April 2009 23:15:42 Robert Kirby wrote:
> > Hi all,I've gotten a prototype working where I construct
> > a uBLASSparseMatrix and get it to compute the same result as my
> > matrix-free uBLASKrylovMatrix.  Both of these are constructed
> > in PyDOLFIN.  However, I can feed the uBLASSparseMatrix
> > I construct into a dolfin.uBLASKrylovSolver solve method,
> > but I get a type error when I try to put my
> > uBLASKrylovMatrix with mult and dim implemented in Python
> > into the solver.
> >
> > In fact, I get a
> >
> > TypeError: in method 'uBLASKrylovSolver_solve', argument 2 of type
> > 'dolfin::uBLASKrylovMatrix const &'
>
> You need to call:
>
>  dolfin.uBLASKrylovMatrix.__init__(self)
>
> to initialize the super class.
>
> When I did this I got a bit further. Now an assertion is triggered:
>
> *** Assertion (_x.size() == _M.size1())
>    [at dolfin/la/uBLASILUPreconditioner.cpp:41 in solve()]
>
> Johan
>
> > Not very revealing.  I've attached a horribly ugly source code for anyone
> > interested in doing a post-mortem on this.
> >
> > Thanks,
> > Rob
>
>
>

Follow ups

References