Toggle menu
71
399
28
3.6K
Medusa: Coordinate Free Meshless Method implementation
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Solving sparse systems: Difference between revisions

From Medusa: Coordinate Free Meshless Method implementation
No edit summary
No edit summary
Line 34: Line 34:
|-
|-
! Bicgstab / Krylov
! Bicgstab / Krylov
| 19.32
| ??
| 0.39
| 0.39
|  
| ??
|}
|}
Preconditioners matter a lot.

Revision as of 17:57, 15 March 2017

There are many methods available for solving sparse systems. We compare some of them here.

Mathematica has the following methods available (https://reference.wolfram.com/language/ref/LinearSolve.html#DetailsAndOptions)

  • direct: banded, cholesky, multifrontal (direct sparse LU)
  • iterative: Krylov

Matlab has the following methods:

Eigen has the following methods: (https://eigen.tuxfamily.org/dox-devel/group__TopicSparseSystems.html)

  • direct: sparse LU
  • iterative: bicgstab, cg

Solving a simple sparse system $A x = b$ with $A = \begin{bmatrix} -2 & 1 & \\ 1 & \ddots & \ddots \\ & \ddots & \end{bmatrix}$ and $b = \begin{bmatrix} 1 \\ \vdots \\ 1 \end{bmatrix}$ with dimension $n$ has the following timings in seconds:

$n = 10^6$ Matlab Mathematica Eigen
Banded 0.16 0.28 /
SparseLU / 1.73 0.78
Bicgstab / Krylov ?? 0.39 ??

Preconditioners matter a lot.