solve large sparse jacobian matrix (with an example)
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Marko
el 7 de En. de 2021
Respondida: Doddy Kastanya
el 12 de En. de 2021
Hello Community,
do you have a good suggestion if an iterative solver would be faster.
This jacobian J with ( N = 32 ) took me around 1s of solving this equation x=J\y. The matrix is saved as sparse, and the density is around 3%.
( For N=64 the density ia about 1,6% and solving that matrix cost me about 50s. So the scaling is really bad)
The Dimensions of this matrix J are scaling with (3*(N+1)^2+(N-1)^2,3*(N+1)^2+(N-1)^2).
my desired N will be in the order of 128- 192.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/481713/image.png)
1 comentario
J. Alex Lee
el 8 de En. de 2021
maybe you can invoke more specific solvers to specify properties of the matrix, though i'm not too knowledgeable in the area.
another comment which may or may not be relevant is that i wonder if your matrix can be permuted a priori into a structure that's more amenable to solvers (again not terrible knowledgeable in the area...)
Respuesta aceptada
Doddy Kastanya
el 12 de En. de 2021
I assume that the Jacobian matrix is needed as a part of implementing Newton's method to solve system of non-linear equations. For the problem with N=192, the Jacobian matrix size is close to 150k by 150k - So, it might not be advisable to simply use "\" to get the answer - knowing that the matrix is highly sparse. It might be more advantageous to use preconditioned Krylov methods to solve the system of equations. You will have an opportunity to develop an appropriate preconditioner to solve the system of equation faster (by taking advantage of the sparse matrix structure). Another thing that you might want to consider is to implement "Jacobian Free Newton Krylov" method where you don't even have to build the Jacobian matrix (which could be costly as well). I hope this helps. Good luck.
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!