\doxysection{gko::\+experimental::\+distributed::\+preconditioner::\+Schwarz\texorpdfstring{$<$}{<} Value\+Type, Local\+Index\+Type, Global\+Index\+Type \texorpdfstring{$>$}{>} Class Template Reference}
\hypertarget{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz}{}\label{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz}\index{gko::experimental::distributed::preconditioner::Schwarz$<$ ValueType, LocalIndexType, GlobalIndexType $>$@{gko::experimental::distributed::preconditioner::Schwarz$<$ ValueType, LocalIndexType, GlobalIndexType $>$}}


A \doxylink{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz}{Schwarz} preconditioner is a simple domain decomposition preconditioner that generalizes the Block Jacobi preconditioner, incorporating options for different local subdomain solvers and overlaps between the subdomains.  




{\ttfamily \+\#include $<$ginkgo/\+core/\+distributed/\+preconditioner/\+schwarz.\+hpp$>$}



Inheritance diagram for gko::\+experimental::\+distributed::\+preconditioner::\+Schwarz\texorpdfstring{$<$}{<} Value\+Type, Local\+Index\+Type, Global\+Index\+Type \texorpdfstring{$>$}{>}:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for gko::\+experimental::\+distributed::\+preconditioner::\+Schwarz\texorpdfstring{$<$}{<} Value\+Type, Local\+Index\+Type, Global\+Index\+Type \texorpdfstring{$>$}{>}:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \doxymbox{\hyperlink{structgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_1_1parameters__type}{parameters\+\_\+type}}
\item 
class \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_1_1Factory}{Factory}}
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a75d682ad7e7d20ff7d461dee54231aeb}\label{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a75d682ad7e7d20ff7d461dee54231aeb} 
using {\bfseries value\+\_\+type} = Value\+Type
\item 
\Hypertarget{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_aa709b6c2425cfe5347a2c66484328422}\label{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_aa709b6c2425cfe5347a2c66484328422} 
using {\bfseries index\+\_\+type} = Global\+Index\+Type
\item 
\Hypertarget{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a3e1febf5280d697c5f8abd1d0f0017b8}\label{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a3e1febf5280d697c5f8abd1d0f0017b8} 
using {\bfseries local\+\_\+index\+\_\+type} = Local\+Index\+Type
\item 
\Hypertarget{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a7aaaee1211eaa13b498ee90a2044a039}\label{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a7aaaee1211eaa13b498ee90a2044a039} 
using {\bfseries global\+\_\+index\+\_\+type} = Global\+Index\+Type
\end{DoxyCompactItemize}
\doxysubsection*{Public Types inherited from \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicAssignment}{gko::\+\+Enable\+Polymorphic\+Assignment$<$ Schwarz$<$ default\+\_\+precision, int32, int64 $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
using {\bfseries result\+\_\+type}
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a2aff6a298f11feb309ba1402417e4bb3}{apply\+\_\+uses\+\_\+initial\+\_\+guess}} () const override
\begin{DoxyCompactList}\small\item\em Return whether the local solvers use the data in x as an initial guess. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a01e8af7386d074a612c91566ed0a3796}\label{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a01e8af7386d074a612c91566ed0a3796} 
const \doxymbox{\hyperlink{structgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_1_1parameters__type}{parameters\+\_\+type}} \& {\bfseries get\+\_\+parameters} () const
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1EnableLinOp}{gko::\+\+Enable\+Lin\+Op$<$ Schwarz$<$ default\+\_\+precision, int32, int64 $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
const Schwarz$<$ \doxymbox{\hyperlink{namespacegko_a89637c833af7ae805802226d97cebebf}{default\+\_\+precision}}, \doxymbox{\hyperlink{namespacegko_a16bd14c10900eb804d784908d8aab5ab}{int32}}, \doxymbox{\hyperlink{namespacegko_a913ec044df518649fa5a891f8dffae34}{int64}} $>$ \texorpdfstring{$\ast$}{*} {\bfseries apply} (\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ b, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ x) const
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicAssignment}{gko::\+\+Enable\+Polymorphic\+Assignment$<$ Schwarz$<$ default\+\_\+precision, int32, int64 $>$ $>$}}}
\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_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a1b3b56e42f53a255061d15a9c9be2ac5}\label{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a1b3b56e42f53a255061d15a9c9be2ac5} 
static auto {\bfseries build} () -\/$>$ decltype(\doxymbox{\hyperlink{classgko_1_1EnableDefaultFactory_a1d077101d9e788e6c65f088612d14cc3}{Factory::\+create}}())
\item 
static \doxymbox{\hyperlink{structgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_1_1parameters__type}{parameters\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a5ce5036cabc56d49d2cc912381f5d45d}{parse}} (const \doxymbox{\hyperlink{classgko_1_1config_1_1pnode}{config::\+pnode}} \&config, const \doxymbox{\hyperlink{classgko_1_1config_1_1registry}{config::\+registry}} \&context, const \doxymbox{\hyperlink{classgko_1_1config_1_1type__descriptor}{config::\+type\+\_\+descriptor}} \&td\+\_\+for\+\_\+child=config::\+make\+\_\+type\+\_\+descriptor$<$ Value\+Type, Local\+Index\+Type, Global\+Index\+Type $>$())
\begin{DoxyCompactList}\small\item\em Create the parameters from the property\+\_\+tree. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a1e06375f7340120822d66d35fd3a1b95}\label{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a1e06375f7340120822d66d35fd3a1b95} 
class {\bfseries Enable\+Lin\+Op$<$ Schwarz $>$}
\item 
\Hypertarget{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a67140994490f9e3e0a081f327724e719}\label{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a67140994490f9e3e0a081f327724e719} 
class {\bfseries Enable\+Polymorphic\+Object$<$ Schwarz, Lin\+Op $>$}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\subsubsection*{template$<$typename Value\+Type = default\+\_\+precision, typename Local\+Index\+Type = int32, typename Global\+Index\+Type = int64$>$\newline
class gko::\+experimental::\+distributed::\+preconditioner::\+\+Schwarz$<$ Value\+Type, Local\+Index\+Type, Global\+Index\+Type $>$}
A \doxylink{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz}{Schwarz} preconditioner is a simple domain decomposition preconditioner that generalizes the Block Jacobi preconditioner, incorporating options for different local subdomain solvers and overlaps between the subdomains. 

A L1 smoother variant is also available, which updates the local matrix with the sums of the non-\/local matrix row sums.

See Iterative Methods for Sparse Linear Systems (Y. Saad) for a general treatment and variations of the method.

A Two-\/level variant is also available. To enable two-\/level preconditioning, you need to specify a \doxylink{classgko_1_1LinOpFactory}{Lin\+Op\+Factory} that can generate a \doxylink{classgko_1_1multigrid_1_1MultigridLevel}{multigrid::\+\+Multigrid\+Level} and a solver for the coarse level solution. Currently, only additive coarse correction is supported with an optional weighting between the local and the coarse solutions, for cases when the coarse solutions might tend to overcorrect.
\begin{DoxyItemize}
\item See Smith, Bjorstad, Gropp, Domain Decomposition, 1996, Cambridge University Press.
\end{DoxyItemize}

\begin{DoxyNote}{Note}
Currently overlap is not supported (TODO).
\end{DoxyNote}

\begin{DoxyTemplParams}{Template Parameters}
{\em Value\+Type} & precision of matrix element \\
\hline
{\em Local\+Index\+Type} & local integer type of the matrix \\
\hline
{\em Global\+Index\+Type} & global integer type of the matrix \\
\hline
\end{DoxyTemplParams}


\label{doc-func-members}
\Hypertarget{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a2aff6a298f11feb309ba1402417e4bb3}\index{gko::experimental::distributed::preconditioner::Schwarz$<$ ValueType, LocalIndexType, GlobalIndexType $>$@{gko::experimental::distributed::preconditioner::Schwarz$<$ ValueType, LocalIndexType, GlobalIndexType $>$}!apply\_uses\_initial\_guess@{apply\_uses\_initial\_guess}}
\index{apply\_uses\_initial\_guess@{apply\_uses\_initial\_guess}!gko::experimental::distributed::preconditioner::Schwarz$<$ ValueType, LocalIndexType, GlobalIndexType $>$@{gko::experimental::distributed::preconditioner::Schwarz$<$ ValueType, LocalIndexType, GlobalIndexType $>$}}
\doxysubsubsection{\texorpdfstring{apply\_uses\_initial\_guess()}{apply\_uses\_initial\_guess()}}
{\footnotesize\ttfamily \label{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a2aff6a298f11feb309ba1402417e4bb3} 
template$<$typename Value\+Type = default\+\_\+precision, typename Local\+Index\+Type = int32, typename Global\+Index\+Type = int64$>$ \\
bool \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz}{gko::\+experimental::\+distributed::\+preconditioner::\+\+Schwarz}}$<$ Value\+Type, Local\+Index\+Type, Global\+Index\+Type $>$::\+apply\+\_\+uses\+\_\+initial\+\_\+guess (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}}



Return whether the local solvers use the data in x as an initial guess. 

\begin{DoxyReturn}{Returns}
true when the local solvers use the data in x as an initial guess. otherwise, false.
\end{DoxyReturn}
\begin{DoxyNote}{Note}
TODO:\+ after adding refining step, need to revisit this. 
\end{DoxyNote}
\Hypertarget{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a5ce5036cabc56d49d2cc912381f5d45d}\index{gko::experimental::distributed::preconditioner::Schwarz$<$ ValueType, LocalIndexType, GlobalIndexType $>$@{gko::experimental::distributed::preconditioner::Schwarz$<$ ValueType, LocalIndexType, GlobalIndexType $>$}!parse@{parse}}
\index{parse@{parse}!gko::experimental::distributed::preconditioner::Schwarz$<$ ValueType, LocalIndexType, GlobalIndexType $>$@{gko::experimental::distributed::preconditioner::Schwarz$<$ ValueType, LocalIndexType, GlobalIndexType $>$}}
\doxysubsubsection{\texorpdfstring{parse()}{parse()}}
{\footnotesize\ttfamily \label{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_a5ce5036cabc56d49d2cc912381f5d45d} 
template$<$typename Value\+Type = default\+\_\+precision, typename Local\+Index\+Type = int32, typename Global\+Index\+Type = int64$>$ \\
\doxymbox{\hyperlink{structgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz_1_1parameters__type}{parameters\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1experimental_1_1distributed_1_1preconditioner_1_1Schwarz}{gko::\+experimental::\+distributed::\+preconditioner::\+\+Schwarz}}$<$ Value\+Type, Local\+Index\+Type, Global\+Index\+Type $>$::\+parse (\begin{DoxyParamCaption}\item[{const \doxymbox{\hyperlink{classgko_1_1config_1_1pnode}{config::\+pnode}} \&}]{config}{, }\item[{const \doxymbox{\hyperlink{classgko_1_1config_1_1registry}{config::\+registry}} \&}]{context}{, }\item[{const \doxymbox{\hyperlink{classgko_1_1config_1_1type__descriptor}{config::\+type\+\_\+descriptor}} \&}]{td\+\_\+for\+\_\+child}{ = {\ttfamily config:\+:\+make\+\_\+type\+\_\+descriptor$<$~ValueType,~LocalIndexType,~GlobalIndexType~$>$()}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Create the parameters from the property\+\_\+tree. 

Because this is directly tied to the specific type, the value/\+index type settings within config are ignored and type\+\_\+descriptor is only used for children objects.


\begin{DoxyParams}{Parameters}
{\em config} & the property tree for setting \\
\hline
{\em context} & the registry \\
\hline
{\em td\+\_\+for\+\_\+child} & the type descriptor for children objects. The default uses the value/\+local/\+global index type of this class.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
parameters 
\end{DoxyReturn}


The documentation for this class was generated from the following file:\+\begin{DoxyCompactItemize}
\item 
ginkgo/\+core/\+distributed/\+preconditioner/\+schwarz.\+hpp\end{DoxyCompactItemize}
