← Back to team overview

dolfin team mailing list archive

Re: profiling an assembly

 

On Sun 2008-05-18 22:55, Johan Hoffman wrote:
> > On Sun 2008-05-18 21:54, Johan Hoffman wrote:
> >> > On Sat, May 17, 2008 at 04:40:48PM +0200, Johan Hoffman wrote:
> >> >
> >> > 1. Solve time may dominate assemble anyway so that's where we should
> >> > optimize.
> >>
> >> Yes, there may be such cases, in particular for simple forms (Laplace
> >> equation etc.). For more complex forms with more terms and coefficients,
> >> assembly typically dominates, from what I have seen. This is the case
> >> for
> >> the flow problems of Murtazo for example.
> >
> > This probably depends if you use are using a projection method.  If you
> > are
> > solving the saddle point problem, you can forget about assembly time.
> 
> Well, this is not what we see. I agree that this is what you would like,
> but this is not the case now. That is why we are now focusing on the
> assembly bottleneck.

This just occurred to me.  If you have a Newtonian fluid, then the momentum
equations are block diagonal, but this is not reflected in the matrix structure.
Sure enough, run the stokes demo with -mat_view_draw -draw_pause -1 and note
that the off-diagonal blocks of the momentum equations are cyan which means they
are set, but have value zero.  This almost doubles the number of insertions into
the global matrix.  Of course, if you really care about speed, you could
implement the momentum equations matrix-free with a custom preconditioner that
only uses one block (since they are the same).

Also, it seems like a strange design decision for general coupled systems for
the blocks to be separate like this.  (Actually, ordering the unknowns this way
makes some factorizations ``work'' even when the matrix is indefinite.)


> We are solving the saddle point problem with an outer fixpoint iteration
> (or Newton iteration), where the GMRES-AMG splitting can be seen as a
> preconditioner.

So these solves are a preconditioner for an outer Krylov iteration on the
Jacobian (which has saddle point structure)?  In that case, this sounds similar
to the artificial compressibility preconditioner in de Niet & Wubs 2007.  So you
say that solving the outer Krylov iteration on the Jacobian is faster than
matrix assembly?  In that case, you could probably use a stale Jacobian for
preconditioning.

What you initially described sounded like a projection method which introduces a
splitting error of $\delta t \eta$ were $\eta$ is viscosity.  Such methods are
quite efficient, but are not always appropriate.

Jed

Attachment: pgpbLbworFRrR.pgp
Description: PGP signature


Follow ups

References