[petsc-users] Remove Jacobian matrix values less than tolerance

Matthew Knepley knepley at gmail.com
Thu Aug 6 16:22:36 CDT 2015


On Thu, Aug 6, 2015 at 4:16 PM, Juris Vencels <juris.vencels at gmail.com>
wrote:

> Hi Users,
>
>
> When I construct analytical Jacobian matrix it has many small values of
> order 1E-16.
>
> How can I remove these values that are less than a given tolerance, let's
> say 1E-10?
>
> I tried to use MatChop together with MatCopy and MatDuplicate, but none of
> these functions ignores zeros.
>

Do you mean that you want to change the sparsity pattern? We do not have a
function which does this. It would
require a copy to regain the lost memory, and its not normally worth the
trouble.

Do you have some data or a model that tells you its worth it in your case?
This is a question I
always ask myself before programming.

  Thanks,

     Matt


> Thanks!

-- 
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/20150806/e56a81e6/attachment.html>


More information about the petsc-users mailing list