On Tue, Jul 21, 2009 at 5:44 PM, Andrew T Barker <span dir="ltr"><<a href="mailto:Andrew.Barker@colorado.edu">Andrew.Barker@colorado.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I want to do multiple sweeps of ASM to precondition GMRES. So I do something like<br>
<br>
-ksp_type gmres -pc_type ksp -ksp_ksp_type richardson -ksp_pc_type asm<br>
<br>
which works fine. Now I want to set my own subdomains with PCASMSetLocalSubdomains(), which isn't accessible from the command line.<br>
<br>
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.<br>
<br>
I'm at a loss for how to solve this problem - any help would be appreciated.</blockquote><div><br>I will think about it, but the easiest way for now is just to create the inner PC yourself:<br><br> PCCreate(&inner_pc)<br>
PCSetType()<br> PCSetFromOptions()<br> PCASMSetLocalSubDomains()<br> KSPSetPC(inner_ksp, inner_pc)<br> <br><br> Matt<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Andrew<br>
---<br>
<font color="#888888">Andrew T. Barker<br>
<a href="mailto:andrew.barker@colorado.edu">andrew.barker@colorado.edu</a><br>
Department of Applied Mathematics<br>
University of Colorado, Boulder<br>
526 UCB, Boulder, CO 80309-0526<br>
</font></blockquote></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>