Hi, 
I want to use the petsc_dm solver without passing --use-petsc-dm 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.


------------------------------------------------------------------------------
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