![]() |
Documentation 6b54b78464
|
Abstract base class for defining matrix-vector products. More...
#include <CMatrixVectorProduct.hpp>
Public Member Functions | |
| virtual | ~CMatrixVectorProduct ()=0 |
| virtual void | operator() (const CSysVector< ScalarType > &u, CSysVector< ScalarType > &v) const =0 |
Abstract base class for defining matrix-vector products.
The Krylov-subspace solvers require only matrix-vector products and not the actual matrix/Jacobian. We need some way to indicate which function will perform the product. However, sometimes the functions that define the product will require different numbers and types of inputs. For example, the forward-difference approximation to a Jacobian-vector product requires the vector that defines the Jacobian and a perturbation parameter. The CMatrixVectorProduct class is used to derive child classes that can handle the different types of matrix-vector products and still be passed to a single implementation of the Krylov solvers. This abstraction may also be used to define matrix-free products.
|
pure virtual |
|
pure virtual |
Implemented in CSysMatrixVectorProduct< ScalarType >.