Programming exercise in computational physics

53391 Laskennallisen fysiikan harjoitustyö - yhteenveto Suomeksi

Laskennallisen fysiikan harjoitustyössä opiskelijan tulee itse kirjoittaa ja dokumentoida ohjelma joka ratkaisee jonkin pienehkön fysiikan ongelman. Työ arvostellaan ohjelman toimivuuden ja ohjelmakoodin ja dokumentoinnin selkeyden perusteella. Harjoitustyön perustarkoitus on varmistaa että opiskelija todella hallitsee itsenäisen ongelmanratkaisun laskennallisin keinoin.

Ohjelma on kirjoitettava Unix-ympäristössä toimivaksi jollakin tavallisella ohjelmointikielellä (esim. C, Fortran, C++). Ympäristö on rajoitettu Unix:iin siksi että käytännössä kaikki laajamittainen tieteellinen laskenta tapahtuu Unix-ynpäristöissä.

Harjoitustyön aiheita jakaa ja ne arvostelee lask. fys. linjan koordinattoori. Aiheen voi myös mielellään valita esim. omasta tutkimusryhmältä tai työpaikalta, mutta niistä on tällöin sovittava etukäteen koordinaattorin kanssa.

Jos aiheen hankkii itse, voi laajudesta antaa nyrkkisäännön että oman uuden koodin osuus olisi useimmiten syytä olla vähintään noin 500 koodiriviä (tyypillisessä ohjelmointityylissä jossa on keskimäärin noin 1 komento/rivi). Tämä voi sisältää myös käyttöliittymän yms., kunhan 'fysiikan' osuus ei jää mitättömän pieneksi.

Huomaa että fysiikan pääaineopiskelijat voivat halutessaan korvata harjoitustyöllä kaksi laudatur-laboratoriotöistä. Tällöin harjoitustyöstä saa kyllä suoritusmerkinnän mutta 0 ov:ta, mutta korvauksella saa siis suoritettua puolet 7 ov:n laudatur- laboratorioista. Kaksi jäljellejäävää laudatur-laboratoriotyötä eivät tällöin saa olla teoreettisia tai laskennallisia. Järjestelystä on sovittava lask. fys. linjan koordinattoorin kanssa.

53391 Programming exercise in computational physics - full description

In the course "programming exercise in computational physics" the student has to independently solve a small-scale problem in physics using computer programming. The emphasis is laid on verifying that the student can independently write and document programs which can also be used by others. Being able to do this is very important for practical work both in research groups and industry.

The program is to be written in a generic Unix environment using a common programming language (e.g. C, Fortran, C++). Unix is chosen as the environment since practically all computational science programming today is done in Unix environments.

Topics for the work are given by the Coordinator of the computational physics specializing option. Students already working in research groups or industry are encouraged to suggest topics from their own specialty, however.

If one acquires a topic on ones own, a rule-of-thumb for the extent of the work is that the own code written should contain at least appr. 500 lines of code (in a typical programmin style of about 1 command/line). This may include the user interface and the like, as long as the 'physics' part does not become negligible.

Students majoring in physics can use the exercise to replace 2 of the mandatory 4 "Laudatur" laboratory exercises. However, in this case the 2 remaining exercises must not be theoretical or computational. In this case, the exercise itself gives 0 credits, but replaces half of the 7 credits of the laboratory exercises. This arrangement has to be agreed upon in advance with the Coordinator and the manager of the Laudatur laboratory works.

Return and evaluation of the exercise work

  1. The exercise work is to be returned to the Coordinator as one file package (e.g. in tar.gz or zip format).

  2. The email describing the return must contain an unpacking or copying instruction

  3. The main directory of the program must contain a file called "INSTALL" or "README.INSTALL" with compiling and installing instructions (note: precompiled software is not acceptable).

  4. The file system should contain a file called "README.TEST" which describes how the program can be tested. If necessary, sample input files should be provided. The file should also briefly describe what the output should look like if the testing is succesful (provide sample output files if necessary).

  5. If compiling or testing the program fails, the exercise work will be returned to the author without further evaluation.

  6. The file system should also contain a file called "README.SOURCE" which tells simply where the source file(s) are located, and where the main program is.

  7. There should also be a scientific documentation containing:
    1. A description of the physics in the problem (with references)
    2. The solution physics and/or algorithms
    3. How the program works, subroutine structure
    4. How to use the program
    5. Input and output files (if appropriate)
    Parts 1 and 2 should correspond to the ordinary scientific part of a lab report. A suitable length of these two parts is 5-8 pages (12 point font size).

    The documentation can be in a simple ascii text file or a PDF file.

  8. The language used in the documentation and comments in the source code may be Finnish, Swedish, or English
The work will be evaluated on the quality (efficiency) of the algorithms used, readability of the source code (including comments in it), the documentation, and the ease of use of the program.

Programs which can not be compiled or do not work will not be accepted, no matter how good the documentation or readability.

Topics

Topics are given by the Coordinator, if possible taking into account the interests of the students. As noted above, students can also find topics on their own.

If solving the given problem fails, a new topic can be given after the student has described the reason why solution failed.

Sample topics

  • Obtaining the diffusion coefficient from a set of points evolving in time
  • Determining the cluster size of an arbitrary distribution of points in space.
  • Genetic algorithm optimization of atom positions (conjugate gradient code will be provided)
  • LJ molecular dynamics code
  • The Ising model
  • Solving the heat conduction equation in a 2D space
  • Kinetic Monte Carlo simulation of defect migration in Si
  • Speed of sound in 2D Lennard-Jones system [A. Kuronen]
  • Kinetic Monte Carlo simulation of diffusion in disordered systems [A. Kuronen]
  • Necessary instructions and references will be given for these topics.

    Note that the source code must be original code by the author; the Coordinator may compare the source code to existing codes in the web.

    Present Coordinator

  • Prof. Kai Nordlund


    Kai Nordlund