On Fri, Oct 16, 2020 at 7:50 AM Aulisa, Eugenio <[email protected]> wrote:
> 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? > It is a sharp allocation. Thanks, Matt > 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 > > > > -- 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 https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
