The exercises are considered to be curriculum. You are not required to hand them in and they will not be corrected, but solutions will be posted at a later time.

The programming project is mandatory and you are required to produce a written report, in addition to an oral presentation of 5 minutes. This will count 35% towards your final grade. The project will be announced later during the semester.

Everyone will pair up in groups of two people. If you cannot find a partner by yourself, e-mail me and I will pair you with someone. If you did find a partner on your own, then e-mail me the full name of all group participants.

Presentation order (November 10th)

  • Group 1: Truls Helge Øi and Ferenc Székely
  • Group 2: Nicolaj Nielsen and Petter Johnsen Frisvåg
  • Group 3: Pia-Kristina Heigrestad and Marcus Aleksander Engebretsen
  • Group 4: Robert Seidel , Anissa El Keurti and Obed Afram
  • Group 5: Audun Reigstad and Geir Amund Svan Hasle
  • Group 6: Abdul Ghaffar Rehman Malik and Lars Snekkerhaugen
  • Group 7: Markus Brabrand Urfjell and Lene Finsveen
  • Group 8: Gudmundur Daniel Hannibal Sökjer and Pål Erik Lystad
  • Group 9: Espen H. Sørum and Olav Ersland
  • Group 10: Sindre Blomvik , Christian Jakobsen and David Lu

Groups of two

  • E-mail me a list of both group members
  • If you haven't found a group already, e-mail me stating that you want to be paired with someone


  • If you don't have access to the computers at the computer lab, e-mail your NTNU username to me
  • If you don't have access to the door to the computer lab, e-mail your NTNU access card number to me

Programming project


  • (Last update: 06.10) - Assorted mesh generation files
  • writeVTF.m (Last update: 10.10) - Write function for GLview native file format (.vtf)
  • msh2m.cpp - GMSH native file format (.msh) converter to matlab files (.m)
  • - extraction site for the minecraft server
  • removeUnused.m - GMSH cleanup script to remove unused nodes (3D version)
  • removeUnused2D.m - GMSH cleanup script to remove unused nodes (2D version)

Compiling and running C++

You may compile the GMSH to Matlab converter (in Linux) by typing

g++ msh2m.cpp -o msh2m

and use this by typing

msh2m myGeometry.msh myMatlab

which will read the file myGeometry.msh and write the following files

  • myMatlab_pts.m
  • myMatlab_lines.m
  • myMatlab_tri.m
  • myMatlab_tetr.m
  • myMatlab_nodes.m

containing respectively all points specified, lines, triangles, tetrahedrons and nodal coordinates. For 2D examples, your elements would be in myMatlab_tri.m, the boundary elements in myMatlab_lines.m and the nodal coordinates in myMatlab_nodes.m


  • November 10th. There will be a short oral presentation as well as the submission of a written report.


Here is a handful of sample geometries which you may download and play around with for your project. You may choose to use any of these in your final submission, or create your own.

Princess Cake

This is the geometry of the skirt for the princess cake. The volumetric tetrahedrals are seperated into two parts: those of the cake dough and those for the metal tube in the middle.

King & Queen

King and Queen chess pieces.


Need something to warm your heart? Why not try the finite element method?


Cooking a piece of steak.


A piece of swiss cheese. More food geometry for those doing heat equations or do you envision doing something else with it?


Volumetric mesh from Stanford 3D Scanning repository

Solid ball

This is simply the unit ball as in problem set part 1. The difference is that this is created in GMSH, and may be easier to alter for your own creations. Note that the actual triangulation returned will be different from the getSphere.m matlab script.


I got a pen… I got an apple… Apple-pen!

2016-11-21, kjetijo