diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-01-20 15:25:21 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-01-20 15:26:32 +0100 |
commit | 7f88b344adb92434814c82c839a513fc1ccf3b11 (patch) | |
tree | e15002aaec442bbc8cc876e3a91703ff092f2a69 /mg2d_constants.h | |
parent | 869ed8e18efc9ee602f45267776cd179c80ec3af (diff) |
mg2d: add a designated error code for reaching maxiter
Allows to reliably distinguish it from other error cases. Also specify
that the values of u are defined for this error code.
Diffstat (limited to 'mg2d_constants.h')
-rw-r--r-- | mg2d_constants.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mg2d_constants.h b/mg2d_constants.h index aa3d5cb..a197240 100644 --- a/mg2d_constants.h +++ b/mg2d_constants.h @@ -20,7 +20,14 @@ #define MG2D_CONSTANTS_H enum MG2DError { - MG2D_ERR_DIVERGE = -0xff00, + /** + * The solver has diverged. + */ + MG2D_ERR_DIVERGE = -0xff00, + /* Maximum number of iterations has been executed without the solution + * reaching desired tolerance. + */ + MG2D_ERR_MAXITER_REACHED = -0xff01, }; /** |