Independently configuring down & up smoothers in PCMG

Barry Smith bsmith at
Mon Oct 20 16:18:13 CDT 2008

   Sorry I haven't responded to this fully.

   I hate the idea of a hack that is just for this case and a special
flag you got to set or pass in.

   For the _1_, _2_ etc I did the following. If the string in the code  
_%d_  (for example _1_) it first checks for an exact match in the list  
set options. If it does not find an exact match it removes the _%d_  
and tries
again for an exact match. This seems to work pretty well and could be
used in many places in the code, not just in the PCMG stuff.

   It would be nice to use some similar technique the case below.  
1) use _CAPS_ first exactly and then removing the _CAPS_
2) make the part with special charactors _<string>_,  first look with  
then try without _string_ (the <> are just my example charactors,  
could use | or whatever.

   What do people think about this?


Note that currently we always use small letters in the option names.  
We could continue to
have the options database have small letters and use _tolower(CAPS)_  
as the first test.
I'm inclinded to do 1).

With multiple _XXX_ _4_ in an option we'll have to be careful to  
properly check all possibilities
in some consistent order.

On Oct 8, 2008, at 10:14 PM, Dave May wrote:

> Howdy,
>      Should there be a mechanism to independently configure the down
> and up smoothers
> for PCMG from the command line?
> From the looks of things, it seems that on a  given level, one is only
> able to set the smoothing
> sweeps to be different via
>    -pc_mg_smoothup 3 -pc_mg_smoothdown 2
> Since both the down and up smoothers (KSP's) have the prefix set to be
> "mg_levels_X",
> it would seem that I cannot differentiate between the up ksp at level
> X from the down ksp
> at level X via any command line arguments.
> It would be pain to ALWAYS have to configure both the up and down
> smoothers independently.
> But to enable the down and up smoothers to be configured independently
> (on those odd occasions
> you want to do it) , could we do something like; set a flag via
>    -pc_mg_smoothers_different
> which would include in the smoothers prefix, the words "up" or "down"?
> Then on the command line we could do something like
>    -mg_levels_1_up_ksp_type XXX
>    -mg_levels_1_down_ksp_type YYY
> Cheers,
>    Dave

More information about the petsc-dev mailing list