|
Wildmeshing Toolkit
|
How the vertex solves of a smoothing pass ended: Newton iterations taken and the status polysolve stopped on, counted per pass. More...
#include <SmoothVertex.hpp>
Public Member Functions | |
| void | record (const polysolve::nonlinear::Solver &s, const bool did_throw) |
One solve that just returned from minimize(), or threw out of it (did_throw). | |
| size_t | solves () const |
| void | reset () |
| std::string | to_string () const |
Static Public Member Functions | |
| static const char * | status_name (const size_t i) |
Public Attributes | |
| std::array< std::atomic< size_t >, kIterBuckets > | iterations {} |
| std::array< std::atomic< size_t >, kStatuses > | status {} |
| std::atomic< size_t > | iterations_total {0} |
| std::atomic< size_t > | threw {0} |
How the vertex solves of a smoothing pass ended: Newton iterations taken and the status polysolve stopped on, counted per pass.
The solver runs basic_nonlinear_solver_params (solver.hpp): DenseNewton, at most 10 iterations, allow_out_of_iterations, rel_grad_norm_tol 0. So a solve stops on an absolute tolerance, on the iteration cap without complaint, or on a failure polysolve reports by throwing (a failed line search on the last strategy, a NaN). The accepted / rejected line cannot tell a pass whose solves all hit the cap from one whose solves converge in two iterations; this does.
Read from the solver object, not from info(): status() and current_criteria().iterations are set before polysolve throws, while info() is not updated on that path, so a thrown solve is still classified by the status it stopped on.
|
inline |
solves=N mean_iterations=m | iterations 0=a 1=b ... 10=k >10=l | stop <nonzero statuses> | threw=t. Every iteration bucket is printed, zeros included, so the histogram's shape reads at a glance.