Documentation 6b54b78464
Loading...
Searching...
No Matches
CMatrixVectorProduct< ScalarType > Class Template Referenceabstract

Abstract base class for defining matrix-vector products. More...

#include <CMatrixVectorProduct.hpp>

Inheritance diagram for CMatrixVectorProduct< ScalarType >:
[legend]

Public Member Functions

virtual ~CMatrixVectorProduct ()=0
 
virtual void operator() (const CSysVector< ScalarType > &u, CSysVector< ScalarType > &v) const =0
 

Detailed Description

template<class ScalarType>
class CMatrixVectorProduct< ScalarType >

Abstract base class for defining matrix-vector products.

Author
J. Hicken.

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.

Constructor & Destructor Documentation

◆ ~CMatrixVectorProduct()

template<class ScalarType >
CMatrixVectorProduct< ScalarType >::~CMatrixVectorProduct ( )
pure virtual

Member Function Documentation

◆ operator()()

template<class ScalarType >
virtual void CMatrixVectorProduct< ScalarType >::operator() ( const CSysVector< ScalarType > &  u,
CSysVector< ScalarType > &  v 
) const
pure virtual

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