[petsc-users] Problem with SNES
Jed Brown
jedbrown at mcs.anl.gov
Sat Aug 27 12:57:03 CDT 2011
On Sat, Aug 27, 2011 at 12:52, Milan Mitrovic <milan.v.mitrovic at gmail.com>wrote:
> and do the multiplication myself because it is much faster. I tried
> using parallel AIJ format but constructing the matrix took more than a
> minute for my problem with only ~150 nonzero entries per row... (maybe
> I was doing something very wrong)
>
Probably preallocation, see
http://www.mcs.anl.gov/petsc/petsc-2/documentation/faq.html#efficient-assembly
If you have a more efficient way to apply the action of the matrix (e.g.
exploit a tensor product to reduce the memory usage), it makes sense to use
the PETSc matrix formats. Also, most problems need preconditioning and it's
convenient to have an assembled matrix available in a PETSc format so that
you can try a variety of preconditioners. You might end up doing something
clever in the end, for which fewer/smaller matrices are assembled, but
having assembled matrices is very convenient for experimentation and to
check code correctness.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110827/dabb1f21/attachment.htm>
More information about the petsc-users
mailing list