Norihiro Watanabe <[email protected]> writes:

> Hi, I wonder whether "-snes_type test" option can work also with a nested
> matrix. I got the following error in my program and am not sure if there is
> a problem in my codes or just PETSc doesn't support it.

I believe -snes_compare_explicit should convert if necessary (it
provides similar functionality to -snes_type test).

> Testing hand-coded Jacobian, if the ratio is
> O(1.e-8), the hand-coded Jacobian is probably correct.
> Run with -snes_test_display to show difference
> of hand-coded and finite difference Jacobian.
> [0]PETSC ERROR: --------------------- Error Message
> ------------------------------------
> [0]PETSC ERROR: No support for this operation for this object type!
> [0]PETSC ERROR: Mat type nest!

We strongly recommend writing your code in a way that is agnostic to
matrix format (i.e., assemble using MatGetLocalSubMatrix).  Then just
use a monolithic format for comparisons like this and switch to MatNest
when trying to get the best performance out of a fieldsplit
preconditioner.

Attachment: pgpBTzdM0N5m2.pgp
Description: PGP signature

Reply via email to