Table of Contents

Getting oofem

Getting release version

You can get the release version of OOFEM from its download page. After downloading, unpack the distribution.

* In case of tar .tar.gz files you can use, for example, following command

gunzip -c oofem-x.y.tar.gz | tar xof -

* In case of .zip files use

unzip oofem-x.y.zip

Getting development version

Alternatively, you can get the bleeding edge version of OOFEM from the OOFEM Git repository. This step requires Git to be installed on your system (see our Git tutorial for more info). To grab a copy of the latest version of OOFEM using public git access, use following command:

# When a repository is cloned, git automatically creates a master branch that tracks origin/master
git clone http://www.oofem.org/git/oofem.git oofem.git
# If you would like to track develop branch
git checkout -b develop origin/develop

The oofem.git directory has been created with OOFEM source tree.

cd oofem.git 

Once you've checked out a copy of the source tree, you can update your source tree at any time so it is in sync with the latest and greatest by entering your oofem directory and running the command:

git fetch origin

Be aware, however, that develop branch of the code is not guaranteed to be stable. This option is intended mainly for active oofem developers, giving access to the most up-to-date version.

Unix / Linux Installation

Installation on Ubuntu system (9.10 Karmic and later)

Pre-build packages are available in the PPA for Václav Šmilauer.

  deb http://ppa.launchpad.net/eudoxos/ppa/ubuntu karmic main 
  deb-src http://ppa.launchpad.net/eudoxos/ppa/ubuntu karmic main 
  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 92DE8183
  sudo apt-get update && sudo apt-get install oofem oofem-mpi oofem-oofeg oofem-doc

Quick Installation

  sudo apt-get install build-essential xorg-dev
  mkdir -p ~/build/debug/
  cd ~/build/debug
  cmake ~/oofem.git/
  cd ~/build/debug; make 
  mkdir -p ~/build/release/
  cd ~/build/release/
  cmake -DCMAKE_BUILD_TYPE=Release ~/oofem.git/
  make
  

Build options

To make configuration options, either use the ncurses interface ccmake or the graphical interface cmake-gui or supply additional commands directly

cmake -DCMAKE_CXX_FLAGS="-Werror" ~/oofem.git

Some common build options

Full list of configure options can be obtained running 'ccmake' or any other CMake GUI. See the CMake page for more details.

Compiling targets

Run make to compile the required targets as:

cd ~/build/target; make

Supply valid target directory (as set up in configuration)“.

The target executable will be created in ~/build/target directory.

Verifying installation - running tests

Testing solver

To test solver compiled under “target_name” target, change working directory to target directory:

cd ~/build/target_name

Run ctest to run the internal tests (takes a while)

ctest

Running specific tests

You can run specific tests by using the -R flag for ctest

ctest -R spring

or for example, only the parallel tests (only availble when parallel support is compiled)

ctest -R partest

There are also two custom targets added, “tests” and “benchmarks” which can be accessed

make tests
make benchmarks

which only runs the mandatory tests and the optional benchmark examples respectively. These custom targets are also accessible from KDevelop, Visual Studio and other IDEs.

Windows version

Windows installation under MinGW environment

Windows installation with Visual Studio

If you plan to redistribute the OOFEM executable to Windows XP machines, you must set the property Visual Studio 2013 - Windows XP (v120_xp) in Configuration Properties\General\Platform Toolset from the oofem project settings.

If you're interested in parallel version for Windows, go here.