|
If you now type
./prog2you will see the GUI appear. The GUI is shown in Figure 1. First you may want to click with the left mouse button on the ``Density graph'' button to see the density. Then in the density graph you may want to select the ``Density'' with the left mouse button. If you click with the right mouse button on the ``Density'' field you can choose several properties of the graph. If you want to remove the new menu simply right-click the ``Density'' button as well. This is a general method to remove menus that you have created. The only exceptions are graphics windows because you can create an unlimited number of them.
Now clicking on the ``Control'' button will give you a menu that allows you to choose several properties of the graph. You may want to toggle the ``AutoScaling'' button. Next right-click on the ``Repeat = 1000'' button in the main menu. A cursor will appear and you can change this value to 1. Make sure that you finish the input by pressing enter. The program will not allow you to do anything else before you do this.
Now, if you are ready to look at the evolution of the density, press the ``Pause'' button and watch the evolution of the density. You can see that the initial density fluctuation decays and leaves us with a homogeneous solution. We actually know that analytically the sin function with an exponentially decaying amplitude is a solution of the diffusion equation. So now press ``AutoScaling'' to on and press the Restart button. In the new menu press ``Restart now''. Now you can see the evolution of the density and the form indeed remains constant (except for the moving scale) so that we see that our numerical approach is in agreement with the analytical solution.
To finish the program simply press the ``done'' button.
Alexander Wagner 2016-01-14