This program is written by Hans Jakob Rivertz
My students had a similar task as a project in numerics.