Reference documentation for deal.II version 8.5.1
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

◆ TmpVectors()

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.

◆ ~TmpVectors()

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

Delete all allocated vectors.

Member Function Documentation

◆ operator[]()

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.

◆ operator()()

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.

◆ size()

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

◆ mem

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.

◆ data

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.

◆ offset

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: