Loading...
Searching...
No Matches
dolfin::LinearSolver Class Reference

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

`#include <LinearSolver.h>`

Inheritance diagram for dolfin::LinearSolver:
[legend]
Collaboration diagram for dolfin::LinearSolver:
[legend]

## Public Member Functions

| LinearSolver (std::string method="default", std::string preconditioner="default")
| Create linear solver.
| LinearSolver (MPI_Comm comm, std::string method="default", std::string preconditioner="default")
| Create linear solver.
| ~LinearSolver ()
| Destructor.
void | set_operator (std::shared_ptr< const GenericLinearOperator > A)
| Set the operator (matrix).
void | set_operators (std::shared_ptr< const GenericLinearOperator > A, std::shared_ptr< const GenericLinearOperator > P)
| Set the 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)
| Solve linear system Ax = b.
virtual void | update_parameters (const Parameters &parameters)
std::string | parameter_type () const
| Return parameter type: "krylov_solver" or "lu_solver".
Public Member Functions inherited from dolfin::Variable
| Variable ()
| Create unnamed variable.
| Variable (const std::string name, const std::string label)
| Create variable with given name and label.
| Variable (const Variable &variable)
| Copy constructor.
virtual | ~Variable ()
| Destructor.
const Variable & | operator= (const Variable &variable)
| Assignment operator.
void | rename (const std::string name, const std::string label)
| Rename variable.
std::string | name () const
| Return name.
std::string | label () const
| Return label (description).
std::size_t | id () const
virtual std::string | str (bool verbose) const
| Return informal string representation (pretty-print).

## Static Public Member Functions

static Parameters | default_parameters ()
| Default parameter values.

## Friends

class | LUSolver
class | KrylovSolver
class | LinearVariationalSolver
class | MixedLinearVariationalSolver
class | NewtonSolver

## Additional Inherited Members

Public Attributes inherited from dolfin::Variable
Parameters | parameters
| Parameters.
Static Protected Member Functions inherited from dolfin::GenericLinearSolver
static const GenericMatrix & | require_matrix (const GenericLinearOperator &A)
static std::shared_ptr< const GenericMatrix > | require_matrix (std::shared_ptr< const GenericLinearOperator > A)

## Detailed Description

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

## Member Function Documentation

## parameter_type()

std::string dolfin::LinearSolver::parameter_type | ( |  | ) | const

inline virtual

Return parameter type: "krylov_solver" or "lu_solver".

Reimplemented from dolfin::GenericLinearSolver.

## set_operator()

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

virtual

Set the operator (matrix).

Implements dolfin::GenericLinearSolver.

## set_operators()

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

virtual

Set the operator (matrix) and preconditioner matrix.

Reimplemented from dolfin::GenericLinearSolver.

## solve() [1/2]

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

virtual

Solve linear system Ax = b.

Reimplemented from dolfin::GenericLinearSolver.

## solve() [2/2]

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

virtual

Solve linear system Ax = b.

Implements dolfin::GenericLinearSolver.

## update_parameters()

virtual void dolfin::LinearSolver::update_parameters | ( | const Parameters & | parameters | ) |

inline virtual

Update solver parameters (pass parameters down to wrapped implementation)

Reimplemented from dolfin::GenericLinearSolver.

The documentation for this class was generated from the following files:

- /build/dolfin-lFBzDh/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/la/LinearSolver.h
- /build/dolfin-lFBzDh/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/la/LinearSolver.cpp