/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/timestepping/default_linear_solver.hh Source File#

DiFfRG: /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/timestepping/default_linear_solver.hh Source File
DiFfRG
Discretization Framework for functional Renormalization Group flows
default_linear_solver.hh
Go to the documentation of this file.
1#pragma once
2
3// DiFfRG
8
19namespace DiFfRG
20{
21 namespace internal
22 {
33 template <typename SparseMatrixType, typename VectorType> struct _default_solver {
35 };
36
37#ifdef DEAL_II_WITH_PETSC
38 // PETScDirect is declared only when deal.II reports PETSc was built with MUMPS -- the whole
39 // class sits inside that guard -- so the choice has to be made by the preprocessor here. An
40 // `if constexpr` would not help: the name must be visible for this to parse at all.
41 template <> struct _default_solver<dealii::PETScWrappers::MPI::SparseMatrix, dealii::PETScWrappers::MPI::Vector> {
42#ifdef DEAL_II_PETSC_WITH_MUMPS
43 using type = PETScDirect<dealii::PETScWrappers::MPI::SparseMatrix, dealii::PETScWrappers::MPI::Vector>;
44#else
45 using type = PETScKrylov<dealii::PETScWrappers::MPI::SparseMatrix, dealii::PETScWrappers::MPI::Vector>;
46#endif
47 };
48#endif
49 } // namespace internal
50
65 template <typename SparseMatrixType, typename VectorType>
67} // namespace DiFfRG
Definition UMFPack.hh:14
All compile-time knowledge about which linear algebra types DiFfRG uses.
Definition complex_math.hh:10
typename internal::_default_solver< SparseMatrixType, VectorType >::type DefaultLinearSolver
The build-configuration-dependent default linear solver.
Definition default_linear_solver.hh:66
Maps a (matrix, vector) pair to the solver that suits it.
Definition default_linear_solver.hh:33
UMFPack< SparseMatrixType, VectorType > type
Definition default_linear_solver.hh:34