[petsc-dev] Error in MatGetDiagonal_Shell?
Smith, Barry F.
bsmith at mcs.anl.gov
Sun Apr 29 19:14:58 CDT 2018
I don't understand
The code has
ierr = MatGetDiagonal(A,W2);CHKERRQ(ierr);
ierr = VecView(W2,viewer);CHKERRQ(ierr);
the output from this VecView seems to match the diagonal of the matrix printed earlier.
> On Apr 29, 2018, at 10:02 AM, Stefano Zampini <stefano.zampini at gmail.com> wrote:
>
> By looking at src/mat/examples/tests/output/ex88_1.out, it seems that the output of MatGetDiagonal is wrong for MATSHELL.
>
> it should be
> 2.96782e+08
> 1.41731e+09
> and not (as computed)
> 1.10918e+08
> 2.06459e+08
What do you mean "as computed"? The output file does not contain
> 1.10918e+08
> 2.06459e+08
anywhere.
Are you modifying the example and running it again to get the incorrect value?
Barry
>
> --
> Stefano
More information about the petsc-dev
mailing list