[petsc-users] Dynamically changing coarse and levels DMMG preconditioners

Matthew Knepley knepley at gmail.com
Tue Aug 10 20:57:01 CDT 2010


On Tue, Aug 10, 2010 at 8:46 PM, Joey Hegarty <Joey.Hegarty at al.com.au>wrote:

> Hi folks,
>
> I'm looking for a way to update the coarse and levels preconditioners used
> during the DMMG solve after PETSc has been initialized.
>
> I can update some options dynamically like so:
>
>        KSP ksp = DMMGGetKSP(dmmg);
>        KSPSetTolerances(ksp, ...);
>        KSPGMRESSetRestart(ksp, ...);
>
> But I do not see a clear way of updating the coarse and levels
> preconditioner types in a similar way.  Am I missing something obvious?
>  Apologise if this has been asked before.
>

dmmg is just an array. DMMGGetKSP() is a macro that does

  dmmg[L-1].ksp

for a DMMG of L levels. For the coarse level, you can use dmmg[0]. We should
have something
better, but this will work for now.

  Matt


> Cheers,
> Joey
>



-- 
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/20100810/2f38a2d7/attachment.htm>


More information about the petsc-users mailing list