← Back to team overview

dolfin team mailing list archive

Re: matrix action

 

Thanks, I'll take a look next week.
One thought that would take a little work but might be worth exploring from
the ffc end would be
to define matrix actions in the form compiler that map to KrylovMatrix
rather than Matrix.
For example, one can take the Poisson code, replacing the TrialFunction with
Function, so that

v = TestFunction(V)
u = Function(V)
a = dot(grad(v), grad(u))*dx

and then generate code for a KrylovMatrix subclass.  Anders and I
experimented with the effects of ferari-optimization and found that they
were most profound in this context.  It also removes the assembly bottleneck
since you don't have to beat on a sparse matrix.  On the other hand, you
don't have the matrix to feed to algebraic preconditioners.  No free lunch.

Rob



On Sat, Apr 4, 2009 at 1:26 PM, Johan Hake <hake@xxxxxxxxx> wrote:

> On Saturday 04 April 2009 15:00:38 Robert Kirby wrote:
> > Garth, Thanks, this looks like the interface I need.  I can just fill in
> > the virtual functions if I work in C++,
> > Any possibility of swigging uBLASKrylovMatrix and letting programmers
> fill
> > in the methods in Python?  There
> > are mechanisms for setting up callbacks.
>
> Both classes chould now be available from the python interface. Directors
> are
> also turned on, so callback functions for the virtual functions should
> work.
>
> I have not used or test them so do not expect them to "just work" ;)
> Neither
> can I find any implemented c++ demos that use the classes.
>
> Johan
>
> >
> > Rob
> >
> > On Fri, Apr 3, 2009 at 10:15 PM, Garth N. Wells <gnw20@xxxxxxxxx> wrote:
> > > Robert Kirby wrote:
> > >> Hi all,
> > >> Does DOLFIN support the notion of a "matrix action", what would be an
> > >> "Operator" in Trilinos or a "matrix shell" in PETSc?
> > >
> > > Take a look at dolfin/la/uBLASKyrlovMatrix.h and
> > > dolfin/la/PETScKyrlovMatrix.h. The latter is a wrapper for a PETSc
> > > 'matrix shell'. The FooKrylovMatrix classes are not derived from
> > > GenericMatrix and I don't think that they've been used very
> extensively.
> > > They are used by the ODE solvers.
> > >
> > > Garth
>
>
>

Follow ups

References