Gerris is written in C and uses two other C libraries which you need to install on your system first: the Glib library and the GTS library. If you want to run the parallel version of Gerris, you will also need some implementation of the MPI (Message Passing Interface) library. If you are using a parallel machine, MPI is very likely to be already on your machine.
If you are using a Linux system the Glib library is most probably already installed on your system. To be sure try this:
% glib-config --versionor this
% pkg-config glib-2.0 --modversionIf you get a result, you have the Glib library on your system, otherwise you will need to install it following the instructions on the Glib web site.
You now need to install the GNU Triangulated Surface Library (GTS). To do that, go on the GTS web site and download a recent source file package. Move it to your preferred location for unpacking source files and type:
% gunzip gts.tar.gz % tar xvf gts.tar % cd gtsYou now need to decide where you want to install the library, if you have access to the root account, you can simply type:
% ./configure % make % su % make install % exitwhich will install everything in /usr/local by default.
If you don't have access to the root password or want to install the library somewhere else like /home/joe/local for example, you can type instead:
% ./configure --prefix=/home/joe/local % make % make installYou probably want to add /home/joe/local/bin to your PATH and /home/joe/local/lib to your LD_LIBRARY_PATH.
The next step is installing Gerris itself, do the same, go to the Gerris web site download a recent source file package and type:
% gunzip gerris.tar.gz % tar xvf gerris.tar % cd gerris % ./configure --prefix=/home/joe/local % make % make installBoth the 2D and 3D versions of the code are built. In this tutorial, we will for convenience only work with 2D simulations. However, all we will learn can be applied directly to 3D simulations.
We are now ready to start. Just to check that everything is okay try:
% gerris2D -V