Discontinuous Galerkin Library
#include "dg/algorithm.h"
dg::TriDiagonal< Container > Struct Template Reference

Fast (shared memory) tridiagonal sparse matrix. More...

Public Types

using value_type = dg::get_value_type< Container >
 

Public Member Functions

 TriDiagonal ()=default
 
 TriDiagonal (unsigned size)
 
 TriDiagonal (Container M, Container O, Container P)
 
template<class Container2 >
 TriDiagonal (const TriDiagonal< Container2 > &other)
 
unsigned size () const
 
void operator() (const Container &x, Container &y) const
 
dg::IHMatrix_t< value_typeasIMatrix () const
 convert to a sparse matrix format More...
 

Public Attributes

Container M
 
Container O
 
Container P
 

Detailed Description

template<class Container>
struct dg::TriDiagonal< Container >

Fast (shared memory) tridiagonal sparse matrix.

Consists of the three diagonal vectors [M, O, P] (for "Minus", "ZerO", "Plus), i.e. M is the subdiagonal, O the diagonal and P the superdiagonal vector.

Note
It is fast to apply using dg::blas2::parallel_for (which only works on shared memory vectors though)
Template Parameters
ContainerOne of the shared memory containers

Member Typedef Documentation

◆ value_type

template<class Container >
using dg::TriDiagonal< Container >::value_type = dg::get_value_type<Container>

Constructor & Destructor Documentation

◆ TriDiagonal() [1/4]

template<class Container >
dg::TriDiagonal< Container >::TriDiagonal ( )
default

◆ TriDiagonal() [2/4]

template<class Container >
dg::TriDiagonal< Container >::TriDiagonal ( unsigned  size)
inline

◆ TriDiagonal() [3/4]

template<class Container >
dg::TriDiagonal< Container >::TriDiagonal ( Container  M,
Container  O,
Container  P 
)
inline

◆ TriDiagonal() [4/4]

template<class Container >
template<class Container2 >
dg::TriDiagonal< Container >::TriDiagonal ( const TriDiagonal< Container2 > &  other)
inline

Member Function Documentation

◆ asIMatrix()

template<class Container >
dg::IHMatrix_t< value_type > dg::TriDiagonal< Container >::asIMatrix ( ) const
inline

convert to a sparse matrix format

◆ operator()()

template<class Container >
void dg::TriDiagonal< Container >::operator() ( const Container &  x,
Container &  y 
) const
inline

◆ size()

template<class Container >
unsigned dg::TriDiagonal< Container >::size ( ) const
inline

Member Data Documentation

◆ M

template<class Container >
Container dg::TriDiagonal< Container >::M

◆ O

template<class Container >
Container dg::TriDiagonal< Container >::O

◆ P

template<class Container >
Container dg::TriDiagonal< Container >::P

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