16 #ifndef dealii_solver_selector_h 17 #define dealii_solver_selector_h 20 #include <deal.II/base/config.h> 22 #include <deal.II/base/smartpointer.h> 24 #include <deal.II/lac/precondition.h> 25 #include <deal.II/lac/solver.h> 26 #include <deal.II/lac/solver_bicgstab.h> 27 #include <deal.II/lac/solver_cg.h> 28 #include <deal.II/lac/solver_control.h> 29 #include <deal.II/lac/solver_gmres.h> 30 #include <deal.II/lac/solver_minres.h> 31 #include <deal.II/lac/solver_richardson.h> 32 #include <deal.II/lac/vector.h> 33 #include <deal.II/lac/vector_memory.h> 35 DEAL_II_NAMESPACE_OPEN
98 template <
typename VectorType = Vector<
double>>
122 template <
class Matrix,
class Preconditioner>
124 solve(
const Matrix & A,
126 const VectorType & b,
127 const Preconditioner &precond)
const;
134 select(
const std::string &name);
198 <<
"Solver " << arg1 <<
" does not exist. Use one of " 252 template <
typename VectorType>
257 template <
typename VectorType>
265 template <
typename VectorType>
266 template <
class Matrix,
class Preconditioner>
270 const VectorType & b,
271 const Preconditioner &precond)
const 276 solver.
solve(A, x, b, precond);
281 solver.
solve(A, x, b, precond);
286 solver.
solve(A, x, b, precond);
291 solver.
solve(A, x, b, precond);
296 solver.
solve(A, x, b, precond);
301 solver.
solve(A, x, b, precond);
308 template <
typename VectorType>
316 template <
typename VectorType>
320 return "richardson|cg|bicgstab|gmres|fgmres|minres";
324 template <
typename VectorType>
333 template <
typename VectorType>
342 template <
typename VectorType>
351 template <
typename VectorType>
360 template <
typename VectorType>
369 template <
typename VectorType>
378 DEAL_II_NAMESPACE_CLOSE
void set_control(SolverControl &ctrl)
void solve(const Matrix &A, VectorType &x, const VectorType &b, const Preconditioner &precond) const
void solve(const MatrixType &A, VectorType &x, const VectorType &b, const PreconditionerType &preconditioner)
SolverCG< VectorType >::AdditionalData cg_data
void solve(const MatrixType &A, VectorType &x, const VectorType &b, const PreconditionerType &preconditioner)
static::ExceptionBase & ExcSolverDoesNotExist(std::string arg1)
SolverBicgstab< VectorType >::AdditionalData bicgstab_data
SmartPointer< SolverControl, SolverSelector< VectorType > > control
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)
static std::string get_solver_names()
SolverGMRES< VectorType >::AdditionalData gmres_data
#define DeclException1(Exception1, type1, outsequence)
#define Assert(cond, exc)
SolverRichardson< VectorType >::AdditionalData richardson_data
void solve(const MatrixType &A, VectorType &x, const VectorType &b, const PreconditionerType &preconditioner)
void set_data(const typename SolverRichardson< VectorType >::AdditionalData &data)
void solve(const MatrixType &A, VectorType &x, const VectorType &b, const PreconditionerType &preconditioner)
~SolverSelector() override
void select(const std::string &name)
SolverFGMRES< VectorType >::AdditionalData fgmres_data
SolverMinRes< VectorType >::AdditionalData minres_data