Signals convergence of the algorithm. More...
#include <HasConverged.hpp>
Public Member Functions  
HasConverged (const Criteria &criteria, size_t iteration_id, double residual_magnitude, double initial_residual_magnitude) noexcept  
Determine whether the criteria are met by means of Convergence::criteria_match .  
HasConverged (size_t num_iterations, size_t iteration_id) noexcept  
Construct at a state where iteration_id iterations of a total of num_iterations have completed.  
operator bool () const noexcept  
Reason  reason () const noexcept 
The reason the algorithm has converged. More...  
size_t  num_iterations () const noexcept 
The number of iterations the algorithm has completed.  
double  residual_magnitude () const noexcept 
The residual magnitude after the last iteration. NaN if no iteration has completed yet.  
double  initial_residual_magnitude () const noexcept 
The residual magnitude before the first iteration. NaN if this information is not available yet.  
void  pup (PUP::er &p) noexcept 
Friends  
bool  operator== (const HasConverged &lhs, const HasConverged &rhs) noexcept 
bool  operator!= (const HasConverged &lhs, const HasConverged &rhs) noexcept 
std::ostream &  operator<< (std::ostream &os, const HasConverged &has_converged) noexcept 
Signals convergence of the algorithm.
Evaluates to true
if the algorithm has converged and no further iterations should be performed. In this case, the reason()
member function provides more information. If false
, calling reason()
is an error.
The stream operator provides a humanreadable description of the convergence status.
This type defaultconstructs to a state that signals the algorithm has not yet converged.

noexcept 
The reason the algorithm has converged.