Start also this weeks assignments by updating your repository! Either press the sync fork button on gihub.com, or pull in the latest changes through
git pull
This should pull in two new files poisson.py and poisson2d.py. Study the solver in poisson.py and try to understand how it works.
i) Modify the function `test_poisson` by adding an appropriate test for the Poisson solver. You may add one or several tests.
ii) Implement a 2D Poisson solver in poisson2d.py. Use vectorization, as described in Lecture 6. The solver should be implemented for a generic right hand side function \(f(x, y)\), such that you can test the solver using the method of manufactured solutions (see the 1D Poisson solver). Implement first the solver for homogeneous Dirichlet boundary conditions. Note that this restricts the possible solutions to all solutions that are zero on the entire boundary.
iii) Implement generic Dirichlet boundary conditions for the 2D Poisson solver such that any manufactured solution may be applied.
iv) Implement an appropriate test for the solver in the function `test_poisson2d`.