GenericLinearSolver.h

Note

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

class GenericLinearSolver

Parent class(es)

This class provides a general solver for linear systems Ax = b.

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

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(const GenericLinearOperator &A, GenericVector &x, const GenericVector &b)

Solve linear system Ax = b

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

Solve linear system Ax = b

std::string parameter_type() const

Return parameter type: “krylov_solver” or “lu_solver”

void update_parameters(const Parameters &parameters)

Update solver parameters (useful for LinearSolver wrapper)

static const GenericMatrix &require_matrix(const GenericLinearOperator &A)

Down-cast GenericLinearOperator to GenericMatrix when an actual matrix is required, not only a linear operator. This is the const reference version of the down-cast.

static std::shared_ptr<const GenericMatrix> require_matrix(std::shared_ptr<const GenericLinearOperator> A)

Down-cast GenericLinearOperator to GenericMatrix when an actual matrix is required, not only a linear operator. This is the const reference version of the down-cast.