[petsc-users] Use kspsolve repeatly

丁老师 ztdepyahoo at 163.com
Thu Aug 1 08:29:34 CDT 2013


I use the latest version PETSC, and the matrix has the same nonzero pattern during each outer iteration.
I want to know does the kspsolve allocate memory for PC dring each call. 





在 2013-08-01 20:46:36,"Matthew Knepley" <knepley at gmail.com> 写道:

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/53deafb9/attachment.html>


More information about the petsc-users mailing list