[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
dealiiSolverVectorWrappingROL< Real > Class Template Reference

Wrap the ROL vector into a vector that can be used by deal.II's solver. More...

#include <dealii_solver_rol_vector.hpp>

Collaboration diagram for dealiiSolverVectorWrappingROL< Real >:

Public Types

using value_type = Real
 Value type of the entries.
 

Public Member Functions

 dealiiSolverVectorWrappingROL ()=default
 Constructor. More...
 
 dealiiSolverVectorWrappingROL (ROL::Ptr< ROL::Vector< Real >> input_vector)
 Constructor where data is given.
 
ROL::Ptr< ROL::Vector< Real > > getVector ()
 Accessor.
 
ROL::Ptr< const ROL::Vector< Real > > getVector () const
 Const accessor.
 
void reinit (const dealiiSolverVectorWrappingROL &model_vector, const bool leave_elements_uninitialized=false)
 
Real operator* (const dealiiSolverVectorWrappingROL &v) const
 Inner product between the current object and the argument.
 
dealiiSolverVectorWrappingROLoperator= (const Real a)
 Assignment of a scalar.
 
dealiiSolverVectorWrappingROLoperator= (const dealiiSolverVectorWrappingROL &x)
 Copy assignment.
 
dealiiSolverVectorWrappingROLoperator*= (const Real a)
 Scale the elements of the current object by a fixed value.
 
void add (const dealiiSolverVectorWrappingROL &x)
 Addition of vectors.
 
void add (const Real a, const dealiiSolverVectorWrappingROL &x)
 Scaled addition of vectors.
 
void sadd (const Real a, const Real b, const dealiiSolverVectorWrappingROL &x)
 Scaled addition of vectors.
 
void equ (const Real a, const dealiiSolverVectorWrappingROL &x)
 Scaled assignment of a vector.
 
Real add_and_dot (const Real a, const dealiiSolverVectorWrappingROL &x, const dealiiSolverVectorWrappingROL &v)
 
Real l2_norm () const
 Return the l2 norm of the vector.
 
Teuchos::RCP< dealiiSolverVectorWrappingROLbasis (int i) const
 Returns a vector of the same size with zero entries except for the ith entry being one.
 
int size () const
 Obtain vector size.
 
void print () const
 Print the underlying deal.II Vector.
 
Real operator[] (int i) const
 Access this ith value of the vector. More...
 

Private Member Functions

void print (const ROL::Vector< Real > &rol_vector) const
 Prints out the vector to std::cout.
 

Private Attributes

ROL::Ptr< ROL::Vector< Real > > rol_vector_ptr
 Pointer to ROL::Vector<Real> where data is actually stored.
 

Detailed Description

template<typename Real = double>
class dealiiSolverVectorWrappingROL< Real >

Wrap the ROL vector into a vector that can be used by deal.II's solver.

Ironically, the ROL vector is a wrapper around the deal.II vector such that we can use deal.II's finite element class.

Definition at line 15 of file dealii_solver_rol_vector.hpp.

Constructor & Destructor Documentation

◆ dealiiSolverVectorWrappingROL()

template<typename Real = double>
dealiiSolverVectorWrappingROL< Real >::dealiiSolverVectorWrappingROL ( )
default

Constructor.

Must call reinit on the vector to have something valid.

Member Function Documentation

◆ add_and_dot()

template<typename Real = double>
Real dealiiSolverVectorWrappingROL< Real >::add_and_dot ( const Real  a,
const dealiiSolverVectorWrappingROL< Real > &  x,
const dealiiSolverVectorWrappingROL< Real > &  v 
)
inline

Combined scaled addition of vector x into the current object and subsequent inner product of the current object with v.

Definition at line 131 of file dealii_solver_rol_vector.hpp.

◆ operator[]()

template<typename Real = double>
Real dealiiSolverVectorWrappingROL< Real >::operator[] ( int  i) const
inline

Access this ith value of the vector.

Can not modify the value.

Definition at line 181 of file dealii_solver_rol_vector.hpp.

◆ reinit()

template<typename Real = double>
void dealiiSolverVectorWrappingROL< Real >::reinit ( const dealiiSolverVectorWrappingROL< Real > &  model_vector,
const bool  leave_elements_uninitialized = false 
)
inline

Resize the current object to have the same size and layout as the model_vector argument provided. The second argument indicates whether to clear the current object after resizing.

Definition at line 64 of file dealii_solver_rol_vector.hpp.


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