Warning: Undefined array key "group" in /var/www/html/extensions/CrossReference/CrossReference.class.php on line 206
Solving sparse systems: Difference between revisions - Medusa: Coordinate Free Meshless Method implementation
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 1: Line 1:
There are many methods available for solving sparse systems. We compare some of them here.
There are many methods available for solving sparse systems. We compare some of them here.
 
<figure id="fig:meshless1">
[[File:matrix.png|300px|thumb|upright=2|alt=Matrix of the discretized PDE.|<caption>Matrix of the discretized PDE. </caption>]]
</figure>
Mathematica has the following methods available (https://reference.wolfram.com/language/ref/LinearSolve.html#DetailsAndOptions)
Mathematica has the following methods available (https://reference.wolfram.com/language/ref/LinearSolve.html#DetailsAndOptions)
* direct: banded, cholesky, multifrontal (direct sparse LU)
* direct: banded, cholesky, multifrontal (direct sparse LU)
Line 8: Line 10:
* direct: https://www.mathworks.com/help/matlab/ref/mldivide.html#bt42omx_head
* direct: https://www.mathworks.com/help/matlab/ref/mldivide.html#bt42omx_head
* iterative: https://www.mathworks.com/help/matlab/math/systems-of-linear-equations.html#brzoiix, including bicgstab, gmres  
* iterative: https://www.mathworks.com/help/matlab/math/systems-of-linear-equations.html#brzoiix, including bicgstab, gmres  
<figure id="fig:meshless1">
[[File:matrix.png|300px|thumb|upright=2|alt=Matrix of the discretized PDE.|<caption>Matrix of the discretized PDE. </caption>]]
</figure>


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

Revision as of 12:07, 16 March 2017

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

Matrix of the discretized PDE.
Figure 1: Matrix of the discretized PDE.

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$ for steady space of heat equation in 1d with $n$ nodes, results in a matrix shown in fig. 1.

The following timings of solvers are given in seconds:

$n = 10^6$ Matlab Mathematica Eigen
Banded 0.16 0.28 0.04
SparseLU / 1.73 0.82
BICGStab / Krylov 0.33 0.39 0.53

Incomplete LU preconditioner was used for BICGStab. Without the preconditioner BICGStab does not converge.