[petsc-dev] sor smoothers

Jed Brown jedbrown at mcs.anl.gov
Sun Sep 8 13:14:51 CDT 2013


Barry Smith <bsmith at mcs.anl.gov> writes:
> We should add MatResidual() to the basic Mat methods (note this is the
> same as MatMultSub() if we had such a thing) then all the many places
> in PETSc where we have MatMult(); MatAXPY/AYPX(); 

* VecAXPY

> can be replace with that one call and PCMGSetResidual() and
> PCMGResidualDefault() would just disappear.  We could have
> MatResidual_Default() that did the usual MatMult followed by VecAYPX()
> but each Mat implementation can implement an optimized one if they
> want.

An alternative would be to add a scalar parameter to MatMultAdd.

To make the caching safe, the Mat impl would record the State of the Vec
for which it was caching a triangular application.

Perhaps PetscObjects should get a 64-bit unique ID assigned by a global
counter, or even a slightly longer hash of information that should never
repeat.  Caching the pointer leaves the ABA problem.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130908/7af17d64/attachment.sig>


More information about the petsc-dev mailing list