[petsc-users] SNES test with a nested matrix
Norihiro Watanabe
norihiro.w at gmail.com
Tue Apr 22 03:31:42 CDT 2014
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 <jed at jedbrown.org> wrote:
> Norihiro Watanabe <norihiro.w at gmail.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140422/67d81f73/attachment.html>
More information about the petsc-users
mailing list