by Julien Langou » Wed Oct 21, 2015 7:02 pm
Stiffness matrices are symmetric positive definite. They are also often banded, and often sparse as well. If you want an efficient solver, you need to take all this into account. If you stick to LAPACK, you can use xPOSV for solving the system of equations (instead of xGESV). You will be using a Cholesky factorization instead of an LU factorization with partial pivoting. This does not require any change in your data format. The gain will be minimal (a factor of 2 or so). You probably want to other changes to get more speedup. The next thing to do would be to take into account the banded structure of your matrix. You want to use xPBSV. This requires a change in the data structure. You will use less memory, and this should be much faster. That's about it for what LAPACK can do for you. The next step (which is advisable) is to use a sparse direct Cholesky solver. Please look on the internet and you should find a few. Another options is to look at sparse iterative methods for symmetric positive definite matrices (like the Conjugate Gradient method). So to repeat: (1) LAPACK xPOTRF, (no change, minimal gain) (2) LAPACK xPBTRF (change in data structure, some significant gain, hopefully, depends on 1D, 2D or 3D), (3) sparse direct Cholesky solver, (4) sparse iterative Cholesky methods for symmetric positive definite matrices. Best wishes, Julien.