Matt, I see. Please forgive my ignorance, but I don't quite understand why you should not be able to set a tolerance for it. Could you please point me to the source file that applies the MAT_IGNORE_ZERO_ENTRIES option to the matrix? I may be able to manually modify it.
Thanks, Mohammad On Mon, Jun 20, 2011 at 2:34 PM, Matthew Knepley <knepley at gmail.com> wrote: > On Mon, Jun 20, 2011 at 9:31 PM, Mohammad Mirzadeh <mirzadeh at > gmail.com>wrote: > >> Thanks John -- taht's helpful. Do you also know how I can change the >> tolerance for dropping elements? >> > > Right now, this only discards entires which are exactly floating point 0.0. > > Matt > > >> Mohammad >> >> On Mon, Jun 20, 2011 at 1:12 PM, John Mousel <john.mousel at gmail.com>wrote: >> >>> 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 >>>> >>> >>> >> > > > -- > 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/20110620/722f0074/attachment.htm>
