Keywords

1 Introduction

The human brain consists of \(\approx 8.6 \cdot 10^{10}\) neuronal cells and modeling neuronal signal transmission in large networks of neurons has become extremely important recently. The electrical signal is often described by means of point process simulations, which describes neuronal activity by ordinary partial differential equations, i.e. only the change of the membrane potential in time is considered. The traditional cable equation describes the electrical signal by means of a partial differential equation, which considers the changes in the membrane potential in time and in one space dimension. The underlying assumption states that current of the core conductor flows parallel to the cylinder axis along the x-axis, neglecting the other space dimensions.

An electrical model considering all three space dimensions was first introduced by [1]. The three dimensional cable equation can be derived from Gauss’ law, which states: \(\nabla \cdot \vec {E} = \frac{\rho }{\epsilon _0}\) and conservation of charge: \(\nabla \cdot \vec {J} = - \frac{\partial \rho }{\partial t}\). Since we assume static magnetic fields, the electric field can be expressed as the gradient of the potential: \(\vec {E} = - \mathbf {\nabla } \varPhi \). The membrane potential is defined as the potential difference between the intra- and extracellular space: \(V_m = \varPhi _{in} - \varPhi _{out}\). Thus a three dimensional model of the cable equation can be described by the following system of PDEs:

$$\begin{aligned} - \nabla \cdot (\sigma _{in} \nabla \varPhi _{in} )&= 0&\text { in } \, \varOmega _{in} \nonumber \\ -\sigma _{in} \nabla \varPhi _{in} \cdot \vec {n}_{in \rightarrow out}&= c_m \frac{dV_m}{dt} + j_{mem} \, \,&\text { on } \, \varGamma \end{aligned}$$
(1)
$$\begin{aligned} - \nabla \cdot ( \sigma _{out} \nabla \varPhi _{out})&= 0&\text { in } \, \varOmega _{out} \nonumber \\ -\sigma _{out} \nabla \varPhi _{out} \cdot \vec {n}_{out \rightarrow in}&= -c_m \frac{dV_m}{dt} - j_{mem}&\text { on } \, \varGamma \end{aligned}$$
(2)

\(\sigma _{in}\) and \(\sigma _{out}\) describe the conductivity in the intracellular and extracellular medium. The membrane currents are composed of an input current and Hodgkin Huxley currents [2]:

$$\begin{aligned} j_{mem}&= g_K \cdot n^4 \cdot (V_m - E_K) + g_{Na} \cdot m^{3} \cdot h \cdot (V_m - E_{Na}) + g_L \cdot (V - E_L) \end{aligned}$$

where

$$\begin{aligned} \frac{di}{dt}&= \frac{i_\infty - i(t)}{\tau _i} \\ \tau _i&= \frac{1}{\alpha _i(V_m) + \beta _i(V_m)}\\ i_\infty&= \frac{\alpha _i(V_m)}{\alpha _i(V_m) + \beta _i(V_m)} \end{aligned}$$

where \(i = \{n, m, h\}\). The result of \(\frac{di}{dt} = \frac{i_\infty - i(t)}{\tau _i}\) is computed in such a way that it is used as right hand side in \(\frac{di}{dt} = f\), which will make the solution of that ODE with the explicit Euler method the analytical solution for one time step with constant \(V_m\):

$$\begin{aligned} \frac{di}{dt}&= \frac{i_\infty - i(t)}{\tau _i}\\&\Leftrightarrow \frac{-\frac{di}{dt}}{i_\infty (V_m)-i} = -\frac{1}{\tau _i(V_m)}\\&\Leftrightarrow \int \limits _t^{t+\varDelta t} \frac{-\frac{di}{dt}}{i_\infty (V_m)-i} = -\int \limits _t^{t+\varDelta t} \frac{1}{\tau _i(V_m)}\\&\Leftrightarrow \log \left( \frac{i_\infty (V_m) - i_{k+1}}{i_\infty (V_m) - i_{k}}\right) = \frac{- \varDelta t }{\tau _i (V_m)}\\&\Leftrightarrow \frac{i_\infty (V_m) - i_{k+1}}{i_\infty (V_m) - i_{k}} = \exp \left( \frac{- \varDelta t }{\tau _i (V_m)}\right) \\&\Leftrightarrow i_{k+1} = i_\infty (V_m) - (i_\infty (V_m) - i_{k}) \exp \left( \frac{- \varDelta t }{\tau _i (V_m)}\right) \end{aligned}$$

Since neurons have a complex three dimensional geometry resulting in a huge number of degrees of freedom (DoF) efficient solving strategies are necessary. Weak scaling was tested for an AMG-GMG hybrid solver setup on a relatively simple geometry.

2 Neuronal Reconstructions for Simulations and Geometries

The database neuromorpho.org gives free access to a wide range of experimentally reconstructed neurons in terms of swc files [3], which contain coordinate and diameter information. Since neuronal reconstructions often display errors, such as neurite-neurite intersections or sharp curves, with regard to 3D-reconstructions, corrections were performed interactively in ProMesh [4]. To solve the partial differential equations on a suitable domain a water-tight surface mesh was created from a layer 3 pyramidal cell from primary rat motor cortex (M1) [5] downloaded from Neuromorpho.org using AnaMorph [6] in a first step. This tool ensures that the aspect ratio is close to 1 which is necessary in Finite Volume discretization. Subsequently, a subset for the outer space was created in and tetrahedrization was realized with ProMesh [4, 7] (see Fig. 1). As this results in quite complex geometries with a total of 3.915.236 DOFs (increasing with an increase in refinements) for the described problem, a minimal test geometry, replacing the neuronal geometry with a simple cube (see Fig. 1 right), was built with ProMesh to investigate weak scaling for this model.

Fig. 1
figure 1

3D reconstruction of a pyramidal cell from rat motor cortex in extracellular medium (left). Close up of section of reconstructed and tetrahedralized cell (middle). Simplified geometry for test computations (right). color map: lime green: dendrite, red: myelin, purple: conducting membrane, and pink: injection site, lavender: extracellular medium, sky blue: intracellular medium

3 Simulation Setup

UG4 is a simulation environment designed to efficiently solve partial differential equations on unstructured grids, with a strong focus on high performance computing. It provides a great variety of numerical solvers. For computation of the system of equations (12), the domain of the cube was distributed to 6–3072 cores on Hazel Hen. A well-balanced distribution of the neuronal surface components (\(\varGamma \)) was ensured by the ParMetis library, which becomes especially important when calculating on the complex structure of neurons. The change of the membrane potential in time was investigated for 10 ms, with a 5–6 ms long stimulus of 900 \(\frac{\text {C}}{\text {mV } \text {ms } \mu \text {m}^2}\).

The system of PDEs was solved with a geometric multigrid (GMG) with a Gauss Seidel preconditioner. GMG convergence was strongly increased with an increasing number of pre- and post-smoothing steps (optimal = 80). An algebraic multigrid (AMG), with Gauss Seidel smoother, was chosen as base solver for the GMG. As base solver for the AMG SuperLU [8] was selected.

4 Results

As shown in Fig. 2 an action potential can be observed on the cube membrane (\(\varPhi _{in}\)). The extracellular signal (\(\varPhi _{out}\)) displays the same behavior as in neuron morphologies, but is much smaller (minimal amplitude in neuron: \(\approx \)-0.03 mV; minimal amplitude in cube: −4.8\(\cdot \) 10\(^{-5}\) mV). Thus it can be assumed that the morphology has an influence on the characteristics and size of the extracellular potential.

Fig. 2
figure 2

Intracellular and extracellular potential changes in time (left). Cross section of intracellular and extracellular potential after 1.14 ms (right)

It has been shown in the past, that the GMG implemented in UG4 shows good weak scalability [4] and as we want to calculate large realistic networks in the future, we tested the GMG-AMG hybrid for our coupled system of partial differential equations on the cube grid. Table 1 shows the time taken for certain solving steps in seconds. As this is a time dependent problem, the mean time of time step preparation, right hand side assembly and solving is given. Overall 500 time steps were performed. Domain loading, distribution and refinement and system assembly is only performed once.

Table 1 Study of weak scalability

It can be assumed from Table 1 that solving and assembly, which are of major importance, are not yet scaling well.

For the given geometry the convergence rate of the AMG is \(\approx 0.15\), the convergence rate of the GMG is \(\approx 0.003 - 0.008\). AMG convergence becomes even worse for the more complex geometries of neuronal reconstructions and thus improving AMG convergence is necessary.

5 Discussion

This was the first investigation of weak scalability of the system of partial differential equations describing the electric properties of neurons in three space dimensions. Currently the solver setup is still optimized. The investigation of the given problem shows no weak scalability, which requires a closer investigation of the properties of the assembled matrix. Furthermore, AMG convergence has to be improved in order to compute digitally reconstructed neurons in three space dimensions.