ROL
|
#include <example_02.hpp>
Public Member Functions | |
OptDualStdVector (const Teuchos::RCP< std::vector< Element > > &std_vec) | |
void | plus (const ROL::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... | |
Real | dot (const ROL::Vector< Real > &x) const |
Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\). More... | |
Real | norm () const |
Returns \( \| y \| \) where \(y = \mathtt{*this}\). More... | |
Teuchos::RCP< ROL::Vector< Real > > | clone () const |
Clone to make a new (uninitialized) vector. More... | |
Teuchos::RCP< const std::vector< Element > > | getVector () const |
Teuchos::RCP< ROL::Vector< Real > > | basis (const int i) const |
Return i-th basis vector. More... | |
int | dimension () const |
Return dimension of the vector space. More... | |
const ROL::Vector< Real > & | dual () 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... | |
OptDualStdVector (const Teuchos::RCP< std::vector< Element > > &std_vec) | |
void | plus (const ROL::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... | |
Real | dot (const ROL::Vector< Real > &x) const |
Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\). More... | |
Real | norm () const |
Returns \( \| y \| \) where \(y = \mathtt{*this}\). More... | |
Teuchos::RCP< ROL::Vector< Real > > | clone () const |
Clone to make a new (uninitialized) vector. More... | |
Teuchos::RCP< const std::vector< Element > > | getVector () const |
Teuchos::RCP< ROL::Vector< Real > > | basis (const int i) const |
Return i-th basis vector. More... | |
int | dimension () const |
Return dimension of the vector space. More... | |
const ROL::Vector< Real > & | dual () 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... | |
OptDualStdVector (const Teuchos::RCP< std::vector< Element > > &std_vec, Teuchos::RCP< FiniteDifference< Real > >fd) | |
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... | |
Real | dot (const Vector< Real > &x) const |
Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\). More... | |
Real | norm () const |
Returns \( \| y \| \) where \(y = \mathtt{*this}\). More... | |
Teuchos::RCP< Vector< Real > > | clone () const |
Clone to make a new (uninitialized) vector. More... | |
Teuchos::RCP< const std::vector< Element > > | 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... | |
const Vector< Real > & | dual () 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... | |
OptDualStdVector (const Teuchos::RCP< std::vector< Element > > &std_vec, bool useRiesz, Teuchos::RCP< InnerProductMatrix< Real > > ipmat) | |
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... | |
Real | dot (const Vector< Real > &x) const |
Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\). More... | |
Real | norm () const |
Returns \( \| y \| \) where \(y = \mathtt{*this}\). More... | |
Teuchos::RCP< Vector< Real > > | clone () const |
Clone to make a new (uninitialized) vector. More... | |
Teuchos::RCP< const std::vector< Element > > | 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... | |
const Vector< Real > & | dual () 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 | ~Vector () |
virtual void | axpy (const Real alpha, const Vector &x) |
Compute \(y \leftarrow \alpha x + y\) where \(y = \mathtt{*this}\). More... | |
virtual void | zero () |
Set to zero vector. More... | |
virtual void | set (const Vector &x) |
Set \(y \leftarrow x\) where \(y = \mathtt{*this}\). 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< std::vector < Element > > | std_vec_ |
Teuchos::RCP< OptStdVector < Real > > | dual_vec_ |
Teuchos::RCP< FiniteDifference < Real > > | fd_ |
bool | useRiesz_ |
Teuchos::RCP < InnerProductMatrix< Real > > | ipmat_ |
Definition at line 69 of file dual-spaces/rosenbrock-1/example_01.cpp.
|
inline |
Definition at line 153 of file dual-spaces/rosenbrock-1/example_01.cpp.
Referenced by OptDualStdVector< Real, Element >::basis(), and OptDualStdVector< Real, Element >::clone().
|
inline |
Definition at line 156 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
|
inline |
Definition at line 209 of file gross-pitaevskii/example_02.hpp.
|
inline |
Definition at line 202 of file gross-pitaevskii/example_03.hpp.
|
inlinevirtual |
Compute \(y \leftarrow y + x\), where \(y = \mathtt{*this}\).
[in] | x | is the vector to be added to \(\mathtt{*this}\). |
On return \(\mathtt{*this} = \mathtt{*this} + x\).
Implements ROL::Vector< Real >.
Definition at line 155 of file dual-spaces/rosenbrock-1/example_01.cpp.
References OptDualStdVector< Real, Element >::dimension(), OptDualStdVector< Real, Element >::getVector(), and OptDualStdVector< Real, Element >::std_vec_.
|
inlinevirtual |
Compute \(y \leftarrow \alpha y\) where \(y = \mathtt{*this}\).
[in] | alpha | is the scaling of \(\mathtt{*this}\). |
On return \(\mathtt{*this} = \alpha (\mathtt{*this}) \).
Implements ROL::Vector< Real >.
Definition at line 164 of file dual-spaces/rosenbrock-1/example_01.cpp.
References OptDualStdVector< Real, Element >::dimension(), and OptDualStdVector< Real, Element >::std_vec_.
|
inlinevirtual |
Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\).
[in] | x | is the vector that forms the dot product with \(\mathtt{*this}\). |
Implements ROL::Vector< Real >.
Definition at line 171 of file dual-spaces/rosenbrock-1/example_01.cpp.
References OptDualStdVector< Real, Element >::dimension(), OptDualStdVector< Real, Element >::getVector(), and OptDualStdVector< Real, Element >::std_vec_.
Referenced by OptDualStdVector< Real, Element >::norm().
|
inlinevirtual |
Returns \( \| y \| \) where \(y = \mathtt{*this}\).
Implements ROL::Vector< Real >.
Definition at line 182 of file dual-spaces/rosenbrock-1/example_01.cpp.
References OptDualStdVector< Real, Element >::dot().
|
inlinevirtual |
Clone to make a new (uninitialized) vector.
Provides the means of allocating temporary memory in ROL.
Implements ROL::Vector< Real >.
Definition at line 188 of file dual-spaces/rosenbrock-1/example_01.cpp.
References OptDualStdVector< Real, Element >::OptDualStdVector(), and OptDualStdVector< Real, Element >::std_vec_.
|
inline |
Definition at line 192 of file dual-spaces/rosenbrock-1/example_01.cpp.
References OptDualStdVector< Real, Element >::std_vec_.
Referenced by OptDualStdVector< Real, Element >::dot(), and OptDualStdVector< Real, Element >::plus().
|
inlinevirtual |
Return i-th basis vector.
[in] | i | is the index of the basis function. |
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 196 of file dual-spaces/rosenbrock-1/example_01.cpp.
References OptDualStdVector< Real, Element >::OptDualStdVector(), and OptDualStdVector< Real, Element >::std_vec_.
|
inlinevirtual |
Return dimension of the vector space.
Overload if the basis is overloaded.
Reimplemented from ROL::Vector< Real >.
Definition at line 202 of file dual-spaces/rosenbrock-1/example_01.cpp.
References OptDualStdVector< Real, Element >::std_vec_.
Referenced by OptDualStdVector< Real, Element >::dot(), OptDualStdVector< Real, Element >::plus(), and OptDualStdVector< Real, Element >::scale().
|
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.
By default, returns the current object. Please overload if you need a dual representation.
Reimplemented from ROL::Vector< Real >.
Definition at line 204 of file dual-spaces/rosenbrock-1/example_01.cpp.
References OptDualStdVector< Real, Element >::dual_vec_, and OptDualStdVector< Real, Element >::std_vec_.
|
inlinevirtual |
Compute \(y \leftarrow y + x\), where \(y = \mathtt{*this}\).
[in] | x | is the vector to be added to \(\mathtt{*this}\). |
On return \(\mathtt{*this} = \mathtt{*this} + x\).
Implements ROL::Vector< Real >.
Definition at line 158 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References OptDualStdVector< Real, Element >::dimension(), OptDualStdVector< Real, Element >::getVector(), and OptDualStdVector< Real, Element >::std_vec_.
|
inlinevirtual |
Compute \(y \leftarrow \alpha y\) where \(y = \mathtt{*this}\).
[in] | alpha | is the scaling of \(\mathtt{*this}\). |
On return \(\mathtt{*this} = \alpha (\mathtt{*this}) \).
Implements ROL::Vector< Real >.
Definition at line 167 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References OptDualStdVector< Real, Element >::dimension(), and OptDualStdVector< Real, Element >::std_vec_.
|
inlinevirtual |
Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\).
[in] | x | is the vector that forms the dot product with \(\mathtt{*this}\). |
Implements ROL::Vector< Real >.
Definition at line 174 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References OptDualStdVector< Real, Element >::dimension(), OptDualStdVector< Real, Element >::getVector(), and OptDualStdVector< Real, Element >::std_vec_.
|
inlinevirtual |
Returns \( \| y \| \) where \(y = \mathtt{*this}\).
Implements ROL::Vector< Real >.
Definition at line 185 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References OptDualStdVector< Real, Element >::dot().
|
inlinevirtual |
Clone to make a new (uninitialized) vector.
Provides the means of allocating temporary memory in ROL.
Implements ROL::Vector< Real >.
Definition at line 191 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References OptDualStdVector< Real, Element >::OptDualStdVector(), and OptDualStdVector< Real, Element >::std_vec_.
|
inline |
Definition at line 195 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References OptDualStdVector< Real, Element >::std_vec_.
|
inlinevirtual |
Return i-th basis vector.
[in] | i | is the index of the basis function. |
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 199 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References OptDualStdVector< Real, Element >::OptDualStdVector(), and OptDualStdVector< Real, Element >::std_vec_.
|
inlinevirtual |
Return dimension of the vector space.
Overload if the basis is overloaded.
Reimplemented from ROL::Vector< Real >.
Definition at line 205 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References OptDualStdVector< Real, Element >::std_vec_.
|
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.
By default, returns the current object. Please overload if you need a dual representation.
Reimplemented from ROL::Vector< Real >.
Definition at line 207 of file dual-spaces/simple-eq-constr-1/example_01.cpp.
References OptDualStdVector< Real, Element >::dual_vec_, and OptDualStdVector< Real, Element >::std_vec_.
|
inlinevirtual |
Compute \(y \leftarrow y + x\), where \(y = \mathtt{*this}\).
[in] | x | is the vector to be added to \(\mathtt{*this}\). |
On return \(\mathtt{*this} = \mathtt{*this} + x\).
Implements ROL::Vector< Real >.
Definition at line 212 of file gross-pitaevskii/example_02.hpp.
References OptDualStdVector< Real, Element >::getVector().
|
inlinevirtual |
Compute \(y \leftarrow \alpha y\) where \(y = \mathtt{*this}\).
[in] | alpha | is the scaling of \(\mathtt{*this}\). |
On return \(\mathtt{*this} = \alpha (\mathtt{*this}) \).
Implements ROL::Vector< Real >.
Definition at line 221 of file gross-pitaevskii/example_02.hpp.
|
inlinevirtual |
Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\).
[in] | x | is the vector that forms the dot product with \(\mathtt{*this}\). |
Implements ROL::Vector< Real >.
Definition at line 228 of file gross-pitaevskii/example_02.hpp.
References OptDualStdVector< Real, Element >::getVector().
|
inlinevirtual |
Returns \( \| y \| \) where \(y = \mathtt{*this}\).
Implements ROL::Vector< Real >.
Definition at line 242 of file gross-pitaevskii/example_02.hpp.
|
inlinevirtual |
Clone to make a new (uninitialized) vector.
Provides the means of allocating temporary memory in ROL.
Implements ROL::Vector< Real >.
Definition at line 248 of file gross-pitaevskii/example_02.hpp.
|
inline |
Definition at line 252 of file gross-pitaevskii/example_02.hpp.
|
inlinevirtual |
Return i-th basis vector.
[in] | i | is the index of the basis function. |
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 256 of file gross-pitaevskii/example_02.hpp.
|
inlinevirtual |
Return dimension of the vector space.
Overload if the basis is overloaded.
Reimplemented from ROL::Vector< Real >.
Definition at line 262 of file gross-pitaevskii/example_02.hpp.
|
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.
By default, returns the current object. Please overload if you need a dual representation.
Reimplemented from ROL::Vector< Real >.
Definition at line 264 of file gross-pitaevskii/example_02.hpp.
|
inlinevirtual |
Compute \(y \leftarrow y + x\), where \(y = \mathtt{*this}\).
[in] | x | is the vector to be added to \(\mathtt{*this}\). |
On return \(\mathtt{*this} = \mathtt{*this} + x\).
Implements ROL::Vector< Real >.
Definition at line 205 of file gross-pitaevskii/example_03.hpp.
References OptDualStdVector< Real, Element >::getVector().
|
inlinevirtual |
Compute \(y \leftarrow \alpha y\) where \(y = \mathtt{*this}\).
[in] | alpha | is the scaling of \(\mathtt{*this}\). |
On return \(\mathtt{*this} = \alpha (\mathtt{*this}) \).
Implements ROL::Vector< Real >.
Definition at line 214 of file gross-pitaevskii/example_03.hpp.
|
inlinevirtual |
Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\).
[in] | x | is the vector that forms the dot product with \(\mathtt{*this}\). |
Implements ROL::Vector< Real >.
Definition at line 221 of file gross-pitaevskii/example_03.hpp.
References OptDualStdVector< Real, Element >::getVector().
|
inlinevirtual |
Returns \( \| y \| \) where \(y = \mathtt{*this}\).
Implements ROL::Vector< Real >.
Definition at line 239 of file gross-pitaevskii/example_03.hpp.
|
inlinevirtual |
Clone to make a new (uninitialized) vector.
Provides the means of allocating temporary memory in ROL.
Implements ROL::Vector< Real >.
Definition at line 245 of file gross-pitaevskii/example_03.hpp.
|
inline |
Definition at line 249 of file gross-pitaevskii/example_03.hpp.
|
inlinevirtual |
Return i-th basis vector.
[in] | i | is the index of the basis function. |
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 253 of file gross-pitaevskii/example_03.hpp.
|
inlinevirtual |
Return dimension of the vector space.
Overload if the basis is overloaded.
Reimplemented from ROL::Vector< Real >.
Definition at line 259 of file gross-pitaevskii/example_03.hpp.
|
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.
By default, returns the current object. Please overload if you need a dual representation.
Reimplemented from ROL::Vector< Real >.
Definition at line 261 of file gross-pitaevskii/example_03.hpp.
|
private |
Definition at line 148 of file dual-spaces/rosenbrock-1/example_01.cpp.
Referenced by OptDualStdVector< Real, Element >::basis(), OptDualStdVector< Real, Element >::clone(), OptDualStdVector< Real, Element >::dimension(), OptDualStdVector< Real, Element >::dot(), OptDualStdVector< Real, Element >::dual(), OptDualStdVector< Real, Element >::getVector(), OptDualStdVector< Real, Element >::plus(), and OptDualStdVector< Real, Element >::scale().
|
mutableprivate |
Definition at line 149 of file dual-spaces/rosenbrock-1/example_01.cpp.
Referenced by OptDualStdVector< Real, Element >::dual().
|
private |
Definition at line 205 of file gross-pitaevskii/example_02.hpp.
|
private |
Definition at line 197 of file gross-pitaevskii/example_03.hpp.
|
private |
Definition at line 198 of file gross-pitaevskii/example_03.hpp.