\doxysection{Stopping criteria }
\hypertarget{group__stop}{}\label{group__stop}\index{Stopping criteria@{Stopping criteria}}


A module dedicated to the implementation and usage of the Stopping Criteria in Ginkgo.  


\doxysubsubsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
namespace \doxymbox{\hyperlink{namespacegko_1_1stop}{gko::\+stop}}
\begin{DoxyCompactList}\small\item\em The Stopping criterion namespace. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \doxymbox{\hyperlink{classgko_1_1stop_1_1Combined}{gko::\+stop::\+\+Combined}}
\begin{DoxyCompactList}\small\item\em The \doxylink{classgko_1_1stop_1_1Combined}{Combined} class is used to combine multiple criterions together through an OR operation. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1stop_1_1Iteration}{gko::\+stop::\+\+Iteration}}
\begin{DoxyCompactList}\small\item\em The \doxylink{classgko_1_1stop_1_1Iteration}{Iteration} class is a stopping criterion which stops the iteration process after a preset number of iterations. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1stop_1_1ResidualNormBase}{gko::\+stop::\+\+Residual\+Norm\+Base$<$ Value\+Type $>$}}
\begin{DoxyCompactList}\small\item\em The \doxylink{classgko_1_1stop_1_1ResidualNormBase}{Residual\+Norm\+Base} class provides a framework for stopping criteria related to the residual norm. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1stop_1_1ResidualNorm}{gko::\+stop::\+\+Residual\+Norm$<$ Value\+Type $>$}}
\begin{DoxyCompactList}\small\item\em The \doxylink{classgko_1_1stop_1_1ResidualNorm}{Residual\+Norm} class is a stopping criterion which stops the iteration process when the actual residual norm is below a certain threshold relative to. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1stop_1_1ImplicitResidualNorm}{gko::\+stop::\+\+Implicit\+Residual\+Norm$<$ Value\+Type $>$}}
\begin{DoxyCompactList}\small\item\em The \doxylink{classgko_1_1stop_1_1ImplicitResidualNorm}{Implicit\+Residual\+Norm} class is a stopping criterion which stops the iteration process when the implicit residual norm is below a certain threshold relative to. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1stop_1_1ResidualNormReduction}{gko::\+stop::\+\+Residual\+Norm\+Reduction$<$ Value\+Type $>$}}
\begin{DoxyCompactList}\small\item\em The \doxylink{classgko_1_1stop_1_1ResidualNormReduction}{Residual\+Norm\+Reduction} class is a stopping criterion which stops the iteration process when the residual norm is below a certain threshold relative to the norm of the initial residual, i.\+e. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1stop_1_1RelativeResidualNorm}{gko::\+stop::\+\+Relative\+Residual\+Norm$<$ Value\+Type $>$}}
\begin{DoxyCompactList}\small\item\em The \doxylink{classgko_1_1stop_1_1RelativeResidualNorm}{Relative\+Residual\+Norm} class is a stopping criterion which stops the iteration process when the residual norm is below a certain threshold relative to the norm of the right-\/hand side, i.\+e. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1stop_1_1AbsoluteResidualNorm}{gko::\+stop::\+\+Absolute\+Residual\+Norm$<$ Value\+Type $>$}}
\begin{DoxyCompactList}\small\item\em The \doxylink{classgko_1_1stop_1_1AbsoluteResidualNorm}{Absolute\+Residual\+Norm} class is a stopping criterion which stops the iteration process when the residual norm is below a certain threshold, i.\+e. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1stopping__status}{gko::\+stopping\+\_\+status}}
\begin{DoxyCompactList}\small\item\em This class is used to keep track of the stopping status of one vector. \end{DoxyCompactList}\item 
class \doxymbox{\hyperlink{classgko_1_1stop_1_1Time}{gko::\+stop::\+\+Time}}
\begin{DoxyCompactList}\small\item\em The \doxylink{classgko_1_1stop_1_1Time}{Time} class is a stopping criterion which stops the iteration process after a certain amount of time has passed. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum class \doxymbox{\hyperlink{group__stop_ga5fe97c4263e876f68b5d4a21f0e615b9}{gko::\+stop::\+mode}} \{ {\bfseries absolute}
, {\bfseries initial\+\_\+resnorm}
, {\bfseries rhs\+\_\+norm}
 \}
\begin{DoxyCompactList}\small\item\em The mode for the residual norm criterion. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename Factory\+Container$>$ }\\std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{namespacegko_1_1stop_a61839f234ddbaaf68db337e58e012499}{Criterion\+Factory}} $>$ \doxymbox{\hyperlink{group__stop_ga934dd0c4603a3e815c767f7628163d7e}{gko::\+stop::\+combine}} (Factory\+Container \&\&factories)
\begin{DoxyCompactList}\small\item\em Combines multiple criterion factories into a single combined criterion factory. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
A module dedicated to the implementation and usage of the Stopping Criteria in Ginkgo. 



\label{doc-enum-members}
\Hypertarget{group__stop_doc-enum-members}
\doxysubsection{Enumeration Type Documentation}
\Hypertarget{group__stop_ga5fe97c4263e876f68b5d4a21f0e615b9}\index{Stopping criteria@{Stopping criteria}!mode@{mode}}
\index{mode@{mode}!Stopping criteria@{Stopping criteria}}
\doxysubsubsection{\texorpdfstring{mode}{mode}}
{\footnotesize\ttfamily \label{group__stop_ga5fe97c4263e876f68b5d4a21f0e615b9} 
enum class \doxymbox{\hyperlink{group__stop_ga5fe97c4263e876f68b5d4a21f0e615b9}{gko::\+stop::\+mode}}\hspace{0.3cm}{\ttfamily [strong]}}



The mode for the residual norm criterion. 


\begin{DoxyItemize}
\item absolute:\+ Check for tolerance against residual norm. $ || r || \leq \tau $
\item initial\+\_\+resnorm:\+ Check for tolerance relative to the initial residual norm. $ || r || \leq \tau \times || r_0|| $
\item rhs\+\_\+norm:\+ Check for tolerance relative to the rhs norm. $ || r || \leq \tau \times || b || $ 
\end{DoxyItemize}

\label{doc-func-members}
\Hypertarget{group__stop_doc-func-members}
\doxysubsection{Function Documentation}
\Hypertarget{group__stop_ga934dd0c4603a3e815c767f7628163d7e}\index{Stopping criteria@{Stopping criteria}!combine@{combine}}
\index{combine@{combine}!Stopping criteria@{Stopping criteria}}
\doxysubsubsection{\texorpdfstring{combine()}{combine()}}
{\footnotesize\ttfamily \label{group__stop_ga934dd0c4603a3e815c767f7628163d7e} 
template$<$typename Factory\+Container$>$ \\
std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{namespacegko_1_1stop_a61839f234ddbaaf68db337e58e012499}{Criterion\+Factory}} $>$ gko::\+stop::\+combine (\begin{DoxyParamCaption}\item[{Factory\+Container \&\&}]{factories}{}\end{DoxyParamCaption})}



Combines multiple criterion factories into a single combined criterion factory. 

This function treats a singleton container as a special case and avoids creating an additional object and just returns the input factory.


\begin{DoxyTemplParams}{Template Parameters}
{\em Factory\+Container} & a random access container type\\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em factories} & a list of factories to combined\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a combined criterion factory if the input contains multiple factories or the input factory if the input contains only one factory 
\end{DoxyReturn}
