On Tue, 9 Nov 2010, Jed Brown wrote: > On Tue, Nov 9, 2010 at 12:56, Tim Kroeger <tim.kroeger at > cevis.uni-bremen.de> wrote: > Thank you, I found it now: The shell matrix does not implement > MatMultAdd, only MatMult. ?Of course, it > can't work then. ?Thank you very much! > > > Okay, but then it will error instead of silently modifying the vector.
It didn't. And I did not forget CHKERRABORT() after the call to MatMultAdd(). Also, implementing MatMultAdd() for the shell did not resolve the problem. I had a look into src/mat/impls/submat/submat.c (of petsc-3.1-p4) and found that MatMultAdd_SubMatrix() internally calls MatMult() (line 155), not MatMultAdd(). Later in that method, some VecAYPX() is called (line 159), which might do the required addition. Can you please confirm whether (a) this is correct but explains why leaving MatMultAdd() of the shell undefined does not error; or (b) everything remains as you said before; or (c) this is a bug in that PETSc version? Best Regards, Tim -- Dr. Tim Kroeger CeVis -- Center of Complex Systems and Visualization University of Bremen tim.kroeger at cevis.uni-bremen.de Universitaetsallee 29 tim.kroeger at mevis.fraunhofer.de D-28359 Bremen Phone +49-421-218-7710 Germany Fax +49-421-218-4236
