CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   Linear Algebra Package for general sparse matrices (

prapanj December 18, 2012 01:42

Linear Algebra Package for general sparse matrices
I am programming a particle based method for flow problems. It uses linked list data structure. It solves a poisson equation and since the particles can have arbitrary positions, the matrix need not be banded. So far I have been using BiCGSTAB which I programmed myself. Since the data structure is linked list, I find my code inefficient. I am considering temporarily writing to arrays to solve the poisson equations and also use a Linear Algebra package. I would like to know what Linear Algebra package may be apt. I searched through LAPACK and similar websites and they mention that they exclude general sparse matrices in their features. Considering this, please suggest me some package that would be easy to use and doesn't have restrictions. I program in C and would like to know about packages that are in C.

praveen December 18, 2012 03:45

PETSC and TRILINOS are the most comprehensive linear algebra packages available today.

cdegroot December 18, 2012 08:25

I use PETSc in my code and I have been happy with it. It has many solver options and is pretty straightforward to use.

ignatius January 2, 2013 07:58

I have used both, Petsc and Trilinos, petsc is easier to install. On the other hand I know trilinos has some features to handle dense matrices.

With respect to petsc, here there is a thread about it, in some other website
Anyway, how did you get a dense matrix if you are solving a poisson equation?

I recommend you to first try with petsc and if it is not good enough, make an extra effort and install trilinos.


All times are GMT -4. The time now is 12:07.