Polymesh is a FORTRAN / C++ interface to the powerful grid generation tool triangle . Polymesh is developped and maintained by T.U. Darmstadt. Further grid editing capabilities are built into TWIST to allow an interactive editing of the model grids.

Polymesh is often updated at T.U. Darmsadt. It is developped with the version control software git . git comes with a GUI interface that is opened with gitk . For basic git commands see at the bottom of this page.

A manual can be found here: [ ftp://ftp.ifremer.fr/ifremer/cersat/products/gridded/wavewatch3/pub/HINDCAST/publications/PolyMesh_manual.pdf ]


Polymesh v2.1 ca be found here.

It is installed on Caparmor with all executables in /home10/caparmor/previmer/users/devww3/bin

The main program is polymesh which is also calling triangle . There is also a quick visualization program called showme

Installing polymesh from the archive

  • uncompress polymesh_v2.tar.bz2
  • tar -xvf polymesh_v2.tar
  • edit the Rules.make to select your compiler (Intel or gfortran): on caparmor we had to set the optimization to false. gfortran needs to be version 4.6, at least.
  • make clean
  • make : this will create the executables in ${HOME}/bin

Using polymesh

The input information for polymesh is specified by a text (ASCII) file meshin.nml

Installing polymesh with git

(For those who have an account on TU Darmstadt server. )

For caparmor users, this was performed by user devww3 on /home10/caparmor/previmer/users/devww3/IFR_WW3_TOOLS/branches/POLYMESH

sudo apt-get install git git-gui

Setup GIT locally.

  • 1. Make a directory e.g. mkdir GIT, this is your GIT main directory where all the Repositories will be included.
  • 2. Change to the new directory, cd GIT
  • 3. git config --global user.name "devww3" -> set user name
  • 4. git config --global user.email devww3@ifremer.fr -> provide e-mail adress
  • 5. git config --global core.editor gedit -> set default editor
  • 6. git clone fabrice@ -> clone repository ...
  • 7. Change to newly added directory. cd timor where "timor" is the so called "working directory"
  • 8. git remote add polymesh2 fabrice@ -> add short cut
  • 9. git add *.f90 *.nml (add the source files you want to be monitored by GIT)

Before editing the source code

1. change to "working directory" - cd GIT/timor 2. git pull timor master 3. edit the code

After editing the source code

1. git commit -a 2. git push timor master

In the case of conflicts

1. e.g. you want to push your changes after you have done a commit but somebody worked on the same part of the code 2. pull the changes from the server 3. treat the conflict in the certain file 4. commit your changes in order to merge them into the main repository 5. git push timor master ... in order to update the repository on the server ...

Using XFN (Graphics interface)

Setting environment variable in .bashrc

  1. XFN (Polymesh ...)
   export TICAD_DEFAULTS='/export/home/ardhuin/TOOLS/xfnbin/xf.defaults'