Fluid structure interaction suite
ilu.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2022 by Luca Heltai
4 //
5 // This file is part of the FSI-suite platform, based on the deal.II library.
6 //
7 // The FSI-suite platform is free software; you can use it, redistribute it,
8 // and/or modify it under the terms of the GNU Lesser General Public License as
9 // published by the Free Software Foundation; either version 3.0 of the License,
10 // or (at your option) any later version. The full text of the license can be
11 // found in the file LICENSE at the top level of the FSI-suite platform
12 // distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 
17 
18 #ifndef ilu_preconditioner_h
19 #define ilu_preconditioner_h
20 
21 #include <deal.II/base/config.h>
22 
23 
24 
25 #ifdef DEAL_II_WITH_TRILINOS
26 
28 
30 
31 namespace ParsedLAC
32 {
39  class ILUPreconditioner : public dealii::ParameterAcceptor,
40  public dealii::TrilinosWrappers::PreconditionILU
41  {
42  public:
46  ILUPreconditioner(const std::string &name = "",
47  const unsigned int &ilu_fill = 0,
48  const double &ilu_atol = 0.0,
49  const double &ilu_rtol = 1.0,
50  const unsigned int &overlap = 0);
51 
55  template <typename Matrix>
56  void
57  initialize_preconditioner(const Matrix &matrix);
58 
59  using dealii::TrilinosWrappers::PreconditionILU::initialize;
60 
61  private:
65  void
67 
78  unsigned int ilu_fill;
79 
94  double ilu_atol;
95 
110  double ilu_rtol;
111 
125  unsigned int overlap;
126  };
127 
128 } // namespace ParsedLAC
129 
130 #endif // DEAL_II_WITH_TRILINOS
131 
132 #endif
A parsed ILU preconditioner which uses parameter files to choose between different options.
Definition: ilu.h:41
ILUPreconditioner(const std::string &name="", const unsigned int &ilu_fill=0, const double &ilu_atol=0.0, const double &ilu_rtol=1.0, const unsigned int &overlap=0)
Constructor.
Definition: ilu.cc:26
void initialize_preconditioner(const Matrix &matrix)
Initialize the preconditioner using matrix.
Definition: ilu.cc:57
unsigned int overlap
Overlap between processors.
Definition: ilu.h:125
unsigned int ilu_fill
This specifies the amount of additional fill-in elements besides the original sparse matrix structure...
Definition: ilu.h:78
double ilu_rtol
Scaling factor for diagonal entries.
Definition: ilu.h:110
void add_parameters()
Declare preconditioner options.
Definition: ilu.cc:42
double ilu_atol
The amount of perturbation to add to diagonal entries.
Definition: ilu.h:94
Definition: amg.h:28