Reference documentation for deal.II version Git 283ce71 2014-12-19 22:22:25 +0100
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Private Attributes | List of all members
internal::SolverGMRES::TmpVectors< VECTOR > Class Template Reference

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

Public Member Functions

 TmpVectors (const unsigned int max_size, VectorMemory< VECTOR > &vmem)
 
 ~TmpVectors ()
 
VECTOR & operator[] (const unsigned int i) const
 
VECTOR & operator() (const unsigned int i, const VECTOR &temp)
 

Private Attributes

VectorMemory< VECTOR > & mem
 
std::vector< VECTOR * > data
 
unsigned int offset
 

Detailed Description

template<class VECTOR>
class internal::SolverGMRES::TmpVectors< VECTOR >

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 55 of file solver_gmres.h.

Constructor & Destructor Documentation

template<class VECTOR>
internal::SolverGMRES::TmpVectors< VECTOR >::TmpVectors ( const unsigned int  max_size,
VectorMemory< VECTOR > &  vmem 
)

Constructor. Prepares an array of VECTOR of length max_size.

template<class VECTOR>
internal::SolverGMRES::TmpVectors< VECTOR >::~TmpVectors ( )

Delete all allocated vectors.

Member Function Documentation

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

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

template<class VECTOR>
VECTOR& internal::SolverGMRES::TmpVectors< VECTOR >::operator() ( const unsigned int  i,
const VECTOR &  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.

Member Data Documentation

template<class VECTOR>
VectorMemory<VECTOR>& internal::SolverGMRES::TmpVectors< VECTOR >::mem
private

Pool were vectors are obtained from.

Definition at line 88 of file solver_gmres.h.

template<class VECTOR>
std::vector<VECTOR *> internal::SolverGMRES::TmpVectors< VECTOR >::data
private

Field for storing the vectors.

Definition at line 93 of file solver_gmres.h.

template<class VECTOR>
unsigned int internal::SolverGMRES::TmpVectors< VECTOR >::offset
private

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

Definition at line 99 of file solver_gmres.h.


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