dune-istl 2.10
Loading...
Searching...
No Matches
Dune::BTDMatrix< B, A > Class Template Reference

A block-tridiagonal matrix. More...

#include <dune/istl/btdmatrix.hh>

Inheritance diagram for Dune::BTDMatrix< B, A >:
Inheritance graph

Public Types

using field_type = typename Imp::BlockTraits<B>::field_type
 export the type representing the field
typedef B block_type
 export the type representing the components
typedef A allocator_type
 export the allocator type
typedef A::size_type size_type
 implement row_type with compressed vector

Public Member Functions

 BTDMatrix ()
 Default constructor.
 BTDMatrix (size_type size)
void setSize (size_type size)
 Resize the matrix. Invalidates the content!
BTDMatrixoperator= (const BTDMatrix &other)
 assignment
BTDMatrixoperator= (const field_type &k)
 assignment from scalar
template<class V>
void solve (V &x, const V &rhs) const
 Use the Thomas algorithm to solve the system Ax=b in O(n) time.

Detailed Description

template<class B, class A = std::allocator<B>>
class Dune::BTDMatrix< B, A >

A block-tridiagonal matrix.

Todo
It would be safer and more efficient to have a real implementation of a block-tridiagonal matrix and not just subclassing from BCRSMatrix. But that's quite a lot of work for that little advantage.

Member Typedef Documentation

◆ allocator_type

template<class B, class A = std::allocator<B>>
typedef A Dune::BTDMatrix< B, A >::allocator_type

export the allocator type

◆ block_type

template<class B, class A = std::allocator<B>>
typedef B Dune::BTDMatrix< B, A >::block_type

export the type representing the components

◆ field_type

template<class B, class A = std::allocator<B>>
using Dune::BTDMatrix< B, A >::field_type = typename Imp::BlockTraits<B>::field_type

export the type representing the field

◆ size_type

template<class B, class A = std::allocator<B>>
typedef A::size_type Dune::BTDMatrix< B, A >::size_type

implement row_type with compressed vector

The type for the index access and the size

Constructor & Destructor Documentation

◆ BTDMatrix() [1/2]

template<class B, class A = std::allocator<B>>
Dune::BTDMatrix< B, A >::BTDMatrix ( )
inline

Default constructor.

◆ BTDMatrix() [2/2]

template<class B, class A = std::allocator<B>>
Dune::BTDMatrix< B, A >::BTDMatrix ( size_type size)
inlineexplicit

Member Function Documentation

◆ operator=() [1/2]

template<class B, class A = std::allocator<B>>
BTDMatrix & Dune::BTDMatrix< B, A >::operator= ( const BTDMatrix< B, A > & other)
inline

assignment

◆ operator=() [2/2]

template<class B, class A = std::allocator<B>>
BTDMatrix & Dune::BTDMatrix< B, A >::operator= ( const field_type & k)
inline

assignment from scalar

◆ setSize()

template<class B, class A = std::allocator<B>>
void Dune::BTDMatrix< B, A >::setSize ( size_type size)
inline

Resize the matrix. Invalidates the content!

◆ solve()

template<class B, class A = std::allocator<B>>
template<class V>
void Dune::BTDMatrix< B, A >::solve ( V & x,
const V & rhs ) const
inline

Use the Thomas algorithm to solve the system Ax=b in O(n) time.

Exceptions
ISTLErrorif the matrix is singular

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