SCIInstitute / SCIRun

SCIRun is a Problem Solving Environment, for modeling, simulation and visualization of scientific problems. This is version 5, the upgraded version of SCIRun v4.
http://scirun.org
Other
128 stars 72 forks source link

SolveLinearSystem Jacobi method does not converge when used with AddKnownsToLinearSystem #479

Open a-y-khan opened 10 years ago

a-y-khan commented 10 years ago

See GForge bug #841.

github-actions[bot] commented 5 years ago

Stale issue message

dcwhite commented 5 years ago

@jessdtate Any comments on this one?

jessdtate commented 5 years ago

Just for simplicity, here is the info from gforge:

jessdtate commented 5 years ago

The SolveLinearSystem Jacobi; preconditioners method does not converge when it is used with inputs from AddKnownsToLinearSystem. It does not appear to matter if the preconditioner option is selected or not.Compare the Defibrillation tutorial network cube_simulation.srn (in nets/Optional/Defib-Tutorial), which contains AddKnownsToLinearSystem, with the test network nets/Modules/Math/FE-BuildRHS-Example-cube.srn. The presence of AddLinkedNodesToLinearSystem does affect the bug.

This not-converging problem is not because the Jacobi method has a bug. The cause is that the matrix in "cube_simulation.srn" does not satisfy the convergence condition required by the Jacobi method. Let's say the Jacobi method is solving a linear system Ax=b, let A=D+R where D is the diagonal of A, and R is the remainder part. The Jacobi method requires that the spectral radius of the matrix inv(D)*R (i.e., the absolute value of the largest eigen value) should be less than

  1. In "cube_simulation.srn", the largest 2 eigen values of inv(D)*R is 0.9981 and 0.9954, so the Jacobi method is extremely slow to converge.

The Module "AddKnownsToLinearSystem" has been verified by comparing it with another program that performs the same functionality but was developed separately and used for several years. Both modules return the same results.

jessdtate commented 5 years ago

I've reproduced this in SR5 and SR4. But it seems less like a bug an more like a numerical limitation of the problem. We should look at it some more.