[petsc-users] multigrid implementation problem

Jed Brown jedbrown at mcs.anl.gov
Sun Jun 10 19:35:12 CDT 2012


On Sun, Jun 10, 2012 at 7:32 PM, Nakib Haider Protik <nprot048 at uottawa.ca>wrote:

> Okay. But if I understood correctly, doing the following would also be
> wrong since I will have made three extra outer KSP objects. I am not sure
> I understand what these functions want.
>
>  KSP cksp, uksp, dksp;
>  PCMGGetCoarseSolve(pc, &cksp);/**/
>  PCMGGetSmootherDown(pc, 0, &dksp);/**/
>  PCMGGetSmootherUp(pc, 1, &uksp);/**/
>

This is fine, all of these are getting references to inner objects without
overwriting the outer objects. Of course you don't need to get these
references if you aren't going to modify them.

I recommend that you experiment with algorithms using the command line and
check that it does what you expect using -ksp_view.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120610/8783d288/attachment.html>


More information about the petsc-users mailing list