ASPECT
linear_algebra_types.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2024 by the authors of the ASPECT code.
3 
4  This file is part of ASPECT.
5 
6  ASPECT is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2, or (at your option)
9  any later version.
10 
11  ASPECT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with ASPECT; see the file LICENSE. If not see
18  <http://www.gnu.org/licenses/>.
19 */
20 
21 
22 #ifndef _aspect_linear_algebra_types_h
23 #define _aspect_linear_algebra_types_h
24 
25 #include <aspect/global.h>
26 
27 DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
28 
29 #ifdef ASPECT_USE_TPETRA
30 #include <deal.II/base/memory_space.h>
31 #include <deal.II/lac/trilinos_tpetra_precondition.h>
32 #include <deal.II/lac/trilinos_tpetra_sparsity_pattern.h>
33 #include <deal.II/lac/block_sparsity_pattern.h>
34 #else
35 #include <deal.II/lac/generic_linear_algebra.h>
36 #include <deal.II/lac/trilinos_precondition.h>
37 #endif
38 
39 DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
40 
41 namespace aspect
42 {
47  namespace LinearAlgebra
48  {
49 #ifdef ASPECT_USE_TPETRA
50 
53  using PreconditionBase = ::LinearAlgebra::TpetraWrappers::PreconditionBase<double>;
54 
59  using PreconditionAMG = ::LinearAlgebra::TpetraWrappers::PreconditionAMGMueLu<double>;
60 
65  using PreconditionILU = ::LinearAlgebra::TpetraWrappers::PreconditionILU<double>;
66 
71  using PreconditionJacobi = ::LinearAlgebra::TpetraWrappers::PreconditionJacobi<double>;
72 #else
73 
76  using PreconditionBase = ::TrilinosWrappers::PreconditionBase;
77 
83 
89 
95 #endif
96 
101 
106  }
107 }
108 
109 
110 
111 #endif
::BlockDynamicSparsityPattern BlockDynamicSparsityPattern
::TrilinosWrappers::PreconditionBase PreconditionBase
::TrilinosWrappers::PreconditionAMG PreconditionAMG
::TrilinosWrappers::PreconditionJacobi PreconditionJacobi
::DynamicSparsityPattern DynamicSparsityPattern
::TrilinosWrappers::PreconditionILU PreconditionILU