Reply to topic

Tridiagonal Matrix Product

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
2194
Karma
15
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
2194
Karma
15
OS

Re: Tridiagonal Matrix Product

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

 
Reply to topic

Bookmarks



Who is online

Registered users: 16777216, alake, Baidu [Spider], Bing [Bot], Exabot [Bot], garthecho, Google [Bot], GordieGii, Hans, koriun, Majestic-12 [Bot], mmistretta, nezumi, onesandzeros, Yahoo [Bot]