From: Subramanya Gautam Sadasiva <ssadasiv@pu...>  20130220 20:21:07

Hi, I am solving a Cahn Hilliard Navier stokes system and that means solving multiple sequential nonlinear 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? In my current implementation  I have the following class CHNS::CahnHilliard : public TransientNonlinearImplicitSystem, public NonlinearImplicitSystem::ComputeResidual, public NonlinearImplicitSystem::ComputeJacobian, public NonlinearImplicitSystem::ComputeBounds, public System::Initialization and a similar one for the navier stokes equation. I have a feeling that I need to switch the Nonlinear_solver member to one of the child nonlinear_solver (Either PetcNonlinearSolver (for the case without the variational inequality) or PetscDMNonlinearSolver (For the case with the nonlinear inequality). Is there a simple way to do this? I am new to C++ so it is mot very apparent to me what the solution to this problem is. 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. 