I am watching some wonderful videos by Qiqi Wang on numerical methods for solving PDEs. He first introduced Finite Difference methods, where he setup the differentiation matrices for first and second order derivatives, and then used iterative solvers to solve for the spatial discretization. That was a very nice and efficient setup since the differentiation matrices are sparse.
I am watching his video on finite volume methods, which depend on the integral form of the PDE. Now in this video, the link is provided, he sets up a function to compute the numerical flux, and then he writes a loop to apply the flux to the system over and over again.
My question was, can I setup a matrix approach for solving Finite Volume methods? Of course the matrix approach would be different than Finite Differences, because Finite Volume methods don't use differentiation matrices. However it seems like Finite Volume methods should still define a system of linear equations that is amenable to fast linear algebra routines. Seems like the finite volume matrix would still be sparse and banded, but it would compute the numerical flux at each interface point.
If anyone can provide an example of how the matrices would look, that would be really helpful. Incidentally, is there a reason why someone would choose to use a loop versus using a matrix approach? Is it just faster to code a loop than constructing the matrices.