set ASM subdomains in sub KSP

Matthew Knepley knepley at gmail.com
Tue Jul 21 17:54:27 CDT 2009


On Tue, Jul 21, 2009 at 5:44 PM, Andrew T Barker <Andrew.Barker at colorado.edu
> wrote:

> I want to do multiple sweeps of ASM to precondition GMRES.  So I do
> something like
>
> -ksp_type gmres -pc_type ksp -ksp_ksp_type richardson -ksp_pc_type asm
>
> which works fine.  Now I want to set my own subdomains with
> PCASMSetLocalSubdomains(), which isn't accessible from the command line.
>
> I can use PCKSPGetKSP() to get the KSP (and then the PC) to use in
> PCASMSetLocalSubdomains(), but I have to call KSPSetUp() on the parent KSP
> in order to use PCKSPGetKSP().  And then I'm not allowed to call
> PCASMSetLocalSubdomains() if KSPSetUp() has already been called - object is
> in wrong state.
>
> I'm at a loss for how to solve this problem - any help would be
> appreciated.


I will think about it, but the easiest way for now is just to create the
inner PC yourself:

  PCCreate(&inner_pc)
  PCSetType()
  PCSetFromOptions()
  PCASMSetLocalSubDomains()
  KSPSetPC(inner_ksp, inner_pc)


   Matt


> Andrew
> ---
> Andrew T. Barker
> andrew.barker at colorado.edu
> Department of Applied Mathematics
> University of Colorado, Boulder
> 526 UCB, Boulder, CO 80309-0526
>
-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090721/e04eeb24/attachment-0001.htm>


More information about the petsc-users mailing list