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

Implements the ROL::Vector interface for an Epetra_MultiVector. More...

#include <ROL_EpetraMultiVector.hpp>

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

Public Member Functions

virtual ~EpetraMultiVector ()
 
 EpetraMultiVector (const Teuchos::RCP< Epetra_MultiVector > &epetra_vec)
 
void plus (const Vector< Real > &x)
 Compute \(y \leftarrow x + y\) where \(y = \mbox{*this}\). More...
 
void scale (const Real alpha)
 Compute \(y \leftarrow \alpha y\) where \(y = \mbox{*this}\). More...
 
Real dot (const Vector< Real > &x) const
 Returns \( \langle y,x \rangle \) where \(y = \mbox{*this}\). More...
 
Real norm () const
 Returns \( \| y \| \) where \(y = \mbox{*this}\). More...
 
Teuchos::RCP< Vector< Real > > clone () const
 Clone to make a new (uninitialized) vector. More...
 
virtual void axpy (const Real alpha, const Vector< Real > &x)
 Compute \(y \leftarrow \alpha x + y\) where \(y = \mbox{*this}\). More...
 
virtual void zero ()
 Set to zero vector. More...
 
virtual void set (const Vector< Real > &x)
 Set \(y \leftarrow x\) where \(y = \mbox{*this}\). More...
 
Teuchos::RCP< const
Epetra_MultiVector > 
getVector () const
 
Teuchos::RCP< Vector< Real > > basis (const int i) const
 Return i-th basis vector. More...
 
int dimension () const
 Return dimension of the vector space. More...
 
- Public Member Functions inherited from ROL::Vector< Real >
virtual ~Vector ()
 
virtual const Vectordual () 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...
 
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 Attributes

Teuchos::RCP< Epetra_MultiVector > epetra_vec_
 

Detailed Description

template<class Real>
class ROL::EpetraMultiVector< Real >

Implements the ROL::Vector interface for an Epetra_MultiVector.

Definition at line 61 of file ROL_EpetraMultiVector.hpp.

Constructor & Destructor Documentation

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

Definition at line 67 of file ROL_EpetraMultiVector.hpp.

template<class Real>
ROL::EpetraMultiVector< Real >::EpetraMultiVector ( const Teuchos::RCP< Epetra_MultiVector > &  epetra_vec)
inline

Member Function Documentation

template<class Real>
void ROL::EpetraMultiVector< Real >::plus ( const Vector< Real > &  x)
inlinevirtual

Compute \(y \leftarrow x + y\) where \(y = \mbox{*this}\).

Implements ROL::Vector< Real >.

Definition at line 73 of file ROL_EpetraMultiVector.hpp.

References ROL::EpetraMultiVector< Real >::epetra_vec_, and ROL::EpetraMultiVector< Real >::getVector().

template<class Real>
void ROL::EpetraMultiVector< Real >::scale ( const Real  alpha)
inlinevirtual

Compute \(y \leftarrow \alpha y\) where \(y = \mbox{*this}\).

Implements ROL::Vector< Real >.

Definition at line 81 of file ROL_EpetraMultiVector.hpp.

References ROL::EpetraMultiVector< Real >::epetra_vec_.

Referenced by main().

template<class Real>
Real ROL::EpetraMultiVector< Real >::dot ( const Vector< Real > &  x) const
inlinevirtual

Returns \( \langle y,x \rangle \) where \(y = \mbox{*this}\).

Implements ROL::Vector< Real >.

Definition at line 87 of file ROL_EpetraMultiVector.hpp.

References ROL::EpetraMultiVector< Real >::epetra_vec_, and ROL::EpetraMultiVector< Real >::getVector().

template<class Real>
Real ROL::EpetraMultiVector< Real >::norm ( ) const
inlinevirtual

Returns \( \| y \| \) where \(y = \mbox{*this}\).

Implements ROL::Vector< Real >.

Definition at line 97 of file ROL_EpetraMultiVector.hpp.

References ROL::EpetraMultiVector< Real >::epetra_vec_.

Referenced by main().

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::EpetraMultiVector< Real >::clone ( ) const
inlinevirtual

Clone to make a new (uninitialized) vector.

Implements ROL::Vector< Real >.

Definition at line 105 of file ROL_EpetraMultiVector.hpp.

References ROL::EpetraMultiVector< Real >::epetra_vec_, and ROL::EpetraMultiVector< Real >::EpetraMultiVector().

Referenced by main().

template<class Real>
virtual void ROL::EpetraMultiVector< Real >::axpy ( const Real  alpha,
const Vector< Real > &  x 
)
inlinevirtual

Compute \(y \leftarrow \alpha x + y\) where \(y = \mbox{*this}\).

Reimplemented from ROL::Vector< Real >.

Definition at line 112 of file ROL_EpetraMultiVector.hpp.

References ROL::EpetraMultiVector< Real >::epetra_vec_, and ROL::EpetraMultiVector< Real >::getVector().

template<class Real>
virtual void ROL::EpetraMultiVector< Real >::zero ( )
inlinevirtual

Set to zero vector.

Reimplemented from ROL::Vector< Real >.

Definition at line 120 of file ROL_EpetraMultiVector.hpp.

References ROL::EpetraMultiVector< Real >::epetra_vec_.

Referenced by main().

template<class Real>
virtual void ROL::EpetraMultiVector< Real >::set ( const Vector< Real > &  x)
inlinevirtual

Set \(y \leftarrow x\) where \(y = \mbox{*this}\).

Reimplemented from ROL::Vector< Real >.

Definition at line 126 of file ROL_EpetraMultiVector.hpp.

References ROL::EpetraMultiVector< Real >::epetra_vec_, and ROL::EpetraMultiVector< Real >::getVector().

template<class Real>
Teuchos::RCP<const Epetra_MultiVector> ROL::EpetraMultiVector< Real >::getVector ( ) const
inline
template<class Real>
Teuchos::RCP<Vector<Real> > ROL::EpetraMultiVector< Real >::basis ( const int  i) const
inlinevirtual

Return i-th basis vector.

Parameters
[in]iis the index of the basis function.
Returns
A reference-counted pointer to the basis vector with index i.

Overloading the basis is only required if the default gradient implementation is used, which computes a finite-difference approximation.


Reimplemented from ROL::Vector< Real >.

Definition at line 136 of file ROL_EpetraMultiVector.hpp.

References ROL::EpetraMultiVector< Real >::dimension(), ROL::EpetraMultiVector< Real >::epetra_vec_, and ROL::EpetraMultiVector< Real >::EpetraMultiVector().

Referenced by main().

template<class Real>
int ROL::EpetraMultiVector< Real >::dimension ( ) const
inlinevirtual

Return dimension of the vector space.

Returns
The dimension of the vector space, i.e., the total number of basis vectors.

Overload if the basis is overloaded.


Reimplemented from ROL::Vector< Real >.

Definition at line 167 of file ROL_EpetraMultiVector.hpp.

References ROL::EpetraMultiVector< Real >::epetra_vec_.

Referenced by ROL::EpetraMultiVector< Real >::basis().

Member Data Documentation

template<class Real>
Teuchos::RCP<Epetra_MultiVector> ROL::EpetraMultiVector< Real >::epetra_vec_
private

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