[petsc-users] MatSetValues and Zero enteries
John Mousel
john.mousel at gmail.com
Mon Jun 20 15:12:55 CDT 2011
See the matrix options available in the man pages. I think the function
below is what you are looking for.
http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatSetOption.html
MatSetOption <http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatSetOption.html#MatSetOption>(A,MAT_IGNORE_ZERO_ENTRIES,PETSC_TRUE
<http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Sys/PETSC_TRUE.html#PETSC_TRUE>);
Best Regards,
John
On Mon, Jun 20, 2011 at 2:42 PM, Mohammad Mirzadeh <mirzadeh at gmail.com>wrote:
> Hi folks,
>
> I've noticed that MatSetValues explicitly inserts zeros in the matrix if an
> element is really zero. Is there a way to drop elements (or not save them in
> the first place) that are below a certain tolerance? I realize one way of
> doing it is in the application code and when using MatSetValues but I'm just
> wondering if PETSc has a function for it?
>
> Thanks,
> Mohammad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110620/8930229f/attachment.htm>
More information about the petsc-users
mailing list