| 1 |
// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root |
| 2 |
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception |
| 3 |
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
| 4 |
// vi: set et ts=4 sw=2 sts=2: |
| 5 |
#ifndef DUNE_ISTL_ISTLEXCEPTION_HH |
| 6 |
#define DUNE_ISTL_ISTLEXCEPTION_HH |
| 7 |
|
| 8 |
#include <dune/common/exceptions.hh> |
| 9 |
#include <dune/common/fmatrix.hh> |
| 10 |
|
| 11 |
namespace Dune { |
| 12 |
|
| 13 |
/** |
| 14 |
@addtogroup ISTL |
| 15 |
@{ |
| 16 |
*/ |
| 17 |
|
| 18 |
//! derive error class from the base class in common |
| 19 |
class ISTLError : public Dune::MathError {}; |
| 20 |
|
| 21 |
//! Error specific to BCRSMatrix. |
| 22 |
class BCRSMatrixError |
| 23 |
: public ISTLError |
| 24 |
{}; |
| 25 |
|
| 26 |
/** \brief Thrown when the compression buffer used by the implicit BCRSMatrix construction is exhausted |
| 27 |
* |
| 28 |
* This error occurs if the compression buffer of the BCRSMatrix |
| 29 |
* did not have room for another non-zero entry during implicit |
| 30 |
* mode construction. |
| 31 |
* |
| 32 |
* You can fix this problem by either increasing the average row size |
| 33 |
* or the compressionBufferSize value. |
| 34 |
*/ |
| 35 |
class ImplicitModeCompressionBufferExhausted |
| 36 |
: public BCRSMatrixError |
| 37 |
{}; |
| 38 |
|
| 39 |
//! Thrown when a solver aborts due to some problem. |
| 40 |
/** |
| 41 |
* Problems that may cause the solver to abort include a NaN detected during |
| 42 |
* the convergence check (which may be caused by invalid input data), or |
| 43 |
* breakdown conditions (which can happen e.g. in BiCGSTABSolver or |
| 44 |
* RestartedGMResSolver). |
| 45 |
*/ |
| 46 |
class SolverAbort : public ISTLError {}; |
| 47 |
|
| 48 |
//! Error when performing an operation on a matrix block |
| 49 |
/** |
| 50 |
* For example an error in a block LU decomposition |
| 51 |
*/ |
| 52 |
class MatrixBlockError : public virtual Dune::FMatrixError { |
| 53 |
public: |
| 54 |
int r, c; // row and column index of the entry from which the error resulted |
| 55 |
}; |
| 56 |
|
| 57 |
/** @} end documentation */ |
| 58 |
|
| 59 |
} // end namespace |
| 60 |
|
| 61 |
#endif |