Ability to solve large sparse linear systems of equations is very important in modern numerical methods. Creating a solver with a user-friendly interface that can work in many specific scenarios is a challenging task . We describe the C++ programming techniques that can help in creating flexible and extensible programming interfaces for linear solvers . The approach is based on  policy-based design  and partial template specialization, and is implemented in the open source AMGCL library. Convenience for the user and efficiency is demonstrated on the example of accelerating a large-scale Stokes problemsolution with a Schur pressure correction preconditioner. The user may select algorithmic components of the solver by adjusting template parameters without any change to the codebase. It is also possible to switch to block values, or use  mixed precision solution, which results in up to 4 times speedup, and reduces the memory footprint of the algorithm by about 50\%.%DIFDELCMD < \end{abstract} %DIFDELCMD < %%% \\%DIF > . We evaluate both monolithic and composite preconditioning strategies for the 3 benchmark problems. The performance of the proposed solution is compared with a multithreaded direct Pardiso solver and a parallel iterative PETSc solver.
The efficient solution of large sparse saddle point systems is very important in computational fluid mechanics. The discontinuous Galerkin finite element methods have become increasingly popular for incompressible flow problems but their application is limited due to high computational cost . We describe the C++ programming techniques that may help to accelerate linear solvers for such problems . The approach is based on the policy-based design pattern and partial template specialization, and is implemented in the open source AMGCL library. The efficiency is demonstrated with the example of accelerating an iterative solver of a discontinuous Galerkin finite element method for the Stokes problem. The implementation allows selecting algorithmic components of the solver by adjusting template parameters without any changes to the codebase. It is possible to switch to block values, or use a mixed precision solution, which results in up to 4 times speedup, and reduces the memory footprint of the algorithm by about %DIFDELCMD < \end{abstract} %DIFDELCMD < %%% 40\\%DIF > . We evaluate both monolithic and composite preconditioning strategies for the 3 benchmark problems. The performance of the proposed solution is compared with a multithreaded direct Pardiso solver and a parallel iterative PETSc solver.
R
Ability to solve large sparse linear systems of equations
The efficient solution of large sparse saddle point systems
R
modern numerical methods. Creating a solver with a user-friendly interface that can work in many specific scenarios is a challenging task
computational fluid mechanics. The discontinuous Galerkin finite element methods have become increasingly popular for incompressible flow problems but their application is limited due to high computational cost
R
can help in creating flexible and extensible programming interfaces for linear solvers
may help to accelerate linear solvers for such problems
A
the
A
pattern
R
Convenience for the user and
The
R
on
with
R
a large-scale Stokes problemsolution with a Schur pressure correction preconditioner. The user may select
an iterative solver of a discontinuous Galerkin finite element method for the Stokes problem. The implementation allows selecting
R
change
changes
D
also
A
a
D
50\%.
A
40