deal.II version GIT relicensing-2206-gaa53ff9447 2024-12-02 09:10:00+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
internal::SolverGMRESImplementation::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::SolverGMRESImplementation::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 74 of file solver_gmres.h.

Constructor & Destructor Documentation

◆ TmpVectors()

template<typename VectorType >
internal::SolverGMRESImplementation::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::SolverGMRESImplementation::TmpVectors< VectorType >::~TmpVectors ( )
default

Destructor. Delete all allocated vectors.

Member Function Documentation

◆ operator[]()

template<typename VectorType >
VectorType & internal::SolverGMRESImplementation::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::SolverGMRESImplementation::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::SolverGMRESImplementation::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::SolverGMRESImplementation::TmpVectors< VectorType >::mem
private

Pool where vectors are obtained from.

Definition at line 116 of file solver_gmres.h.

◆ data

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

Field for storing the vectors.

Definition at line 121 of file solver_gmres.h.


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