[petsc-dev] funny mg behavior
Mark F. Adams
mark.adams at columbia.edu
Sun Aug 7 17:26:27 CDT 2011
I'm finding what looks like strange behavior with respect to setting the number of pre/post smooths in PCMG. I setup my PCMG with a line:
ierr = PCMGGetSmoother( a_pc, lidx, &smoother ); CHKERRQ(ierr);
[ set it up ... ]
It seems that this method has a side effect of setting the use-same-smoother-for-pre-and-post state, or this is default.
The problem is that if I try to set the number of smoothing steps with code:
ierr = PCMGSetNumberSmoothDown(a_pc,2); CHKERRQ(ierr);
ierr = PCMGSetNumberSmoothUp(a_pc,2); CHKERRQ(ierr);
or command lines: -pc_mg_smoothdown 2 -pc_mg_smoothup 2
it unsets the use-same-smoother-for-pre-and-post state. Then I get GMRES/ILU as my up (post) smoother (ie, a default solver), with my carefully crafted smoother only used for pre smoothing. Not what I want.
Am I missing something or did a hole form in PETSc's logic at some point? Perhaps there should be a PCMGSetNumberSmooth and '-pc_mg_smooth n' option that does not have this side effect?
Mark
More information about the petsc-dev
mailing list