56 #include "../../../../Eigen/src/Core/util/NonMPL2.h" 58 #ifndef EIGEN_ITERATION_CONTROLLER_H 59 #define EIGEN_ITERATION_CONTROLLER_H 87 m_nit = 0; m_res = 0.0; m_written =
false;
88 m_resminreach = 1E50; m_resadd = 0.0;
93 : m_rhsn(1.0), m_maxiter(mit), m_noise(noi), m_resmax(r) {
init(); }
98 bool first() {
return m_nit == 0; }
130 m_resminreach = (
std::min)(m_resminreach, m_res);
139 if (m_noise > 0 && !m_written)
144 return (m_nit >= m_maxiter ||
converged(nr));
146 template <
typename VectorType>
154 #endif // EIGEN_ITERATION_CONTROLLER_H double m_rhsn
Right hand side norm.
bool finished(const MatrixBase< VectorType > &v)
void setMaxIterations(size_t i)
double maxResidual() const
Namespace containing all symbols from the Eigen library.
void setCallback(void(*t)(const IterationController &))
double m_resmax
maximum residual
void setRhsNorm(double r)
size_t m_maxiter
Max. number of iterations.
void setMaxResidual(double r)
bool converged(const VectorType &v)
size_t maxIterarions() const
int m_noise
if noise > 0 iterations are printed
size_t m_nit
iteration number
EIGEN_DEVICE_FUNC RealScalar squaredNorm() const
bool converged(double nr)
void(* m_callback)(const IterationController &)
IterationController(double r=1.0E-8, int noi=0, size_t mit=size_t(-1))
void setNoiseLevel(int n)
Controls the iterations of the iterative solvers.
Base class for all dense matrices, vectors, and expressions.
double m_res
last computed residual
void setIteration(size_t i)