ROL
|
Provides the interface to apply a linear operator. More...
#include <ROL_LinearOperator.hpp>
Public Member Functions | |
virtual | ~LinearOperator () |
virtual void | update (const Vector< Real > &x, bool flag=true, int iter=-1) |
Update linear operator. More... | |
virtual void | apply (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const =0 |
Apply linear operator. More... | |
virtual void | applyInverse (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const |
Apply inverse of linear operator. More... | |
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:
The user may also implement:
Definition at line 69 of file ROL_LinearOperator.hpp.
|
inlinevirtual |
Definition at line 72 of file ROL_LinearOperator.hpp.
|
inlinevirtual |
Update linear operator.
This function updates the linear operator at new iterations.
[in] | x | is the new iterate. |
[in] | flag | is true if the iterate has changed. |
[in] | iter | is the outer algorithm iterations count. |
Reimplemented in ROL::InteriorPoint::PrimalDualSymmetrizer< Real >, and ROL::DiagonalOperator< Real >.
Definition at line 81 of file ROL_LinearOperator.hpp.
|
pure virtual |
Apply linear operator.
This function applies the linear operator to a vector.
[out] | Hv | is the output vector. |
[in] | v | is the input vector. |
[in] | tol | is a tolerance for inexact linear operator application. |
Implemented in ROL::InteriorPoint::PrimalDualSymmetrizer< Real >, ROL::PrimalDualActiveSetStep< Real >::PrecondPD, ROL::PrimalDualActiveSetStep< Real >::HessianPD, ROL::Secant< Real >, ROL::BlockOperator2< Real >, ROL::ProjectedNewtonKrylovStep< Real >::PrecondPNK, NullOperator< Real >, ROL::ProjectedNewtonKrylovStep< Real >::HessianPNK, ROL::NewtonKrylovStep< Real >::PrecondNK, DyadicOperator< Real >, TridiagonalToeplitzOperator< Real >, ROL::NewtonKrylovStep< Real >::HessianNK, ROL::DiagonalOperator< Real >, ROL::BlockOperator< Real >, and Identity< Real >.
Referenced by ROL::ConjugateGradients< Real >::run(), ROL::ConjugateResiduals< Real >::run(), and ROL::GMRES< Real >::run().
|
inlinevirtual |
Apply inverse of linear operator.
This function applies the inverse of linear operator to a vector.
[out] | Hv | is the output vector. |
[in] | v | is the input vector. |
[in] | tol | is a tolerance for inexact linear operator application. |
Reimplemented in ROL::InteriorPoint::PrimalDualSymmetrizer< Real >, ROL::PrimalDualActiveSetStep< Real >::PrecondPD, ROL::Secant< Real >, ROL::ProjectedNewtonKrylovStep< Real >::PrecondPNK, TridiagonalToeplitzOperator< Real >, ROL::NewtonKrylovStep< Real >::PrecondNK, and ROL::DiagonalOperator< Real >.
Definition at line 99 of file ROL_LinearOperator.hpp.
References ROL::Vector< Real >::set().
Referenced by ROL::ConjugateGradients< Real >::run(), ROL::ConjugateResiduals< Real >::run(), and ROL::GMRES< Real >::run().