anderkve / FYS3150

https://anderkve.github.io/FYS3150
26 stars 14 forks source link

Problem 3 #102

Closed oysthaga closed 1 year ago

oysthaga commented 1 year ago

"Given what you know about A, discuss which approaches might be well-suited to solve Au^(n+1) = b."

I am not sure what the answer is here. We know that A is sparse, so I think it is a good idea to use arma::spsolve. Is this enough, or have I missed something?

anderkve commented 1 year ago

Hi @oysthaga!

There is no one correct answer here, as several different approaches might be suitable -- and which one is "the best" can depend on what assumptions you make about e.g. available memory, whether you consider parallelisation, whether you'd want to also use the method for problems with time-dependent potential v, larger simulation grids, etc. etc.

We certainly don't expect a discussion covering every alternative or suitable method, but try to think about one or two of the methods we've discussed in the course and consider the pros/cons of using it here. If you include arma::spsolve in this discussion, you should try to figure out something about how it works. Another suggestion is to note the hint at the end of Problem 3, about a class of methods we have discussed (but not used) that are very easy to implement...

Hope this helps :)