Loading [MathJax]/extensions/TeX/newcommand.js
 deal.II version GIT relicensing-3067-g24f3489fdc 2025-04-14 21:10:00+00:00
\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}} \newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=} \newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]} \newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
sparse_ilu.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 1999 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15
16#ifndef dealii_sparse_ilu_h
17#define dealii_sparse_ilu_h
18
19
20#include <deal.II/base/config.h>
21
25
27
58template <typename number>
59class SparseILU : public SparseLUDecomposition<number>
60{
61public:
66
73 SparseILU() = default;
74
80
98 template <typename somenumber>
99 void
101 const AdditionalData &parameters = AdditionalData());
102
109 template <typename somenumber>
110 void
112
113
120 template <typename somenumber>
121 void
123
124
129 std::size_t
130 memory_consumption() const override;
131
141 double,
142 << "The strengthening parameter " << arg1
143 << " is not greater or equal than zero!");
148 size_type,
149 << "While computing the ILU decomposition, the algorithm "
150 "found a zero entry on the diagonal of row "
151 << arg1
152 << ". The algorithm can not recover from this because it "
153 "wants to divide by this diagonal entry."
154 "\n\n"
155 "There are several reasons why this could be happening. "
156 "First, the matrix for which you try to compute a "
157 "decomposition might be singular. Second, the order in "
158 "which the algorithm considers might lead it to find "
159 "a zero diagonal entry even though different pivoting "
160 "strategies might not; the current implementation does "
161 "not do any pivoting (i.e., it works on rows/columns "
162 "in their natural order), and so you will trigger "
163 "this error if, for example, you have a zero in the "
164 "(0,0) entry of the matrix, even though this does "
165 "not imply that the matrix is singular."
166 "\n\n"
167 "It is possible that you can avoid the error if "
168 "you re-order degrees of freedom (using "
169 "the functions in namespace DoFRenumbering). You may "
170 "also want to consider \"strengthening the diagonal\", "
171 "using the AdditionalData::strengthen_diagonal parameter "
172 "you can set in the optional constructor argument of "
173 "this class.");
175};
176
178//---------------------------------------------------------------------------
179
180
182
183#endif // dealii_sparse_ilu_h
void Tvmult(Vector< somenumber > &dst, const Vector< somenumber > &src) const
typename SparseLUDecomposition< number >::size_type size_type
Definition sparse_ilu.h:65
void vmult(Vector< somenumber > &dst, const Vector< somenumber > &src) const
std::size_t memory_consumption() const override
typename SparseLUDecomposition< number >::AdditionalData AdditionalData
Definition sparse_ilu.h:79
void initialize(const SparseMatrix< somenumber > &matrix, const AdditionalData &parameters=AdditionalData())
SparseILU()=default
typename SparseMatrix< number >::size_type size_type
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:35
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:36
static ::ExceptionBase & ExcInvalidStrengthening(double arg1)
static ::ExceptionBase & ExcZeroPivot(size_type arg1)
#define DeclException1(Exception1, type1, outsequence)