[petsc-users] reuse matrix aij structure
Matthew Knepley
knepley at gmail.com
Fri Sep 25 07:28:45 CDT 2015
On Fri, Sep 25, 2015 at 4:16 AM, Feng Xing <snakexf at gmail.com> wrote:
> Hello everyone,
>
> I want to solve many times A*x=b, where the non-zero structure of A (aij)
> is always same, but its values change. I would like to ask if it is
> possible to call assembly_begin/end only one time, then change the values
> of A each time.
>
You need to call assembly when changing values, but it should be fast.
Matt
> I find it is possible for a vector(Vec) through VecGetArray. It returns a
> pointer. Is there similar way for matrix? Thank you very much.
>
> Regards,
>
> Feng Xing
> Postdoc at Inria
>
>
>
--
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150925/20f6b612/attachment.html>
More information about the petsc-users
mailing list