|
Reference documentation for deal.II version 9.2.0
|
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\)
\(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\)
\(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\)
\(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Go to the documentation of this file.
16 #ifndef dealii_solver_selector_h
17 #define dealii_solver_selector_h
90 template <
typename VectorType = Vector<
double>>
120 template <
class Matrix,
class Preconditioner>
125 const Preconditioner &precond)
const;
132 select(
const std::string &name);
196 <<
"Solver " << arg1 <<
" does not exist. Use one of "
250 template <
typename VectorType>
254 , control(&solver_control)
259 template <
typename VectorType>
268 template <
typename VectorType>
269 template <
class Matrix,
class Preconditioner>
274 const Preconditioner &precond)
const
276 if (solver_name ==
"richardson")
279 solver.
solve(
A, x,
b, precond);
281 else if (solver_name ==
"cg")
284 solver.
solve(
A, x,
b, precond);
286 else if (solver_name ==
"minres")
289 solver.
solve(
A, x,
b, precond);
291 else if (solver_name ==
"bicgstab")
294 solver.
solve(
A, x,
b, precond);
296 else if (solver_name ==
"gmres")
299 solver.
solve(
A, x,
b, precond);
301 else if (solver_name ==
"fgmres")
304 solver.
solve(
A, x,
b, precond);
307 Assert(
false, ExcSolverDoesNotExist(solver_name));
312 template <
typename VectorType>
321 template <
typename VectorType>
325 return "richardson|cg|bicgstab|gmres|fgmres|minres";
330 template <
typename VectorType>
340 template <
typename VectorType>
350 template <
typename VectorType>
355 richardson_data = data;
360 template <
typename VectorType>
370 template <
typename VectorType>
380 template <
typename VectorType>
385 bicgstab_data = data;
void set_data(const typename SolverRichardson< VectorType >::AdditionalData &data)
SolverMinRes< VectorType >::AdditionalData minres_data
void solve(const MatrixType &A, VectorType &x, const VectorType &b, const PreconditionerType &preconditioner)
static ::ExceptionBase & ExcSolverDoesNotExist(std::string arg1)
void solve(const MatrixType &A, VectorType &x, const VectorType &b, const PreconditionerType &preconditioner)
void solve(const MatrixType &A, VectorType &x, const VectorType &b, const PreconditionerType &preconditioner)
SolverFGMRES< VectorType >::AdditionalData fgmres_data
SolverGMRES< VectorType >::AdditionalData gmres_data
void select(const std::string &name)
void solve(const MatrixType &A, VectorType &x, const VectorType &b, const PreconditionerType &preconditioner)
SolverBicgstab< VectorType >::AdditionalData bicgstab_data
#define DEAL_II_NAMESPACE_OPEN
SolverCG< VectorType >::AdditionalData cg_data
SolverRichardson< VectorType >::AdditionalData richardson_data
SymmetricTensor< 2, dim, Number > b(const Tensor< 2, dim, Number > &F)
SmartPointer< SolverControl, SolverSelector< VectorType > > control
#define DeclException1(Exception1, type1, outsequence)
void set_control(SolverControl &ctrl)
void solve(const MatrixType &A, VectorType &x, const VectorType &b, const PreconditionerType &preconditioner)
static std::string get_solver_names()
void solve(const MatrixType &A, VectorType &x, const VectorType &b, const PreconditionerType &preconditioner)
virtual ~SolverSelector() override=default
void solve(const Matrix &A, VectorType &x, const VectorType &b, const Preconditioner &precond) const
#define Assert(cond, exc)
#define DEAL_II_NAMESPACE_CLOSE