## Description

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 is in two parts, the first is to be done individually, and must be completed satisfactorily before beginning the second. This project is intended to build up a code base to tackle the second part.

For the second part, 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.

• The first project should be completed by October 13th. The second project should be completed by November 22nd; the oral presentations will also be held in the course of that week.

### Access

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

## Programming project

### Resources

• Grids - Mesh generation files required for first project
• WriteVTF - Write function for GLview native file format (.vtf)
• shell.m - Required for mesh generation in first project
• getplate.m - Used in some of the second project options

There follows of collection of resources related to computational geometries:

### GMSH

Some students may find this free mesh generator/processor useful, available at gmsh. Tutorials etc. can be found on the site. For those wishing to use meshes created in this manner, the following cleanup scripts may be useful:

In addition, there is a gmsh to Matlab mesh converter: msh2m.cpp

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

### Minecraft

A simpler way of creating meshes is to build a structure on our dedicated minecraft server, and then convert this to a matlab triangulation by the supplied scripts. See minecraft.math.ntnu.no

Be aware that there may be some interruptions/irregularities in the server this week (16.10) as it is brought to life again!

### Geometries

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.

#### Heart

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

#### Beef

Cooking a piece of steak.

#### Cheese

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

#### Dragon

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.

#### Apple-pen

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

(Lecturer's note: I find this deeply upsetting)