Compose
Table of Contents
- 1. General overview
- 2. The MaPHyS++ library
- 3. Coding tools
- 4. Matrix interface
- 5. Datatypes
- 6. Distributed framework
- 7. Solvers
- 8. Preconditioners
- 9. I/O
- 10. Linear algebra tools
- 11. Kernels
- 12. Graph and partitioning
- 13. Unit test matrices
- 14. Benchmark results
1. General overview
See the pdf version. See other branches version.
MaPHyS++
is a linear algebra package developed in C++. Its main purpose is the
solution of sparse linear system \[\K u = f\] where \(\K\) is a square real or
complex non singular general matrix, \(f\) is a given right-hand side vector, and
\(u\) is the solution vector to be computed.
MaPHyS++
provides a set of direct and iterative linear solvers that can be
combined to solve directly \(\K u = f\) or use an hybrid approach. It follows a
non-overlapping algebraic domain decomposition method that first reorders the
linear system into a \(2 \times 2\) block system
where \(\KII\) and \(\KGG\) respectively represent interior subdomains and separators, and \(\KIG\) and \(\KGI\) are the coupling between interior and separators. By eliminating the unknowns associated with the interior subdomains \(\KII\) we get
\begin{equation} \left( \begin{array}{cc} \KII & \KIG \\ 0 & \S \\ \end{array} \right) \left( \begin{array}{c} \uI \\ \uG \\ \end{array} \right) = \left( \begin{array}{c} \fI \\ \ftG \\ \end{array} \right), \end{equation}with
\begin{equation} \S=\KGG-\KGI \KII\inv \KIG \; \textrm{ and} \; \ftG = f_\Gamma -\KGI \KII\inv \fI. \end{equation}The matrix \(\S\) is referred to as the Schur complement matrix. Because most of the fill-in appears in the Schur complement, the Schur complement system is solved using a preconditioned Krylov subspace method while the interior subdomain systems are solved using a sparse direct solver. Although, the Schur complement system is significantly better conditioned than the original matrix \(\K\), it is important to consider further preconditioning when employing a Krylov method.
See tutorial for more information on how to use the library.
2. The MaPHyS++ library
2.1. Introduction
MaPHyS++
provides its own basic linear algebra datatypes for matrices, vector,
… It is also possible to use external datatypes with MaPHyS++
tools.
2.2. Namespace
The C++ namespace used by MaPHys++
is maphys
.
using namespace maphys;
2.3. Scalar types
In the rest of the documentation, we refer to Scalar
for the following C++ types:
float
: single precision (32 bits) real;double
: double precision (64 bits) real;std::complex<float>
: single precision (64 bits) complex;std::complex<double>
: double precision (128 bits) complex.
Those are the types supported by MaPHyS++
datatypes, in other words the types
of data that can be stored in a vector or a matrix.
We may also refer to Real
as the real type associated to the Scalar
type. It
is for example the type you should use for a norm or a tolerance criterion for
an iterative method. For real types (float
and double
), Scalar
and Real
are the same, but not for complex types. For instance, the Real
type
associated to std::complex<float>
is float
.
In MaPHyS++
, one can access the Real
type associated to a Scalar
as follows:
using Real = typename maphys::arithmetic_real<Scalar>::type;
See Arithmetic for more details.