.\" .de Id .. .de Sp .if n .sp .if t .sp 0.4 .. .TH solver_option 2rheolef "rheolef-7.0" "rheolef-7.0" "rheolef-7.0" .\" label: /*Class:solver .SH NAME \fBsolver_option\fP - options for direct or interative solvers .\" skip: @clindex solver .SH DESCRIPTION This class implements a set of options for direct or iterative solvers, as implemented by the solver(2). An instance of this class can be supplied to the \fBsolver\fP constructor. .SH OPTIONS .\" begin table .\" start item .TP .B iterative Indicate if we want to use an iterative solver or a a direct one. Default is direct for 1D or 2D problems and iterative for 3D ones. Direct solver is \fBmumps\fP when available, otherwise \fBumfpack\fP or builtin solver when none of these solvers are available at Rheolef configure time. .\" skip: @pindex configure .\" skip: @cindex configure Iterative solver is \fBcg\fP for symmetric positive definite systems and \fBgmres\fP otherwise. .\" end table .SH OPTIONS FOR ITERATIVE SOLVERS .\" begin table .\" start item .TP .B tol Tolerance for the stopping criterion. Default is the machine epsilon for the default \fBFloat\fP type. The default \fBFloat\fP type is \fBdouble\fP defined at Rheolef configure time and is \fBdouble\fP by default, when no special configure option is used. .\" start item .TP .B max_iter Maximum number of iteration when using iterative method. .\" start item .TP .B absolute_stopping Absolute or relative stopping criterion. With the absolute criterion, the algorithm stops when \fBnorm(A*x-b) < tol\fP, otherwise it stops when \fBnorm(A*x-b) < tol*norm(b)\fP. Default is to use an absolute stopping criterion. .\" start item .TP .B residue On return, gives the obtained residue, optionally divided by the initial one when using a relatiive stopping. It is less or equal to \fBtol\fP when the iterative algorithm stops with succes. .\" start item .TP .B n_iter On return, gives the number of iterations performed. It is always less or equal to \fBmax_iter\fP when the iterative algorithm stops with succes. .\" start item .TP .B p_err A pointer to the \fBodiststeam\fP standard error where residues are printed during iterations. When this pointer is zero, no errors are printed. Default is to print to \fBderr\fP. .\" start item .TP .B label When printing errors, each line is prefixed by \fB[@var{label\fP]}. When the label is empty, each iterative algorithm uses its default label, e.g. \fB"cg"\fP for the conjugate gradient \fBcg\fP. By default the label is empty and this option is used to superset the algorithm default. .\" start item .TP .B krylov_dimension The dimension of the Krylov space used by the \fBgmres\fP algorithm. Default is \fBkrylov_dimension=6\fP. .\" end table .SH OPTIONS FOR DIRECT SOLVERS .\" begin table .\" start item .TP .B n_refinement Number of iterative refinement, when using direct method (\fBumfpack\fP only support it). This option is only active when using iterative solvers. .\" start item .TP .B compute_determinant Compute also the determinant of the matrix. This option is only active when using direct solvers. Requires \fBmumps\fP or \fBumfpack\fP. .\" start item .TP .B prefered_library When both \fBmumps\fP and \fBumfpack\fP are available, then \fBmumps\fP is the default. This option allows one to force to choose \fBumfpack\fP, by setting the string to \fB"umfpack"\fP. This option is only active when using direct solvers. .\" end table .SH OPTIONS FOR DEVELOPPERS .\" begin table .\" start item .TP .B verbose_level Can be set to 0, 1, 2 or 3. The default is 0. .\" start item .TP .B level_of_fill Built an incomplete factorization with the prescribed level of fill [1:5]. .\" start item .TP .B do_check Performs extra checks for debug. .\" start item .TP .B force_seq In distributed mode, restrict the linear system resolution to diagonal blocs per process. This option is only active when using the \fBmumps\fP direct solver. .\" start item .TP .B ooc Out-of-core limit (Mo/percent depending on compilation options). In development. .\" start item .TP .B amalgamation Level of amalgamation [10:70] for Kass. In development. .\" end table .\" skip start:AUTHOR: .\" skip start:DATE: .\" END .SH IMPLEMENTATION .\" begin_example .Sp .nf 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 prefered_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::epsilon()), #else tol (std::numeric_limits::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), prefered_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&); }; .Sp .fi .\" end_example .\" LENGTH = 1 .SH SEE ALSO solver(2) .SH COPYRIGHT Copyright (C) 2000-2018 Pierre Saramito GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.