[petsc-users] Is it possible to free extra memory after mat assemble?
Matthew Knepley
knepley at gmail.com
Fri Feb 18 05:44:59 CST 2011
2011/2/18 Gong Ding <gdiso at ustc.edu>
> Hi,
> After update my FVM code to support higher order, I have to preallocate
> more memory when creating the matrix. However, only a few cells (determined
> at run time) needed to be high order, thus preallocated memory is overkill
> too much.
>
> Is it possible to add a function to reassemble the AIJ matrix to free the
> extra memory?
> Or it has already done when MatAssembly is called?
>
This is done during MatAssemblyEnd(). However, there is no guarantee that
the operating system
actually returns that memory to general use.
Matt
--
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/20110218/b3285f63/attachment-0001.htm>
More information about the petsc-users
mailing list