Dear petsc users,

I need to compute the difference of two matrices M(nu) and M(nu+epsilon) to 
estimate the derivative of the matrix with respect to the parameter nu.
Since only very few entries are modified by epsilon, D = M(nu+epsilon) - M(nu) 
contains many new zeros and I would like to remove them.

I am using PETSc from petsc4py.
I have seen the method `chop` which call `Filter` but without the `compress` 
argument.
At the end I need to store this matrix into a file. So my questions are:
- Is is possible to remove the zeros entries with petsc4py with Mat methods?
- Is is possible to do it when I save the file, ie with Viewer methods ?

Thanks a lot,

Benoit

Reply via email to