[petsc-dev] [petsc-maint] Using Hypre AMS and Standard Hypre AMG

Smith, Barry F. bsmith at mcs.anl.gov
Mon Jan 22 13:09:27 CST 2018



> On Jan 22, 2018, at 12:54 PM, Ari Rappaport <arir at vosssci.com> wrote:
> 
> Hi all,
> 
> I am running a problem that requires both preconditioning for an elliptic problem,
> as well as a problem stemming from Maxwell's equations. Currently, I am using PETSc's
> bridge to Hypre for both, PCHYPRE.
> 
> The problem is that the choice of whether to use Hypre's special AMS solver is decided
> at the call to PETScInitialize using a command line argument "-pc_hypre_type ams". 
> I would like to be able to decide to use the ams space once, and then the standard AMG 
> once, all in the course of a single run. Does PETSc support this capability somehow? 

   Yes. For each KSP (assuming you are directly using KSP same things is true for SNES and TS) you attach and options prefix and then you prefix all command line options with particular prefixes.

  See    KSPSetOptionsPrefix()


> Is it possible to call PETScInitialize multiple times safely perhaps?

  No, nothing to do with it.

> 
> Thank you,
> Ari



More information about the petsc-dev mailing list