Hi,

I have a MATMPIAIJ matrix A with an overestimated  preallocated size.

After closing it I want a duplicate of A with sharp memory
allocation for each row both diagonal and off-diagonal.

I know how to do it by hand, but I am wondering if a function already exists.

For example, if I use MatDuplicate with 
MAT_COPY_VALUES<https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatDuplicateOption.html#MatDuplicateOption>,
will it do a sharp memory allocation, or use the same loose memory allocation 
of A?

Any other function would do the job?

Thanks,
Eugenio





Eugenio Aulisa

Department of Mathematics and Statistics,
Texas Tech University
Lubbock TX, 79409-1042
room: 226
http://www.math.ttu.edu/~eaulisa/
phone: (806) 834-6684
fax: (806) 742-1112



Reply via email to