duneuro is an open-source C++ software library for solving partial differential equations in neurosciences using mesh bases methods. It is based on the DUNE library and its main features include solving the electroencephalography (EEG) and magnetoencephalography (MEG) forward problem and providing simulations for brain stimulation.
Features
- Applications
- currently implemented applications are: EEG, MEG, tDCS
- Meshes
- Tetrahedral and hexahedral meshes are implemented with support for geometry adaption
- CG-FEM
- the classical continuous Galerkin finite element method with various source models (e.g. Subtraction, St. Venant, Whitney)
- DG-FEM
- a discontinuous Galerkin finite element method
- multi-dimensional
- besides 3d simulations, 2d simulations are supported for visualization purposes
- scripting
- Python and Matlab bindings are provided for a more convenient usage
- DUNE
- the DUNE library is used for solving partial differential equations
License
The main library is dual licensed under the GNU Public License version 2 with a special runtime exception, or the Lesser GNU Public License version 3 or any later version of the latter. For specific license information, please see the LICENSE documents in the code repositories.
Download
The current development version can be found on GitLab . We are currently in the process of making duneuro publicly available, which is why you might still face some issues getting duneuro to run. In the future we plan to provide binary versions of the Python and Matlab bindings, but this is currently a work in progress.
In order to download, configure and compile duneuro, you can use the following script and configuration-files
Publications
Publications that make use of, or extend the duneuro library:
- Piastra, M. C., Nüßing, A., Vorwerk, J., Bornfleth, H., Oostenveld, R., Engwer, C., Wolters, C. H. (2018). The Discontinuous Galerkin Finite Element Method for Solving the MEG and the combined MEG/EEG Forward Problem. Frontiers in Neuroscience: Brain Imaging Methods, accepted for publication
- Engwer, C., Vorwerk, J., Ludewig, J., & Wolters, C. H. (2017). A discontinuous Galerkin method to solve the EEG forward problem using the subtraction approach. SIAM Journal on Scientific Computing, 39(1), B138-B164.
- Nüßing, A., Wolters, C. H., Brinck, H., & Engwer, C. (2016). The unfitted discontinuous Galerkin method for solving the EEG forward problem. IEEE Transactions on Biomedical Engineering, 63(12), 2564-2575.
Documentation
Python bindings
Python bindings are optional and supported through the additional module duneuro-py
.
For generating python bindings, we use the pybind11 library (
GitHub
) which is included in duneuro-py
as a git submodule.
import duneuro as dp
config = {
'type' : 'fitted',
'solver_type' : 'cg',
'element_type' : 'tetrahedron',
'volume_conductor' : {
'grid.filename' : 'path/to/your/grid.msh',
'tensors.filename' : 'path/to/your/tensors.txt'
}
}
driver = dp.MEEGDriver3d(config)
Matlab bindings
Matlab bindings are optional and supported through the additional module duneuro-matlab
.
config = []
config.type' = 'fitted';
config.solver_type' = 'cg';
config.element_type' = 'tetrahedron';
config.volume_conductor.grid.filename' = 'path/to/your/grid.msh';
config.volume_conductor.tensors.filename' = 'path/to/your/tensors.txt';
driver = duneuro_meeg(config)