... | @@ -6,7 +6,7 @@ Depending on the choice of discretization, there are different ways to construct |
... | @@ -6,7 +6,7 @@ Depending on the choice of discretization, there are different ways to construct |
|
|
|
|
|
# Python and Matlab interface
|
|
# Python and Matlab interface
|
|
|
|
|
|
From the Python and Matlab bindings, the interfaces are very similar. In Python, parameters are passed using a configurations dictionary, an example is shown below:
|
|
From the Python and Matlab bindings, the interfaces are very similar. In Python, parameters are passed using a configuration dictionary, an example is shown below:
|
|
|
|
|
|
```
|
|
```
|
|
import duneuropy as dp
|
|
import duneuropy as dp
|
... | @@ -35,29 +35,41 @@ driver = duneuro_meeg(cfg); |
... | @@ -35,29 +35,41 @@ driver = duneuro_meeg(cfg); |
|
```
|
|
```
|
|
|
|
|
|
# Parameters
|
|
# Parameters
|
|
The driver requires information about the volume conductor model which differs between fitted (CG, DG) finite element methods and unfitted (UDG) methods. In the following, these options are discussed in more detail.
|
|
The driver requires information about the FEM discretization and volume conductor model which differs between fitted (CG, DG) and unfitted (UDG) finite element methods. In the following, these options are discussed in more detail.
|
|
|
|
|
|
## General Parameters
|
|
## General Parameters
|
|
First, the general discretization type needs to be indicated.
|
|
First, the general discretization type needs to be indicated.
|
|
- **type : {‘fitted’, ‘unfitted’}**
|
|
- **type : {‘fitted’, ‘unfitted’}**
|
|
fitted implies that a mesh will be provided and standard CG- or DG-FEM can be used, while unfitted implies that the mesh does not resolve the geometry and UDG-FEM can be used
|
|
Fitted implies that a mesh will be provided and standard CG- or DG-FEM can be used, while unfitted implies that the mesh does not resolve the geometry and UDG-FEM can be used
|
|
- **'solver_type': {‘cg’, ‘dg’, ‘udg’}**
|
|
- **'solver_type': {‘cg’, ‘dg’, ‘udg’}**
|
|
the FEM discretization, either (standard) Continuous, Discontinuous or Unfitted Disontinuous Galerkin Methods are supported
|
|
The FEM discretization, either (standard) Continuous, Discontinuous or Unfitted Disontinuous Galerkin Methods are supported
|
|
|
|
|
|
## Volume conductor parameters
|
|
## Volume conductor parameters
|
|
|
|
There are different options how to define the volume conductor model which differ between fitted and unfitted methods.
|
|
|
|
|
|
### Fitted volume conductor (CG, DG)
|
|
### Fitted volume conductor (CG, DG)
|
|
- **'element_type' = {‘tetrahedron, 'hexahedron'}**
|
|
- **'element_type' = {‘tetrahedron, 'hexahedron'}**
|
|
The element type of the mesh
|
|
The element type of the mesh
|
|
|
|
|
|
For the creation of the volume conductor, there are 2 possible ways:
|
|
For the creation of the volume conductor, there are 2 possible ways:
|
|
1. **volume_conductor.grid.filename = path to .msh, .dgf, or .geo**
|
|
|
|
**volume_conductor.tensors.filename = path to .cond or .knw**
|
|
1.)
|
|
|
|
- **'volume_conductor.grid.filename' = string**
|
|
2. **'volume_conductor.grid.elements' = elements**
|
|
The mesh can be passed using on eof the folloing file formats: .msh (gmsh file format), .dgf (DUNE file format), or .geo (SimBio file format)
|
|
**'volume_conductor.grid.nodes' = nodes**
|
|
- **'volume_conductor.tensors.filename' = string**
|
|
**'volume_conductor.tensors.labels' = labels**
|
|
The conductivities can be passed using these file formats: a plain text file listing the conductivities in the order of the labels (e.g., using endings .dat or .cond), or .knw (SimBio file format)**
|
|
**'volume_conductor.tensors.conductivities' = list**
|
|
|
|
**'volume_conductor.tensors.tensors' = list**
|
|
2.)
|
|
|
|
- **'volume_conductor.grid.elements' = int (#elements x 4 (tet.) or 8 (hex.)**
|
|
|
|
Each element is defined by the indices of nodes that belong to it, the lowest node index is assumed to be 0.
|
|
|
|
- **'volume_conductor.grid.nodes' = double (#nodes x 3)**
|
|
|
|
List of node positions
|
|
|
|
- **'volume_conductor.tensors.labels' = int (#elements x 1)**
|
|
|
|
Index defining to which tissue type an element belongs (starting at 0).
|
|
|
|
- **'volume_conductor.tensors.conductivities' = double (#labels x 1)**
|
|
|
|
Isotropic conductivities are passed, corresponding to the order of labels defined above.
|
|
|
|
- **'volume_conductor.tensors.tensors' = double (#labels x 9)**
|
|
|
|
Anisotropic conductivity tensors are given row/column-wise for each labels.
|
|
|
|
|
|
### Unfitted volume conductor (UDG)
|
|
### Unfitted volume conductor (UDG)
|
|
- **'compartments' = int**
|
|
- **'compartments' = int**
|
... | | ... | |