On Sat, Apr 04, 2009 at 08:30:39PM -0500, Robert Kirby wrote: > 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
This wouldn't require anything on the FFC end. It would just require a new C++ class which subclasses either of the Krylov matrices (or maybe a new GenericKrylovMatrix) that takes a linear form (like your 'a' above) to the constructor and calls assemble() in the overloaded mult(). This should be easy to add. -- Anders
signature.asc
Description: Digital signature
_______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
