On Thu, 3 Mar 2011, Roman Vetter wrote:
>>> 1. Replace the contents of PetscLinearSolver::print_converged_reason() by >>> >>> KSPConvergedReason reason; >>> KSPGetConvergedReason(_ksp, &reason); >>> libMesh::out << "Linear solver convergence/divergence reason: " << >>> KSPConvergedReasons[reason] << std::endl; >>> >>> or similar. >> >> This sounds like a good idea, if you want to test it and send us the >> patch. >> >>> 2. Remove the this->clear() call from PetscNonlinearSolver::solve(). >>> This prevents the _snes context pointer from being destroyed. In >>> PetscLinearSolver, the _ksp context pointer isn't destroyed either. >> >> I'm up for this unless anyone objects. >> >>> 3. Introduce PetscNonlinearSolver::print_converged_reason() >>> analogously to the linear solver, using the maintained _snes pointer. >> >> Sounds good. > > > Since there have been no further objections, here's a patch that does > all of the above. I have tested both linear (with example 9 for > instance) and nonlinear print_converged_reason()s, they're working > smoothly in the scope of my testing. Also, no negative side-effects > have occurred to me from keeping the _snes context alive. > > You may perhaps commit the new > PetscLinearSolver::print_converged_reason before the rest, if you > prefer. This looks good to me, and is now committed. Hopefully John etc. will fix it if there are any PETSc 2 compatibility issues. ;-) --- Roy ------------------------------------------------------------------------------ What You Don't Know About Data Connectivity CAN Hurt You This paper provides an overview of data connectivity, details its effect on application quality, and explores various alternative solutions. http://p.sf.net/sfu/progress-d2d _______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel