This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Tridiagonal Matrix Product

Tags: None
(comma "," separated)
mcconkey
Registered Member
Posts
2
Karma
0

Tridiagonal Matrix Product

Sat Nov 16, 2013 9:24 pm
Hi Everyone,

I'm new to Eigen and I'm trying to implement a simple PDE solver for the 1D heat equation.

I defined A a matrix

Code: Select all
Eigen::internal::TridiagonalMatrix<double,N,0> A;

and P a vector
Code: Select all
MatrixXd P=MatrixXd::Constant(N,1,0);


And the compiler won't compile the product of the Tridiagonal Matrix and the vector... (no match for operator * in 'A*P')

What am I doing wrong?

Thanks for your help!
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Tridiagonal Matrix Product

Sun Nov 17, 2013 12:24 am
TridiagonalMatrix is an internal class, it is not meant to be used by users since currently it only supports storage.
mcconkey
Registered Member
Posts
2
Karma
0

Re: Tridiagonal Matrix Product

Sun Nov 17, 2013 8:51 am
Thanks!

What's the usual solution for people doing PDEs (or any task where tridiagonal matrix are present) then? Just use sparse matrix instead? This would work but we would lose some speed...
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Tridiagonal Matrix Product

Mon Nov 18, 2013 10:26 am
In the meantime you can directly call BLAS/Lapack routines.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]