[petsc-users] Use kspsolve repeatly

Matthew Knepley knepley at gmail.com
Thu Aug 1 07:46:36 CDT 2013


On Thu, Aug 1, 2013 at 12:58 PM, 丁老师 <ztdepyahoo at 163.com> wrote:

> I need to use the kspsolve(A,b,x) repeatly in my code in the following
> style.
> but i have noticed from the system load monitor that during the code
> running, it allocate new memeory every step.
>
> I use the default setting for the PC.
> Could you please told me how to resolve this problem.
>

1) There is no enough here to give us an idea what you are doing

2) Are you using the latest release? If so, it prevents you from adding new
nonzreos to the matrix, which is my first guess.

   Matt


> for (int i=0;i<maxit;i++)
> {
> MatsetValues(    )....
> kspsolve(A,b,x)
> }
>
>
>
>
> < span title="neteasefooter">
>
>
>
>
>
>
>


-- 
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/20130801/13edf7b0/attachment.html>


More information about the petsc-users mailing list