Chi-Tech
lbs_iterativemethods.h
Go to the documentation of this file.
1#ifndef LBS_ITERATIVE_METHODS_H
2#define LBS_ITERATIVE_METHODS_H
3
4#include <string>
5
6namespace lbs
7{
8 enum class IterativeMethod : int
9 {
10 NONE = 0,
11 CLASSICRICHARDSON = 1, ///< Otherwise known as Source Iteration
12 CLASSICRICHARDSON_CYCLES = 2, ///< Source Iteration with Cycles support
13 GMRES = 3, ///< GMRES iterative algorithm
14 GMRES_CYCLES = 4, ///< GMRES with Cycles support
15 KRYLOV_RICHARDSON = 5, ///< Richardson iteration
16 KRYLOV_RICHARDSON_CYCLES = 6, ///< Richardson iteration with cycles support
17 KRYLOV_GMRES = 7, ///< GMRES iterative algorithm
18 KRYLOV_GMRES_CYCLES = 8, ///< GMRES with Cycles support
19 KRYLOV_BICGSTAB = 9, ///< BiCGStab iterative algorithm
20 KRYLOV_BICGSTAB_CYCLES = 10,///< BiCGStab with Cycles support
21 };
22
23 inline std::string IterativeMethodPETScName(IterativeMethod it_method)
24 {
25 switch (it_method)
26 {
27 case IterativeMethod::NONE: return "preonly";
31 case IterativeMethod::KRYLOV_RICHARDSON_CYCLES: return "richardson";
35 case IterativeMethod::KRYLOV_GMRES_CYCLES: return "gmres";
38 }
39 return "";
40 }
41}
42
43#endif
@ GMRES_CYCLES
GMRES with Cycles support.
@ KRYLOV_RICHARDSON_CYCLES
Richardson iteration with cycles support.
@ CLASSICRICHARDSON
Otherwise known as Source Iteration.
@ CLASSICRICHARDSON_CYCLES
Source Iteration with Cycles support.
@ KRYLOV_BICGSTAB
BiCGStab iterative algorithm.
@ KRYLOV_RICHARDSON
Richardson iteration.
@ GMRES
GMRES iterative algorithm.
@ KRYLOV_GMRES_CYCLES
GMRES with Cycles support.
@ KRYLOV_GMRES
GMRES iterative algorithm.
@ KRYLOV_BICGSTAB_CYCLES
BiCGStab with Cycles support.
std::string IterativeMethodPETScName(IterativeMethod it_method)