On Tue, 22 Feb 2011, Vetter Roman wrote: > I propose to add the attached patch to trunk. It adds an integer > storing the convergence reason returned by the PETSc nonlinear solver, > closely analogous to the existing convergence boolean flag, which is > somewhat meager. Without this, the convergence reason is lost right > after solving, without allowing the user to find out about it inside > their programs (because SNESDestroy(_snes) is called immediately, i.e. > before solve() finishes). > > You may argue that the -snes_converged_reason command line option > readily prints the desired information. That's right, but in some > cases it is desirable to know INSIDE the C++ program, not just on > stdout, at least it is in mine. :-) In the PETSs linear solver (KSP) > this information is implemented, just not in the nonlinear one (SNES). > > What do you think?
I definitely agree with letting the application code access the convergence/divergence reason, but not so much with making it an opaque PETSc-specific int. A new enum_convergence.h would fix all three of those problems at once, if you wanted to go to the trouble. You wouldn't need to bother actually implementing the Trilinos/Laspack codepaths (except to the extent that the base solver class would want to return an "UNKNOWN" or throw a libmesh_not_implemented() by default); I just don't want to make it impossible for someone else to write those implementations later. --- Roy ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel