Version 2 (modified by tirons, 5 years ago) (diff)


Lemma is an Electromagnetics Modelling API


  • expressive API
  • modern, test-driven development
  • 100% C++
  • Bindings and integration with VTK
  • excellent multi-core performance
  • YAML Class serialisation

Getting the code

To download the latest svn tip

svn co Lemma

Read only anonymous access is permitted. If you would like to contribute and obtain write access please email info for a username and password.

In the future, links for stable release version tarballs (and zip files) will be made available here.


Lemma is extensible. There are several modules available for easy plugin addition to the core library



Lemma compares well with existing FORTRAN 77 codes and also scales well on multi-processor machines. Benchmarks will be uploaded shortly.


The only hard dependencies are a C++ compiler, the Eigen 3 C++ library, and Python 2.X. Eigen is freely available under the Mozilla Public License.

  • C++ Compiler
  • Python 2.x interpreter (2.7 recommended) - used for building Lemma and running tests
  • Eigen 3 C++ linear algebra (header) library
  • Boost C++ library - Lemma only uses header portions of Boost
  • Subversion - Version control software needed to access the source code

Bundled dependencies

Several additional dependencies are bundled with Lemma, all have liberal licenses and should place minimal restrictions on any use of Lemma.

Lemma uses SCons, a Make replacement written in Python. You may either use a locally installed SCons, or alternatively a local copy is included with Lemma.

We bundle matio,Mat_plot_vtk, zlib, and tinlyxmlpp. All of which are released under licenses that do not restrict Lemma. We thank these authors for their work.

As an optional dependency VTK is needed for visualisation. VTK is released under a BSD license.

Lemma objects are serialized using YAML, to do this YAML-cpp is used. Lemma ships with a local copy of Yaml-cpp.

Compiler support

We actively test against GCC versions 4.4 to 4.9 and Intel 13.0.1. Clang++ is also tested and supported (clang does not yet support OpenMP). Microsoft compilers are less frequently tested, but are officially supported. Stable releases will support all of these compilers. If you are using a different C++ compiler, please let us know your experience.

Platform support

Lemma has been successfully compiled on Linux (our primary platform) Windows ( XP, Vista, 7, and 8), as well as Max OS X.


Most Linux package managers handle all the dependencies for Lemma, and the Lemma install process should proceed smoothly in a UNIX/Un*x environment.


Some tips on building on a Mac can be found on MacNotes.


Some tips on building on a Windows machine can be found on WindowsNotes?. An alternative approach is shown in AnacondaWindowsNotes.


Lemma is available under the Mozilla Public License, v. 2.0. MPL Much of the code is covered by Copyright (C) 2010, 2011, 2012 Colorado School of Mines. Copyright (C) 2009--2013 Trevor Irons Copyright (C) 2010--2013 M. Andy Kass.


Once a sufficiently sized user base has been established, a forum will be available for support questions. In the mean time, email questions to support.

Bug reports

For now please simply email bug reports to bug. Or better yet, file a ticket using this website. This functionality may be removed for anonymous users if spam becomes a problem.


Lemma has been built in collaboration with the department of Geophysics at the Colorado School of Mines, specifically CGEM.

Our primary authors are Trevor Irons and M. Andy Kass.

Lemma has extended public domain code from Walt Anderson, Alan Chave, and Ki Ha Lee. In all cases original FORTRAN 77 codes were ported and reworked into our modern framework. We are grateful for their fine contributions to the public domain. Please keep in mind use of their code does not imply endorsement.


Interested in contributing? Great. Whether you are interested in extending Lemma, improving some aspect, or just making the documentation better, we welcome contributions. Some links that might be useful

Citing Lemma

An example BibTeX entry is provided below. If you are using a module with different primary authors, it may be appropriate to modify this entry.

  author = {Trevor Irons and M. Andrew Kass and others},
  title = {Lemma v1},
  howpublished = {},
  year = {2012}