Reference documentation for deal.II version Git 1ab60d1 2017-10-16 22:02:15 +0200
Public Member Functions | Private Attributes | List of all members
internal::SolverGMRES::TmpVectors< VectorType > Class Template Reference

#include <deal.II/lac/solver_gmres.h>

Public Member Functions

 TmpVectors (const unsigned int max_size, VectorMemory< VectorType > &vmem)
 ~TmpVectors ()=default
VectorType & operator[] (const unsigned int i) const
VectorType & operator() (const unsigned int i, const VectorType &temp)
unsigned int size () const

Private Attributes

VectorMemory< VectorType > & mem
std::vector< typename VectorMemory< VectorType >::Pointer > data

Detailed Description

template<typename VectorType>
class internal::SolverGMRES::TmpVectors< VectorType >

Class to hold temporary vectors. This class automatically allocates a new vector, once it is needed.

A future version should also be able to shift through vectors automatically, avoiding restart.

Definition at line 58 of file solver_gmres.h.

Constructor & Destructor Documentation

template<typename VectorType>
internal::SolverGMRES::TmpVectors< VectorType >::TmpVectors ( const unsigned int  max_size,
VectorMemory< VectorType > &  vmem 

Constructor. Prepares an array of VectorType of length max_size.

template<typename VectorType>
internal::SolverGMRES::TmpVectors< VectorType >::~TmpVectors ( )

Destructor. Delete all allocated vectors.

Member Function Documentation

template<typename VectorType>
VectorType& internal::SolverGMRES::TmpVectors< VectorType >::operator[] ( const unsigned int  i) const

Get vector number i. If this vector was unused before, an error occurs.

template<typename VectorType>
VectorType& internal::SolverGMRES::TmpVectors< VectorType >::operator() ( const unsigned int  i,
const VectorType &  temp 

Get vector number i. Allocate it if necessary.

If a vector must be allocated, temp is used to reinit it to the proper dimensions.

template<typename VectorType>
unsigned int internal::SolverGMRES::TmpVectors< VectorType >::size ( ) const

Return size of data vector. It is used in the solver to store the Arnoldi vectors.

Member Data Documentation

template<typename VectorType>
VectorMemory<VectorType>& internal::SolverGMRES::TmpVectors< VectorType >::mem

Pool were vectors are obtained from.

Definition at line 99 of file solver_gmres.h.

template<typename VectorType>
std::vector<typename VectorMemory<VectorType>::Pointer> internal::SolverGMRES::TmpVectors< VectorType >::data

Field for storing the vectors.

Definition at line 104 of file solver_gmres.h.

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