23#include <cusp/detail/config.h>
100template <
typename ValueType>
105 typedef typename cusp::norm_type<ValueType>::type
Real;
118 template <
typename VectorType>
123 const bool verbose =
false);
185 template <
typename Vector>
195 template <
typename DerivedPolicy,
typename Vector>
196 bool finished(thrust::execution_policy<DerivedPolicy> &exec,
const Vector& r);
219 template <
typename Vector>
256 size_t iteration_limit_;
257 size_t iteration_count_;
258 Real relative_tolerance_;
259 Real absolute_tolerance_;
271template <
typename ValueType>
296 template <
typename VectorType>
310template <
typename ValueType>
335 template <
typename VectorType>
349template <
typename ValueType>
374 template <
typename VectorType>
385#include <cusp/detail/monitor.inl>
The array1d class is a 1D vector container that may contain elements stored in "host" or "device" mem...
Deprecated convergence monitor.
Deprecated default monitor.
Implements standard convergence criteria and reporting for iterative solvers.
Deprecated verbose monitor.
monitor(const VectorType &b, const size_t iteration_limit=500, const Real relative_tolerance=1e-5, const Real absolute_tolerance=0, const bool verbose=false)
Constructs a monitor for a given right-hand-side b.
Real geometric_rate(void)
Returns the geometric convergence rate.
CUSP_DEPRECATED convergence_monitor(const VectorType &b, const size_t iteration_limit=500, const Real relative_tolerance=1e-5, const Real absolute_tolerance=0)
Constructs a convergence_monitor for a given right-hand-side b.
Parent::Real Real
A real-valued type used for norms and tolerances.
void print(void)
Prints the number of iterations and convergence history information.
Real residual_norm(void) const
Euclidean norm of last residual.
Real tolerance(void) const
Return the tolerance equal to absolute_tolerance() + relative_tolerance() * ||b||.
CUSP_DEPRECATED verbose_monitor(const VectorType &b, const size_t iteration_limit=500, const Real relative_tolerance=1e-5, const Real absolute_tolerance=0)
Constructs a verbose_monitor for a given right-hand-side b.
Real immediate_rate(void)
Returns the immediate convergence rate.
cusp::array1d< Real, cusp::host_memory > residuals
Array holding the residuals per iteration.
void reset(const Vector &b)
Resets the monitor using same convergence criteria.
bool finished(thrust::execution_policy< DerivedPolicy > &exec, const Vector &r)
Applies convergence criteria using an explicit execution policy.
Real relative_tolerance(void) const
Returns the relative tolerance.
cusp::norm_type< ValueType >::type Real
A real-valued type used for norms and tolerances.
bool converged(void) const
Indicates whether the last tested residual satisfies the convergence tolerance.
bool is_verbose(void)
Gets the verbosity level of the monitor.
void set_verbose(bool verbose_=true)
Sets the verbosity level of the monitor.
void operator++(void)
Increments the iteration count.
Parent::Real Real
A real-valued type used for norms and tolerances.
bool finished(const Vector &r)
Applies convergence criteria to determine whether iteration is finished.
Real average_rate(void)
Returns the average convergence rate.
size_t iteration_count(void) const
Returns the number of iterations that the monitor has executed.
Parent::Real Real
A real-valued type used for norms and tolerances.
Real absolute_tolerance(void) const
Returns the absolute tolerance.
CUSP_DEPRECATED default_monitor(const VectorType &b, const size_t iteration_limit=500, const Real relative_tolerance=1e-5, const Real absolute_tolerance=0)
Constructs a default_monitor for a given right-hand-side b.
size_t iteration_limit(void) const
Returns the maximum number of iterations.