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.
-
The 1.0 release of DUNE works with the vanilla UG, available from the
UG project homepage.
-
The 1.1 release of DUNE works with the vanilla UG plus a set
of patches.
These patches have been created against the vanilla UG tarball of 2008-04-18.
-
The 1.2 release of DUNE works with the vanilla UG plus a set
of patches.
These patches have been created against the vanilla UG tarball of 2008-11-13.
-
The 2.0 release of DUNE works with the vanilla UG plus a set
of patches.
Note:These patches have been created against the vanilla UG tarball of 2008-11-13.
-
For the current svn version of DUNE you need the latest set of patches, which turns
upstream UG into
UG-3.9.1-patch7.
See below for a list of changes.
Note:These patches have been created against the vanilla UG tarball of 2008-11-13.
Here's how you get a patched UG:
-
Check out the version of UG from the central repository at the
UG project homepage
of the appropriate day given in the list above. Several tarballs providing
these versions are available there. If you cannot find the correct one
(and CVS access is available) you can get specific version by using the option
-D MM/DD/YYYY when checking out the sources.
UG will appear in a directory called UG.
-
Put the appropriate patch file in the same directory as UG.
-
cd UG/ug
-
patch -p1 < ../../my_patch_file
Changes in UG-3.9.1-patch7
- Various fixes related to edge communication for 2d grids.
Changes in UG-3.9.1-patch5
- Another bugfix in the AutoTools test for MPI: The 'configure' command would
abort when run without --enable-parallel.
Changes in UG-3.9.1-patch4
- Fix a bug in the AutoTools test for MPI, which had been introduced in 3.9.1-patch3.
Changes in UG-3.9.1-patch3
- A new flag isLeaf is introduced for UG nodes. This is necessary
for many bugfixes in the parallel Dune interface.
Changes in UG-3.9.1-patch2
- You can build UG as shared libraries now.
- Fix a memory corruption bug (Dune FlySpray 738)
- When compiling as C++, use a C++ snippet to replace an O(n^2) algorithm by
an O(nlogn) on std_domain.cc. This speeds up the creation of large grids.
- The build system now uses the DESTDIR variable to allow staged installs.
This is important for Linux packaging.
- The package is now called 'ug' instead of 'UG' (lower-case letters being the norm)
- Headers are now installed to /include/ug instead of /include.
The prevents the pollution of /usr/include when UG is installed system-wide.
- Make support for pkg-config work.
Compilation and Installation
Dependencies
- flex
- A yacc compatible parser generator like bison.
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.
Compile UG with
make
Install UG with
make install
- 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.