ROL
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ROL::BlockDiagonalOperator< Real > Class Template Reference

Provides the interface to apply a block diagonal operator to a partitioned vector. More...

#include <ROL_BlockDiagonalOperator.hpp>

+ Inheritance diagram for ROL::BlockDiagonalOperator< Real >:

Public Member Functions

 BlockDiagonalOperator (const std::vector< Ptr< LinearOperator< Real > > > &diag)
 
const Ptr< LinearOperator< Real > > get (unsigned i) const
 
void apply (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const override
 Apply linear operator.
 
void applyInverse (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const override
 Apply inverse of linear operator.
 
void applyAdjoint (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const override
 Apply adjoint of linear operator.
 
void applyAdjointInverse (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const override
 Apply adjoint of the inverse linear operator.
 
- Public Member Functions inherited from ROL::LinearOperator< Real >
virtual ~LinearOperator ()
 
virtual void update (const Vector< Real > &x, bool flag=true, int iter=-1)
 Update linear operator.
 

Private Attributes

const std::vector< Ptr< LinearOperator< Real > > > diag_
 
const unsigned numOp_
 

Detailed Description

template<class Real>
class ROL::BlockDiagonalOperator< Real >

Provides the interface to apply a block diagonal operator to a partitioned vector.


Definition at line 28 of file ROL_BlockDiagonalOperator.hpp.

Constructor & Destructor Documentation

◆ BlockDiagonalOperator()

template<class Real >
ROL::BlockDiagonalOperator< Real >::BlockDiagonalOperator ( const std::vector< Ptr< LinearOperator< Real > > > &  diag)

Definition at line 18 of file ROL_BlockDiagonalOperator_Def.hpp.

Member Function Documentation

◆ get()

template<class Real >
const Ptr< LinearOperator< Real > > ROL::BlockDiagonalOperator< Real >::get ( unsigned  i) const

Definition at line 22 of file ROL_BlockDiagonalOperator_Def.hpp.

◆ apply()

template<class Real >
void ROL::BlockDiagonalOperator< Real >::apply ( Vector< Real > &  Hv,
const Vector< Real > &  v,
Real &  tol 
) const
overridevirtual

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.

Implements ROL::LinearOperator< Real >.

Definition at line 30 of file ROL_BlockDiagonalOperator_Def.hpp.

References ROL::apply(), ROL::PartitionedVector< Real >::get(), and ROL::PartitionedVector< Real >::numVectors().

◆ applyInverse()

template<class Real >
void ROL::BlockDiagonalOperator< Real >::applyInverse ( Vector< Real > &  Hv,
const Vector< Real > &  v,
Real &  tol 
) const
overridevirtual

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 from ROL::LinearOperator< Real >.

Definition at line 51 of file ROL_BlockDiagonalOperator_Def.hpp.

References ROL::applyInverse(), ROL::PartitionedVector< Real >::get(), and ROL::PartitionedVector< Real >::numVectors().

◆ applyAdjoint()

template<class Real >
void ROL::BlockDiagonalOperator< Real >::applyAdjoint ( Vector< Real > &  Hv,
const Vector< Real > &  v,
Real &  tol 
) const
overridevirtual

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.

Reimplemented from ROL::LinearOperator< Real >.

Definition at line 72 of file ROL_BlockDiagonalOperator_Def.hpp.

References ROL::PartitionedVector< Real >::get(), and ROL::PartitionedVector< Real >::numVectors().

◆ applyAdjointInverse()

template<class Real >
void ROL::BlockDiagonalOperator< Real >::applyAdjointInverse ( Vector< Real > &  Hv,
const Vector< Real > &  v,
Real &  tol 
) const
overridevirtual

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.

Reimplemented from ROL::LinearOperator< Real >.

Definition at line 93 of file ROL_BlockDiagonalOperator_Def.hpp.

References ROL::PartitionedVector< Real >::get(), and ROL::PartitionedVector< Real >::numVectors().

Member Data Documentation

◆ diag_

template<class Real >
const std::vector<Ptr<LinearOperator<Real> > > ROL::BlockDiagonalOperator< Real >::diag_
private

Definition at line 30 of file ROL_BlockDiagonalOperator.hpp.

◆ numOp_

template<class Real >
const unsigned ROL::BlockDiagonalOperator< Real >::numOp_
private

Definition at line 31 of file ROL_BlockDiagonalOperator.hpp.


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