Thank you, Jed. "-snes_compare_explicit" worked with a nested matrix. I'll
try to use MatGetLocalSubMatrix in my programm.

Best,
nori


On Thu, Apr 17, 2014 at 4:56 PM, Jed Brown <[email protected]> wrote:

> 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.
>



-- 
Norihiro Watanabe

Reply via email to