Helsinki BEM library
Aug 18 2008:
Added an example on
EEG forward problem in a 3-layer model.
The example requires library version 080701 or newer;
if you have an older version, just drop me an email and we'll fix it.
Jul 9 2008:
I am on vacation for the next couple of weeks, so there may be delay in
answering your emails and sending the library files.
Jul 1 2008:
The library has been updated:
the one-step functions for transfer matrix construction are now updated with bugfixes and more features,
and a seldomly occurring mesh-related bug in the core routines of the linear kernel is fixed.
An example on 3-layer EEG forward computation is coming soon.
Nov 21 2007:
The BEM library (v1.0) is officially released and this page made public.
Nov 21 2007:
The paper M. Stenroos, V. Mäntynen, and J. Nenonen: "A Matlab library for solving quasi-static volume conduction problems using the boundary element method" is published in the
December issue of Computer Methods and Programs and Methods in Biomedicine (88:256-263, 2007).
Helsinki BEM library is a Matlab source code library for Boundary Element modeling of bioelectromagnetic phenomena and
any (quasi)static potential problems that obey the Laplace or Poisson equation.
The source code is simple and easy-to-read.
The library is suitable both for hands-on learning of the Boundary Element Method and
common modeling tasks in,
electro- and magnetocardiography or electro- and magnetoencephalography.
Theory and implementation of the library is described in:
M. Stenroos, V. Mäntynen, and J. Nenonen:
A Matlab library for solving quasi-static volume conduction problems using the boundary element method, Computer Methods and Programs in Biomedicine, 88:256-263, 2007.
The source code of the library is open,
but the library is not free software.
Some key points in the license are
The complete license text (with definitions) is here.
- The Library and/or The Results can be Used for a non-commercial or academic purpose only.
- The User is not allowed to distribute The Library to a third person.
- When The Library or The Results are Used, The Article has to be cited.
- There is no warranty of any kind.
The second condition in the list above may feel a bit strict.
It is valid for any part of the library (see the complete license):
If you write your own Matlab code that uses any part of the library,
the third party user of your code will have to obtain the license for the library from us.
are planning to distribute your own Matlab library,
in which you would like to include something from our BEM library,
I believe we can reach an agreement.
How to Get the Library?
The library is available from Matti Stenroos.
Send email to with following information:
After receiving the necessary information from you,
we will email you the license file and ask you to accept that.
After knowing that you have read, understood, and accepted the license,
we will email you the library in one zip file of about 200 kilobytes.
Here we have some example scripts, which utilize the BEM library in various problems
- Your name and email address, possibly other contact information
- Institution info, for example the university, laboratory, research group, etc.
- Leader of your research group (if you work in a research group...)
- Intended use of the library
- (Other interesting things, like the www-page of your group.)
References and Examples
Here we will list publications,
in which the library has been used.
If you use the library for something that you publish, please send us information so that we can link/refer to your work here!
The pre-release versions of our BEM library has so far been used in following papers:
Stenroos M, Lindholm M, Vesterinen P, Kylmälä M, Konttila T, Dabek J, and Väänänen H:
Electrocardiographic detection and quantification of acute myocardial ischemia with dipole modeling,
Computers in Cardiology 2006, 33:29-32, 2006.
Stenroos M, Hänninen H, Lindholm M, Tierala I, and Katila T:
Lead field formulation for epicardial potential in electrocardiographic localization of acute myocardial ischemia,
IFMBE Proceedings, 11:2265-1 - 2265-5, 2005.
Stenroos M, Lindholm M, Hänninen H, Tierala I, Väänänen H, and Katila T:
Dipole modeling in electrocardiographic classification of acute ischemia,
Computers in Cardiology 2005, 32:655-658, 2005.
Department of Biomedical Engineering and Computational Science
at Helsinki University of Technology,
BioMag-laboratory: our institutions.
a free Matlab toolkit for magnetoencephalography (MEG) and electroencephalography (EEG) analysis.
another Matlab toolkit for MEG and EEG analysis.
a nice tool for studying the genesis of the ECG,
created by Prof. Adriaan van Oosterom and
Rob MacLeod's links to research groups related to bioelectromagnetism.
The Boundary Element Method: a web resource on BEM, contains some Fortran codes.
Mesh generation software: a link list by Robert Schneiders
GiD: The personal pre and postprocessor: a program for mesh generation, contains free evaluation version (up to 1000 nodes per mesh).
QTriplot: an interactive program for displaying triangle meshes and data on them by Thom Oostendorp.
Comments are welcome!
Last modified: Aug 18 2008 by Matti Stenroos,