ROL
ROL::LinearOperator< Real > Class Template Referenceabstract

Provides the interface to apply a linear operator. More...

#include <ROL_LinearOperator.hpp>

Inheritance diagram for ROL::LinearOperator< Real >:

Public Member Functions

virtual ~LinearOperator ()
virtual void update (const Vector< Real > &x, bool flag=true, int iter=-1)
 Update linear operator.
virtual void apply (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const =0
 Apply linear operator.
virtual void applyInverse (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
 Apply inverse of linear operator.
virtual void applyAdjoint (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
 Apply adjoint of linear operator.
virtual void applyAdjointInverse (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
 Apply adjoint of the inverse linear operator.

Detailed Description

template<class Real>
class ROL::LinearOperator< Real >

Provides the interface to apply a linear operator.

ROL's linear operator interface is designed to interface with ROL's Krylov methods. These linear operators often represent projected Hessians or preconditioners.
The basic operator interace, to be implemented by the user, requires:

  • apply – apply operator to a vector.

The user may also implement:

  • update – update the state of the linear operator.
  • applyInverse – apply the inverse operator to a vector.
  • applyAdjoint – apply the adjoint of the operator to a vector.
  • applyAdjointInverse – apply the adjoint of the inverse operator to a vector.

Definition at line 37 of file ROL_LinearOperator.hpp.

Constructor & Destructor Documentation

◆ ~LinearOperator()

template<class Real>
virtual ROL::LinearOperator< Real >::~LinearOperator ( )
inlinevirtual

Definition at line 40 of file ROL_LinearOperator.hpp.

Member Function Documentation

◆ update()

template<class Real>
virtual void ROL::LinearOperator< Real >::update ( const Vector< Real > & x,
bool flag = true,
int iter = -1 )
inlinevirtual

Update linear operator.

This function updates the linear operator at new iterations.

Parameters
[in]xis the new iterate.
[in]flagis true if the iterate has changed.
[in]iteris the outer algorithm iterations count.

Definition at line 49 of file ROL_LinearOperator.hpp.

◆ apply()

template<class Real>
virtual void ROL::LinearOperator< Real >::apply ( Vector< Real > & Hv,
const Vector< Real > & v,
Real & tol ) const
pure virtual

Apply linear operator.

This function applies the linear operator to a vector.

Parameters
[out]Hvis the output vector.
[in]vis the input vector.
[in]tolis a tolerance for inexact linear operator application.

Implemented in Identity< Real >, Identity< Real >, IdentityOperator< Real >, TridiagonalToeplitzOperator< Real >, and TridiagonalToeplitzOperator< Real >.

Referenced by applyAdjoint(), ROL::Lanczos< Real >::iterate(), ROL::BiCGSTAB< Real >::run(), ROL::ConjugateGradients< Real >::run(), ROL::ConjugateResiduals< Real >::run(), ROL::details::MINRES< Real >::run(), and ROL::GMRES< Real >::run().

◆ applyInverse()

template<class Real>
virtual void ROL::LinearOperator< Real >::applyInverse ( Vector< Real > & Hv,
const Vector< Real > & v,
Real & tol ) const
inlinevirtual

Apply inverse of linear operator.

This function applies the inverse of linear operator to a vector.

Parameters
[out]Hvis the output vector.
[in]vis the input vector.
[in]tolis a tolerance for inexact linear operator application.

Reimplemented in TridiagonalToeplitzOperator< Real >, and TridiagonalToeplitzOperator< Real >.

Definition at line 67 of file ROL_LinearOperator.hpp.

References ROL::Vector< Real >::set().

Referenced by applyAdjointInverse(), ROL::BiCGSTAB< Real >::run(), ROL::ConjugateGradients< Real >::run(), ROL::ConjugateResiduals< Real >::run(), and ROL::GMRES< Real >::run().

◆ applyAdjoint()

template<class Real>
virtual void ROL::LinearOperator< Real >::applyAdjoint ( Vector< Real > & Hv,
const Vector< Real > & v,
Real & tol ) const
inlinevirtual

Apply adjoint of linear operator.

This function applies the adjoint of a linear operator to a vector. Default behavior assumes operator is self-adjoint.

Parameters
[out]Hvis the output vector.
[in]vis the input vector.
[in]tolis a tolerance for inexact linear operator application.

Definition at line 80 of file ROL_LinearOperator.hpp.

References apply().

◆ applyAdjointInverse()

template<class Real>
virtual void ROL::LinearOperator< Real >::applyAdjointInverse ( Vector< Real > & Hv,
const Vector< Real > & v,
Real & tol ) const
inlinevirtual

Apply adjoint of the inverse linear operator.

This function applies the adjoint of the inverse linear operator to a vector. Default behavior assumes operator is self-adjoint.

Parameters
[out]Hvis the output vector.
[in]vis the input vector.
[in]tolis a tolerance for inexact linear operator application.

Definition at line 93 of file ROL_LinearOperator.hpp.

References applyInverse().


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