|
| | TridiagInvDF () |
| | Allocate nothing, Call construct method before usage.
|
| |
| | TridiagInvDF (const thrust::host_vector< real_type > ©able) |
| | Construct from vector.
|
| |
| | TridiagInvDF (unsigned size) |
| | Construct from size of vector.
|
| |
| void | resize (unsigned new_size) |
| | Resize inverse tridiagonal matrix and helper vectors.
|
| |
| void | operator() (const dg::TriDiagonal< thrust::host_vector< real_type > > &T, dg::SquareMatrix< real_type > &Tinv) |
| | Compute the inverse of a tridiagonal matrix T.
|
| |
| dg::SquareMatrix< real_type > | operator() (const dg::TriDiagonal< thrust::host_vector< real_type > > &T) |
| | Compute the inverse of a tridiagonal matrix T.
|
| |
| template<class ContainerType0 , class ContainerType1 , class ContainerType2 > |
| void | operator() (const ContainerType0 &a, const ContainerType1 &b, const ContainerType2 &c, dg::SquareMatrix< real_type > &Tinv) |
| | Compute the inverse of a tridiagonal matrix with diagonal vectors a,b,c.
|
| |
template<class real_type>
class dg::mat::TridiagInvDF< real_type >
USE THIS ONE Compute the inverse of a general tridiagonal matrix. The algorithm does not rely on the determinant.
- Note
- For some special cases division by zero occurs (can be fixed if necessary cf. 2nd paper) This is the algorihm of "On the inverses of general tridiagonal matrices" by Hou-Biao Li, Ting-Zhu Huang, Xing-Ping Liu, Hong Li Appears to be the same as the algorithm in "ON AN INVERSE FORMULA OF A TRIDIAGONAL MATRIX" by Tomoyuki Sugimoto
- Template Parameters
-
template<class real_type >
template<class ContainerType0 , class ContainerType1 , class ContainerType2 >
Compute the inverse of a tridiagonal matrix with diagonal vectors a,b,c.
The diagonal vectors are given as in the dg::TriDiagonal matrix format
- Parameters
-
| a | "0" diagonal vector (index 0 is on row 0, O in dg::TriDiagonal) |
| b | "+1" diagonal vector (index 0 is on row 0, last index outside, P in dg::TriDiagonal) |
| c | "-1" diagonal vector (index 0 is on row 0, outside of matrix, M in dg::TriDiagonal) |
| Tinv | the inverse of the tridiagonal matrix (coordinate format) gets resized if necessary |