| solver_option(4rheolef) | solver_option(4rheolef) |
NAME¶
solver_option - direct and iterative solver options (rheolef-7.2)
DESCRIPTION¶
This class implements a set of options for customizing a solver(4). An instance of this class can be supplied to the solver(4) constructor.
MAIN OPTION¶
iterative
OPTION FOR DIRECT SOLVERS¶
preferred_library
OPTION FOR ITERATIVE SOLVERS¶
tol
With the absolute criterion, the algorithm stops when norm(A*x-b) < tol, otherwise it stops when norm(A*x-b) < tol*norm(b). Default is to use an absolute stopping criterion. residue On return, gives the obtained residue, optionally divided by the initial one when using a relative stopping. It is less or equal to tol when the iterative algorithm stops with succes. n_iter On return, gives the number of iterations performed. It is always less or equal to max_iter when the iterative algorithm stops with succes. p_err A pointer to the diststream(2) where residues are printed during iterations. When this pointer is zero, no errors are printed. Default is to print to derr standard diststream(2) error. label When printing errors, each line is prefixed by [label]. When the label is empty, each iterative algorithm uses its default label, e.g. "cg" for the cg(5) conjugate gradient. By default the label is empty and this option is used to customize the convergence trace. krylov_dimension The dimension of the Krylov space used by the gmres(5) algorithm. Default is krylov_dimension=6.
OPTIONS FOR DEVELOPERS¶
verbose_level
IMPLEMENTATION¶
This documentation has been generated from file linalg/lib/solver_option.h
class solver_option {
public:
typedef std::size_t size_type;
static const long int decide = -1;
mutable long int iterative;
Float tol;
size_type max_iter;
bool absolute_stopping;
mutable Float residue;
mutable size_type n_iter;
odiststream* p_err;
mutable std::string label;
size_type krylov_dimension;
size_type n_refinement;
bool compute_determinant;
std::string preferred_library;
size_type verbose_level;
bool do_check;
bool force_seq;
size_type level_of_fill;
size_type amalgamation;
size_type ooc;
// allocator and default values:
solver_option()
: iterative (decide),
#if defined(_RHEOLEF_HAVE_FLOAT128)
tol (1e6*std::numeric_limits<Float>::epsilon()),
#else
tol (1e3*std::numeric_limits<Float>::epsilon()),
#endif
max_iter (100000),
absolute_stopping (true),
residue (0),
n_iter (0),
p_err (&derr),
label (),
krylov_dimension (6),
n_refinement (2),
compute_determinant(false),
preferred_library(),
verbose_level (0),
do_check (false),
force_seq (false),
level_of_fill (1),
amalgamation (10),
ooc (20000)
{
}
solver_option (const solver_option&);
solver_option& operator= (const solver_option&);
template <class T, class M>
static std::string default_preferred_library (const csr<T,M>& a);
template <class T, class M>
static std::string used_library (const csr<T,M>& a, const solver_option& sopt = solver_option());
};
AUTHOR¶
Pierre Saramito <Pierre.Saramito@imag.fr>
COPYRIGHT¶
Copyright (C) 2000-2018 Pierre Saramito <Pierre.Saramito@imag.fr> GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
| Version 7.2 | rheolef |