Reference documentation for deal.II version Git bfcd8cd 2016-05-01 14:26:08 -0400
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 ()
 
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< VectorType * > data
 
unsigned int offset
 

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 56 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 ( )

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

Returns 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
private

Pool were vectors are obtained from.

Definition at line 97 of file solver_gmres.h.

template<typename VectorType>
std::vector<VectorType *> internal::SolverGMRES::TmpVectors< VectorType >::data
private

Field for storing the vectors.

Definition at line 102 of file solver_gmres.h.

template<typename VectorType>
unsigned int internal::SolverGMRES::TmpVectors< VectorType >::offset
private

Offset of the first vector. This is for later when vector rotation will be implemented.

Definition at line 108 of file solver_gmres.h.


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