KrylovSolver.h

Note

The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.

class KrylovSolver

Parent class(es)

This class defines an interface for a Krylov solver. The appropriate solver is chosen on the basis of the matrix/vector type.

KrylovSolver(MPI_Comm comm, std::string method = "default", std::string preconditioner = "default")

Constructor

KrylovSolver(std::string method = "default", std::string preconditioner = "default")

Constructor

KrylovSolver(MPI_Comm comm, std::shared_ptr<const GenericLinearOperator> A, std::string method = "default", std::string preconditioner = "default")

Constructor

KrylovSolver(std::shared_ptr<const GenericLinearOperator> A, std::string method = "default", std::string preconditioner = "default")

Constructor

void set_operator(std::shared_ptr<const GenericLinearOperator> A)

Set operator (matrix)

void set_operators(std::shared_ptr<const GenericLinearOperator> A, std::shared_ptr<const GenericLinearOperator> P)

Set operator (matrix) and preconditioner matrix

std::size_t solve(GenericVector &x, const GenericVector &b)

Solve linear system Ax = b

std::size_t solve(const GenericLinearOperator &A, GenericVector &x, const GenericVector &b)

Solve linear system Ax = b

static Parameters default_parameters()

Default parameter values

void update_parameters(const Parameters &parameters)

Update solver parameters (pass parameters down to wrapped implementation)

std::string parameter_type() const

Return parameter type: “krylov_solver” or “lu_solver”