ROL
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ROL::RieszPrimalVector< Real > Class Template Reference

#include <ROL_RieszVector.hpp>

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

Public Member Functions

 RieszPrimalVector (const RCP< V > &v, const RCP< OP > &op, Real tol=std::sqrt(ROL_EPSILON< Real >()))
 
virtual ~RieszPrimalVector ()
 
virtual Real dot (const V &x) const
 Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\). More...
 
virtual RCP< Vclone () const
 Clone to make a new (uninitialized) vector. More...
 
virtual const Vdual () const
 Return dual representation of \(\mathtt{*this}\), for example, the result of applying a Riesz map, or change of basis, or change of memory layout. More...
 
void applyUnary (const Elementwise::UnaryFunction< Real > &f)
 
void applyBinary (const Elementwise::BinaryFunction< Real > &f, const V &x)
 
Real reduce (const Elementwise::ReductionOp< Real > &r) const
 
RCP< VgetVector (void)
 
RCP< const VgetVector (void) const
 
- Public Member Functions inherited from ROL::ElementwiseVector< Real >
virtual ~ElementwiseVector ()
 
void plus (const Vector< Real > &x)
 Compute \(y \leftarrow y + x\), where \(y = \mathtt{*this}\). More...
 
void scale (const Real alpha)
 Compute \(y \leftarrow \alpha y\) where \(y = \mathtt{*this}\). More...
 
virtual Real norm () const
 Returns \( \| y \| \) where \(y = \mathtt{*this}\). More...
 
void axpy (const Real alpha, const Vector< Real > &x)
 Compute \(y \leftarrow \alpha x + y\) where \(y = \mathtt{*this}\). More...
 
void zero ()
 Set to zero vector. More...
 
void set (const Vector< Real > &x)
 Set \(y \leftarrow x\) where \(y = \mathtt{*this}\). More...
 
- Public Member Functions inherited from ROL::Vector< Real >
virtual ~Vector ()
 
virtual Teuchos::RCP< Vectorbasis (const int i) const
 Return i-th basis vector. More...
 
virtual int dimension () const
 Return dimension of the vector space. More...
 
virtual void print (std::ostream &outStream) const
 
virtual std::vector< Real > checkVector (const Vector< Real > &x, const Vector< Real > &y, const bool printToStream=true, std::ostream &outStream=std::cout) const
 Verify vector-space methods. More...
 

Private Types

template<typename T >
using RCP = Teuchos::RCP< T >
 
using V = Vector< Real >
 
using DualVector = RieszDualVector< Real >
 
using OP = LinearOperator< Real >
 

Private Member Functions

void initialize_dual (void) const
 

Private Attributes

const RCP< Vv_
 
RCP< DualVectordual_
 
const RCP< OPop_
 
Real tol_
 
bool isDualInitialized_
 

Detailed Description

template<class Real>
class ROL::RieszPrimalVector< Real >

Definition at line 70 of file ROL_RieszVector.hpp.

Member Typedef Documentation

◆ RCP

template<class Real >
template<typename T >
using ROL::RieszPrimalVector< Real >::RCP = Teuchos::RCP<T>
private

Definition at line 79 of file ROL_RieszVector.hpp.

◆ V

template<class Real >
using ROL::RieszPrimalVector< Real >::V = Vector<Real>
private

Definition at line 81 of file ROL_RieszVector.hpp.

◆ DualVector

template<class Real >
using ROL::RieszPrimalVector< Real >::DualVector = RieszDualVector<Real>
private

Definition at line 82 of file ROL_RieszVector.hpp.

◆ OP

template<class Real >
using ROL::RieszPrimalVector< Real >::OP = LinearOperator<Real>
private

Definition at line 83 of file ROL_RieszVector.hpp.

Constructor & Destructor Documentation

◆ RieszPrimalVector()

template<class Real >
ROL::RieszPrimalVector< Real >::RieszPrimalVector ( const RCP< V > &  v,
const RCP< OP > &  op,
Real  tol = std::sqrt(ROL_EPSILON<Real>()) 
)
inline

Definition at line 103 of file ROL_RieszVector.hpp.

Referenced by ROL::RieszPrimalVector< Real >::clone().

◆ ~RieszPrimalVector()

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

Definition at line 109 of file ROL_RieszVector.hpp.

Member Function Documentation

◆ initialize_dual()

template<class Real >
void ROL::RieszPrimalVector< Real >::initialize_dual ( void  ) const
inlineprivate

◆ dot()

template<class Real >
virtual Real ROL::RieszPrimalVector< Real >::dot ( const V x) const
inlinevirtual

Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\).

Parameters
[in]xis the vector that forms the dot product with \(\mathtt{*this}\).
Returns
The number equal to \(\langle \mathtt{*this}, x \rangle\).

Reimplemented from ROL::ElementwiseVector< Real >.

Definition at line 111 of file ROL_RieszVector.hpp.

References ROL::RieszPrimalVector< Real >::getVector(), and ROL::RieszPrimalVector< Real >::initialize_dual().

◆ clone()

template<class Real >
virtual RCP<V> ROL::RieszPrimalVector< Real >::clone ( ) const
inlinevirtual

Clone to make a new (uninitialized) vector.

Returns
A reference-counted pointer to the cloned vector.

Provides the means of allocating temporary memory in ROL.


Implements ROL::Vector< Real >.

Definition at line 120 of file ROL_RieszVector.hpp.

References ROL::RieszPrimalVector< Real >::op_, ROL::RieszPrimalVector< Real >::RieszPrimalVector(), and ROL::RieszPrimalVector< Real >::tol_.

◆ dual()

template<class Real >
virtual const V& ROL::RieszPrimalVector< Real >::dual ( void  ) const
inlinevirtual

Return dual representation of \(\mathtt{*this}\), for example, the result of applying a Riesz map, or change of basis, or change of memory layout.

Returns
A const reference to dual representation.

By default, returns the current object. Please overload if you need a dual representation.


Reimplemented from ROL::Vector< Real >.

Definition at line 124 of file ROL_RieszVector.hpp.

References ROL::RieszPrimalVector< Real >::dual_, and ROL::RieszPrimalVector< Real >::initialize_dual().

◆ applyUnary()

template<class Real >
void ROL::RieszPrimalVector< Real >::applyUnary ( const Elementwise::UnaryFunction< Real > &  f)
inlinevirtual

Reimplemented from ROL::Vector< Real >.

Definition at line 131 of file ROL_RieszVector.hpp.

◆ applyBinary()

template<class Real >
void ROL::RieszPrimalVector< Real >::applyBinary ( const Elementwise::BinaryFunction< Real > &  f,
const V x 
)
inlinevirtual

◆ reduce()

template<class Real >
Real ROL::RieszPrimalVector< Real >::reduce ( const Elementwise::ReductionOp< Real > &  r) const
inlinevirtual

Reimplemented from ROL::Vector< Real >.

Definition at line 140 of file ROL_RieszVector.hpp.

◆ getVector() [1/2]

template<class Real >
RCP<V> ROL::RieszPrimalVector< Real >::getVector ( void  )
inline

◆ getVector() [2/2]

template<class Real >
RCP<const V> ROL::RieszPrimalVector< Real >::getVector ( void  ) const
inline

Definition at line 149 of file ROL_RieszVector.hpp.

References ROL::RieszPrimalVector< Real >::v_.

Member Data Documentation

◆ v_

template<class Real >
const RCP<V> ROL::RieszPrimalVector< Real >::v_
private

◆ dual_

template<class Real >
RCP<DualVector> ROL::RieszPrimalVector< Real >::dual_
mutableprivate

Definition at line 88 of file ROL_RieszVector.hpp.

Referenced by ROL::RieszPrimalVector< Real >::dual().

◆ op_

template<class Real >
const RCP<OP> ROL::RieszPrimalVector< Real >::op_
private

◆ tol_

template<class Real >
Real ROL::RieszPrimalVector< Real >::tol_
mutableprivate

◆ isDualInitialized_

template<class Real >
bool ROL::RieszPrimalVector< Real >::isDualInitialized_
mutableprivate

Definition at line 92 of file ROL_RieszVector.hpp.


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