Thanks. the thought struck me, but I was not sure on how to proceed. Does what 
follows sound like a reasonable course of action. 
In the constructor 
Cast the autoptr to nonlinear solver to PetscNonlinearSolver or 
PetscDMNonlinearSolver, 
Get the pointer to the snes context 
Call SnesSetOptions on the snes context. 

Thanks, 

Subramanya Sadasiva 

"But memory eventually fades. Turbulences damp out, internal strains yield to 
plastic flow, concentration inhomogeneities diffuse to uniformity. Systems tend 
to subside to very simple states,independent of their specific history."
Herbert Callen . Thermodynamics and an Introduction to Thermostatics.

----- Original Message -----
From: "Jed Brown" <[email protected]>
To: "Subramanya Gautam Sadasiva" <[email protected]>, "libmesh-users" 
<[email protected]>
Sent: Wednesday, February 20, 2013 6:09:49 PM
Subject: Re: [Libmesh-users] Multiple SNES solvers

Subramanya Gautam Sadasiva <[email protected]> writes:

> Hi, 
> I am solving a Cahn Hilliard Navier stokes system and that means
> solving multiple sequential non-linear equations. This means I need to
> pass different petsc options to the solver of each, and set them using
> PETSC_set_option for each of the solvers one by one. Is there a
> recommended way to do this?

If you call

  SNESSetOptionsPrefix(snes1,"system1_");
  SNESSetOptionsPrefix(snes2,"system2_");

then you can control them separately using options like
'-system1_snes_monitor -system1_ksp_type cg -system2_pc_type gamg'.  Of
course these options can be placed in options files that you bring in
with '-options_file yourfile'.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to