From: Subramanya Gautam Sadasiva <ssadasiv@pu...>  20130222 19:22:52

Hi, I want to use the petsc_dm solver without passing usepetscdm at the command line. I did this in the constructor of my class that derives from nonlinearimplicitsystem . AutoPtr<PetscNonlinearSolver<Number> > petsc_solver = AutoPtr<PetscNonlinearSolver<Number> > (new PetscNonlinearSolver<Number> (*this)); // Attach the R & J calculation object petsc_solver>residual_object = this; petsc_solver>jacobian_object = this; // Attach the bounds calculation object petsc_solver>bounds_object = this; // Get a petsc error . this is an alias for a integer PetscErrorCode ierr; petsc_solver>PetscNonlinearSolver<Number>::init(); // The prefix is ch_solve_. I need to figure out how to // put it into the documentation ierr = SNESSetOptionsPrefix(petsc_solver>_snes,"ch_solve_"); // Set from options file for the solve ierr = SNESSetFromOptions(petsc_solver>_snes); // Now put petsc solver back into nonlinear solver AutoPtr nonlinear_solver = petsc_solver; This does not seem to work and gives me an error. Is there a better way to do it than to override the nonlinear_solver? Thanks, Subramanya "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. 