[petsc-users] reuse matrix aij structure

Barry Smith bsmith at mcs.anl.gov
Fri Sep 25 11:12:17 CDT 2015


> On Sep 25, 2015, at 7:28 AM, Matthew Knepley <knepley at gmail.com> wrote:
> 
> 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

   will 

> 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



More information about the petsc-users mailing list