- #1
Pete99
- 43
- 0
Hi all,
I am trying to solve a non linear differential equation iteratively using finite differences.
At every iteration I basically have to solve (sorry, for some reason I cannot use the preview function when I write latex, so I'll write in plain text):
Delta_x = (A-J)\b
Where Delta_x is the update I calculate in each iteration, A is a sparse matrix with 5 non zero diagonals and J is diagonal. b and J depend on x, the parameter that I am looking for.
The diagonal matrix J, has only about 10% of its diagonal elements non zero (at fixed positions) and change at every iteration, and A does not change during the iterations.
Right now I calculate the update using the backslash operator in Matlab. My question is if there is any way I can take advantage of the fact that only a small fraction of J changes at every iteration in order to save time.
Thanks,
I am trying to solve a non linear differential equation iteratively using finite differences.
At every iteration I basically have to solve (sorry, for some reason I cannot use the preview function when I write latex, so I'll write in plain text):
Delta_x = (A-J)\b
Where Delta_x is the update I calculate in each iteration, A is a sparse matrix with 5 non zero diagonals and J is diagonal. b and J depend on x, the parameter that I am looking for.
The diagonal matrix J, has only about 10% of its diagonal elements non zero (at fixed positions) and change at every iteration, and A does not change during the iterations.
Right now I calculate the update using the backslash operator in Matlab. My question is if there is any way I can take advantage of the fact that only a small fraction of J changes at every iteration in order to save time.
Thanks,