Fluid structure interaction suite
jacobi.h
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 //
3 // Copyright (C) 2015 by the deal2lkit authors
4 //
5 // This file is part of the deal2lkit library.
6 //
7 // The deal2lkit library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE at
12 // the top level of the deal2lkit distribution.
13 //
14 //-----------------------------------------------------------
15 
16 #ifndef jacobi_preconditioner_h
17 #define jacobi_preconditioner_h
18 
19 #include <deal.II/base/config.h>
20 
21 #ifdef DEAL_II_WITH_TRILINOS
22 
24 
26 
27 
28 namespace ParsedLAC
29 {
37  : public dealii::ParameterAcceptor,
38  public dealii::TrilinosWrappers::PreconditionJacobi
39  {
40  public:
44  JacobiPreconditioner(const std::string &name = "",
45  const double &omega = 1,
46  const double &min_diagonal = 0,
47  const unsigned int &n_sweeps = 1);
48 
52  template <typename Matrix>
53  void
54  initialize_preconditioner(const Matrix &matrix);
55 
56  using dealii::TrilinosWrappers::PreconditionJacobi::initialize;
57 
58  private:
62  void
64 
69  double omega;
70 
78  double min_diagonal;
79 
84  unsigned int n_sweeps;
85  };
86 
87 } // namespace ParsedLAC
88 
89 #endif // DEAL_II_WITH_TRILINOS
90 
91 #endif
A parsed Jacobi preconditioner which uses parameter files to choose between different options.
Definition: jacobi.h:39
JacobiPreconditioner(const std::string &name="", const double &omega=1, const double &min_diagonal=0, const unsigned int &n_sweeps=1)
Constructor.
Definition: jacobi.cc:24
double min_diagonal
This specifies the minimum value the diagonal elements should have.
Definition: jacobi.h:78
double omega
This specifies the relaxation parameter in the Jacobi preconditioner.
Definition: jacobi.h:69
void initialize_preconditioner(const Matrix &matrix)
Initialize the preconditioner using matrix.
Definition: jacobi.cc:61
unsigned int n_sweeps
Sets how many times the given operation should be applied during the vmult() operation.
Definition: jacobi.h:84
void add_parameters()
Declare preconditioner options.
Definition: jacobi.cc:38
Definition: amg.h:28