[vtkusers] eigenvectors?

Philipp.Batchelor Philipp.Batchelor at kcl.ac.uk
Tue Nov 27 08:33:43 EST 2001


I agree with Randy Heiland, this is not really a vtk problem.
I can add my own experience, because very recently I started
doing something very related, i.e. a vtk UnstrucutredGrid filter which would
compute some eigenvalues of the stiffness matrix. It's not pure vtk,
but nothing says you can't link vtk with other libs. Honestly, it was
not straightforward, and still isn't!
Some issues:

--the (huge) sparse matrices, you'll need a matrix class, which
is not a vtk problem, and to build that matrix, I suppose from some
mesh connectivity, which is a vtk problem. It's <<relatively>> easy 
to build compressed coordinates matrices (COO) from the connectivity in vtk, but 
normally you need compressed sparse row (CSR), or compressed sparse column 
(CSC), and for this you need some sparse matrix manip library. I used 
SPARSKIT2.

--once you have the matrix, you need a to compute the eigenvalues, 
Lapack is not for sparse, I think a good choice is ARPACK (Fortran Lib),
with ARPACK++ as interface. ARPACK++ provides sparse matrices classes (CSC).
You can, but don't have to use it in conjunction with some other libraries
(SuperLU, Umfpack).
I had to fight quite a lot with ARPACK++ to use it with an ANSI compliant
C++.

NB: all libraries were downloaded from the addresses that Randy gave (netlib).
I stored the output eigenvalues/eigenvectors as FieldData/DataArrays.
Ask me if you want more details/code.
Ph




More information about the vtkusers mailing list