1#ifndef DUNE_FEM_SOLVER_PARAMETERDOC_HH
2#define DUNE_FEM_SOLVER_PARAMETERDOC_HH
12#include <dune/fem/solver/parameter.hh>
20 std::pair< std::string, std::string > solverString(
const bool havePetsc);
26template <
class Scheme>
29 bool havePetsc =
false;
33 auto str = Dune::Fem::detail::solverString(havePetsc);
34 std::string doc = R
"doc(
35A scheme finds a solution `u=ufl.TrialFunction` for a given variational equation.
36The main method is `solve` which takes a discrete functions as `target` argument to
37store the solution. The method always uses a Newton method to solve the problem.
38The linear solver used in each iteration of the Newton method can be chosen
39using the `solver` parameter in the constructor of the scheme. Available solvers are:
43In addition the direct solvers from the `suitesparse` package can be used with the
44`numpy` storage. In this case provide a tuple as `solver` argument with "suitesparse" as
45first argument and the solver to use as second, e.g.,
46'solver=("suitesparse","umfpack")'.
48The detailed behavior of the schemes can be customized by providing a
49`parameters` dictionary to the scheme constructor, e.g.,
50 {"nonlinear.tolerance": 1e-3, # tolerance for newton solver
51 "nonlinear.verbose": False, # toggle iteration output
52 "nonlinear.maxiterations": maxInt, # max number of nonlinear iterations
53 "nonlinear.linesearch": True, # use a simple bisection line search
54 "nonlinear.forcing": "none", # can switch to eisenstatwalker
55 "nonlinear.simplified": False, # use a quasi Newton method with single Jacobian evaluation
57 "linear.tolerance": 1e-5, # tolerance for linear solver
58 "linear.verbose": False, # toggle linear iteration output
59 "linear.maxiterations":1000, # max number of linear iterations
60 "linear.errormeasure": "absolute", # or "relative" or "residualreduction"
62 "linear.preconditioning.method": "jacobi", # (see table below)
63 "linear.preconditioning.hypre.method": "boomeramg", # "pilu-t" "parasails"
64 "linear.preconditioning.iteration": 3, # iterations for preconditioner
65 "linear.preconditioning.relaxation": 1.0, # omega for SOR and ILU
66 "linear.preconditioning.level": 0} # fill-in level for ILU preconditioning
70The functionality of some of the preconditioners listed for petsc will
71depend on the petsc installation.
Dune namespace.
Definition: alignedallocator.hh:13