question on MatMatMult

Matthew Knepley knepley at
Mon Mar 17 18:18:47 CDT 2008

On Mon, Mar 17, 2008 at 6:03 PM, Randall Mackie <rlmackie862 at> wrote:
>  Matthew Knepley wrote:
>  > On Mon, Mar 17, 2008 at 5:28 PM, Randall Mackie <rlmackie862 at> wrote:
>  >> If I want to compute H = L^T L where L is a sparse matrix which is an approximation to the
>  >>  laplacian, and hence H is the biharmonic (also sparse), and if I have L as an MPI matrix
>  >>  in PETSc, will MatMatMult work for this (assuming I create the transpose of L first).
>  >>
>  >>  In other words, does MatMatMult look at the non-zero structure only that would result,
>  >>  or does it think the result is a dense matrix?
>  >
>  > It builds the structure dynamically, which explains the "fill"
>  > argument. This is not a great
>  > thing to do unless you have no idea how to form it directly.
>  I know how to form the Laplacian (that's easy) but I do not know how
>  to form the biharmonic directly, on a non-uniform grid. If anyone
>  knows how, other than direct multiplication, and can point me in
>  the right direction, that would be most appreciated.

I found


>  Randy
>  >
>  >   Matt
>  >
>  >>  Thanks, Randy

What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener

More information about the petsc-users mailing list