Compile from Source

From openEMS

Jump to: navigation, search

Contents

Linux

Requirement

  • Install all necessary packages and libraries: git, qt4, tinyxml, hdf5 and boost.

For example on Ubuntu 14.04 LTS or above:

sudo apt-get install build-essential git cmake libhdf5-dev libvtk5-dev libboost-all-dev libcgal-dev libtinyxml-dev libqt4-dev libvtk5-qt4-dev

Note for Ubuntu 16.04: Due to a bug in CGAL the package libcgal-qt5-dev may be required.

Optional: Additional packages for hyp2mat:

For example on Ubuntu 14.04 or above:

sudo apt-get install gengetopt help2man groff pod2pdf bison flex libhpdf-dev libtool autoconf

Optional: Install octave and octave devel packages:

sudo apt-get install octave liboctave-dev epstool transfig

Optional: Install ParaView so that gridded model can be viewed:

sudo apt-get install paraview

Build and Install

This instructions assume that you will install openEMS to ~/opt/openEMS

  • Get the openEMS source code, extract, build and install:
cd /tmp
wget http://openems.de/download/src/openEMS-v0.0.35.tar.bz2
tar jxf openEMS-v0.0.35.tar.bz2
cd openEMS
./update_openEMS.sh ~/opt/openEMS
./update_openEMS.sh ~/opt/openEMS --with-hyp2mat --with-CTB
  • Alternatively disable AppCSXCAD build (e.g. for a server-system):
./update_openEMS.sh ~/opt/openEMS --disable-GUI

Setup Matlab/Octave

Add the openEMS path to matlab (store the commands in "startup.m" or ".octaverc" in your home directory to load them on startup in matlab or octave respectively):

addpath('~/opt/openEMS/share/openEMS/matlab');
addpath('~/opt/openEMS/share/CSXCAD/matlab');

If you installed hyp2mat and circuit toolbox, add the paths for these optional packages as well:

addpath('~/opt/openEMS/share/hyp2mat/matlab'); % hyp2mat package
addpath('~/opt/openEMS/share/CTB/matlab'); % circuit toolbox

Build from Github

  • If you want to get the latest development version of openEMS:
git clone --recursive https://github.com/thliebig/openEMS-Project.git
cd openEMS-Project
./update_openEMS.sh ~/opt/openEMS

Mac OS-X

Experimental support using brew: brew file