[petsc-users] Is it possible to free extra memory after mat assemble?

Gong Ding gdiso at ustc.edu
Fri Feb 18 02:26:08 CST 2011


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?




More information about the petsc-users mailing list