\doxysection{gko::\+batch::\+solver::\+Bicgstab\texorpdfstring{$<$}{<} Value\+Type \texorpdfstring{$>$}{>} Class Template Reference}
\hypertarget{classgko_1_1batch_1_1solver_1_1Bicgstab}{}\label{classgko_1_1batch_1_1solver_1_1Bicgstab}\index{gko::batch::solver::Bicgstab$<$ ValueType $>$@{gko::batch::solver::Bicgstab$<$ ValueType $>$}}


Bi\+CGSTAB or the Bi-\/\+Conjugate Gradient-\/\+Stabilized is a Krylov subspace solver.  




{\ttfamily \+\#include $<$ginkgo/\+core/\+solver/\+batch\+\_\+bicgstab.\+hpp$>$}



Inheritance diagram for gko::\+batch::\+solver::\+Bicgstab\texorpdfstring{$<$}{<} Value\+Type \texorpdfstring{$>$}{>}:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1batch_1_1solver_1_1Bicgstab__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for gko::\+batch::\+solver::\+Bicgstab\texorpdfstring{$<$}{<} Value\+Type \texorpdfstring{$>$}{>}:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1batch_1_1solver_1_1Bicgstab__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \doxymbox{\hyperlink{structgko_1_1batch_1_1solver_1_1Bicgstab_1_1parameters__type}{parameters\+\_\+type}}
\item 
class \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1Bicgstab_1_1Factory}{Factory}}
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1batch_1_1solver_1_1Bicgstab_a06b9bb7ee3310f6d9cf040f528e4ab35}\label{classgko_1_1batch_1_1solver_1_1Bicgstab_a06b9bb7ee3310f6d9cf040f528e4ab35} 
using {\bfseries value\+\_\+type} = Value\+Type
\item 
\Hypertarget{classgko_1_1batch_1_1solver_1_1Bicgstab_a2bf45860418222549843d2e8e5481eaf}\label{classgko_1_1batch_1_1solver_1_1Bicgstab_a2bf45860418222549843d2e8e5481eaf} 
using {\bfseries real\+\_\+type} = \doxymbox{\hyperlink{namespacegko_a107302a750bfa82a2107c77293f791c9}{gko::\+remove\+\_\+complex}}$<$Value\+Type$>$
\end{DoxyCompactItemize}
\doxysubsection*{Public Types inherited from \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1EnableBatchSolver}{gko::\+batch::\+solver::\+\+Enable\+Batch\+Solver$<$ Bicgstab$<$ default\+\_\+precision $>$, default\+\_\+precision $>$}}}
\begin{DoxyCompactItemize}
\item 
using {\bfseries real\+\_\+type}
\end{DoxyCompactItemize}
\doxysubsection*{Public Types inherited from \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicAssignment}{gko::\+\+Enable\+Polymorphic\+Assignment$<$ Bicgstab$<$ default\+\_\+precision $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
using {\bfseries result\+\_\+type}
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1batch_1_1solver_1_1Bicgstab_a88a36273977fc3f78e774db1e3410b8e}\label{classgko_1_1batch_1_1solver_1_1Bicgstab_a88a36273977fc3f78e774db1e3410b8e} 
const \doxymbox{\hyperlink{structgko_1_1batch_1_1solver_1_1Bicgstab_1_1parameters__type}{parameters\+\_\+type}} \& {\bfseries get\+\_\+parameters} () const
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1EnableBatchSolver}{gko::\+batch::\+solver::\+\+Enable\+Batch\+Solver$<$ Bicgstab$<$ default\+\_\+precision $>$, default\+\_\+precision $>$}}}
\begin{DoxyCompactItemize}
\item 
const \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1Bicgstab}{Bicgstab}}$<$ \doxymbox{\hyperlink{namespacegko_a89637c833af7ae805802226d97cebebf}{default\+\_\+precision}} $>$ \texorpdfstring{$\ast$}{*} {\bfseries apply} (\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ \doxymbox{\hyperlink{namespacegko_a89637c833af7ae805802226d97cebebf}{default\+\_\+precision}} $>$ $>$ b, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{Multi\+Vector}}$<$ \doxymbox{\hyperlink{namespacegko_a89637c833af7ae805802226d97cebebf}{default\+\_\+precision}} $>$ $>$ x) const
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver}{gko::\+batch::\+solver::\+\+Batch\+Solver}}}
\begin{DoxyCompactItemize}
\item 
std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1BatchLinOp}{Batch\+Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a11ba46b13df4ad9e12f2409ac6e572f7}{get\+\_\+system\+\_\+matrix}} () const
\begin{DoxyCompactList}\small\item\em Returns the system operator (matrix) of the linear system. \end{DoxyCompactList}\item 
std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1batch_1_1BatchLinOp}{Batch\+Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_ac7c6859c7a6f08cb95048d56686f7e2d}{get\+\_\+preconditioner}} () const
\begin{DoxyCompactList}\small\item\em Returns the generated preconditioner. \end{DoxyCompactList}\item 
double \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a419415d18e6b01226cddc621b84d5976}{get\+\_\+tolerance}} () const
\begin{DoxyCompactList}\small\item\em Get the residual tolerance used by the solver. \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a57d2436e61f5ced92f8c367a15baf0c7}{reset\+\_\+tolerance}} (double res\+\_\+tol)
\begin{DoxyCompactList}\small\item\em Update the residual tolerance to be used by the solver. \end{DoxyCompactList}\item 
int \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a4d0421d8f569772dc0637932907dcb07}{get\+\_\+max\+\_\+iterations}} () const
\begin{DoxyCompactList}\small\item\em Get the maximum number of iterations set on the solver. \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a3d3bfb23cf2fc3b1aee8e9aad2a4e488}{reset\+\_\+max\+\_\+iterations}} (int max\+\_\+iterations)
\begin{DoxyCompactList}\small\item\em Set the maximum number of iterations for the solver to use, independent of the factory that created it. \end{DoxyCompactList}\item 
::\+gko::\+batch::\+stop::\+tolerance\+\_\+type \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a79f23896ce9872932b3848524eae4ee8}{get\+\_\+tolerance\+\_\+type}} () const
\begin{DoxyCompactList}\small\item\em Get the tolerance type. \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_aae3b41a8e4e43d275f62a98610ec333b}{reset\+\_\+tolerance\+\_\+type}} (::\+gko::\+batch::\+stop::\+tolerance\+\_\+type tol\+\_\+type)
\begin{DoxyCompactList}\small\item\em Set the type of tolerance check to use inside the solver. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicAssignment}{gko::\+\+Enable\+Polymorphic\+Assignment$<$ Bicgstab$<$ default\+\_\+precision $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
void {\bfseries convert\+\_\+to} (result\+\_\+type \texorpdfstring{$\ast$}{*}result) const override
\item 
void {\bfseries move\+\_\+to} (result\+\_\+type \texorpdfstring{$\ast$}{*}result) override
\end{DoxyCompactItemize}
\doxysubsubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1batch_1_1solver_1_1Bicgstab_aad4a426aaf16ebda53a99e0210c4fe6b}\label{classgko_1_1batch_1_1solver_1_1Bicgstab_aad4a426aaf16ebda53a99e0210c4fe6b} 
static auto {\bfseries build} () -\/$>$ decltype(\doxymbox{\hyperlink{classgko_1_1EnableDefaultFactory_a1d077101d9e788e6c65f088612d14cc3}{Factory::\+create}}())
\end{DoxyCompactItemize}
\doxysubsubsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1batch_1_1solver_1_1Bicgstab_ad30f2c9601b6abdfc148dec35157cd91}\label{classgko_1_1batch_1_1solver_1_1Bicgstab_ad30f2c9601b6abdfc148dec35157cd91} 
class {\bfseries Enable\+Batch\+Lin\+Op$<$ Bicgstab $>$}
\item 
\Hypertarget{classgko_1_1batch_1_1solver_1_1Bicgstab_a52915a6718d5220facbf58989fcc7775}\label{classgko_1_1batch_1_1solver_1_1Bicgstab_a52915a6718d5220facbf58989fcc7775} 
class {\bfseries Enable\+Polymorphic\+Object$<$ Bicgstab, Batch\+Lin\+Op $>$}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\subsubsection*{template$<$typename Value\+Type = default\+\_\+precision$>$\newline
class gko::\+batch::\+solver::\+\+Bicgstab$<$ Value\+Type $>$}
Bi\+CGSTAB or the Bi-\/\+Conjugate Gradient-\/\+Stabilized is a Krylov subspace solver. 

Being a generic solver, it is capable of solving general matrices, including non-\/s.\+p.\+d matrices.

This solver solves a batch of linear systems using the \doxylink{classgko_1_1batch_1_1solver_1_1Bicgstab}{Bicgstab} algorithm. Each linear system in the batch can converge independently.

Unless otherwise specified via the {\ttfamily \doxylink{namespacegko_1_1preconditioner}{preconditioner}} factory parameter, this implementation does not use any preconditioner by default. The type of tolerance (absolute or relative) and the maximum number of iterations to be used in the stopping criterion can be set via the factory parameters.

\begin{DoxyNote}{Note}
The tolerance check is against the internal residual computed within the solver process. This implicit (internal) residual, can diverge from the true residual (\texorpdfstring{$\vert$}{|}\texorpdfstring{$\vert$}{|}b -\/ Ax\texorpdfstring{$\vert$}{|}\texorpdfstring{$\vert$}{|}). A posterori checks (by computing the true residual, \texorpdfstring{$\vert$}{|}\texorpdfstring{$\vert$}{|}b -\/ Ax\texorpdfstring{$\vert$}{|}\texorpdfstring{$\vert$}{|}) are recommended to ensure that the solution has converged to the desired tolerance.
\end{DoxyNote}

\begin{DoxyTemplParams}{Template Parameters}
{\em Value\+Type} & precision of matrix elements \\
\hline
\end{DoxyTemplParams}


The documentation for this class was generated from the following file:\+\begin{DoxyCompactItemize}
\item 
ginkgo/\+core/\+solver/\+batch\+\_\+bicgstab.\+hpp\end{DoxyCompactItemize}
