[petsc-users] MatAYPX for dense and sparse matrices

Jed Brown jed at 59A2.org
Mon Mar 21 06:45:37 CDT 2011


On Mon, Mar 21, 2011 at 12:40, Alexander Grayver <agrayver at gfz-potsdam.de>wrote:

> One more question. I get matrix J out of MatMatMult operation and then I
> have to add L matrix up, wouldn't there be a conflict using
> MatAssemblyBegin/MatAssemblyEnd again? Generally, is it allowed to set new
> values into the matrix after MatAssemblyBegin/MatAssemblyEnd already has
> been done once?
>

Yes, you can assemble again. Just set the values, then call
MatAssembly{Begin,End}. It is not okay to set values, skip (re)assembling,
and call MatMult() or something.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110321/5ed01057/attachment.htm>


More information about the petsc-users mailing list