Installing UG for DUNE

UG is a software tool for the numerical solution of partial differential equations on unstructured meshes in two and three space dimensions using multigrid methods. UG runs both sequentially and in parallel. DUNE offers an abstraction to the UG grid manager through the UGGrid class.

Getting UG

The appropriate UG version for you depends on which version of DUNE you want to use. Starting from DUNE release 1.1, UG needs to be patched in order to be usable with DUNE. The patches contain bugfixes and some small further features. For legal reasons we cannot provide a patched UG directly.

Here's how you get a patched UG:

Changes in UG-3.9.1-patch7

Changes in UG-3.9.1-patch5

Changes in UG-3.9.1-patch4

Changes in UG-3.9.1-patch3

Changes in UG-3.9.1-patch2

Compilation and Installation

Dependencies

  1. Build the UG make system

    cd UG/ug
    ./autogen.sh
    ./configure --prefix=my_favourite_ug_installation_path --enable-dune CC=g++
    
    • --prefix determines the absolute path of the directory we install to.
    • --enable-dune enables special features needed by Dune.
    • CC=g++ tells the build system to compile everything as C++, even though it is technically C. This is necessary when using UG through the DUNE interface. Don't forget that the compiler has to be binary-compatible with the one you're using for Dune.
  2. Compile UG with

    make
  3. Install UG with

    make install
  4. Add
    --with-ug=my_favourite_ug_installation_path
    
    as an option to configure for dune-grid.

Using the Parallel Features of UG

If you want to work with UG on a parallel computer you have to add the flag --enable-parallel to the configure flags. In addition, you have to add the same flag to the list of flags for the configure of dune-grid.

Note: it is important to use the same MPI compiler for UG and DUNE. In order to specify a particular MPI compiler pass the parameter MPICC=/opt/super-special-mpi/bin/mpicc to configure.

Note that you cannot install a sequential and a parallel version of UG in the same directory. If you need to switch between the two versions frequently you need to set up two distinct installation directories.

Last Change: Jan 26 2012 17:02 by sander