Vulpes  0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
Loading...
Searching...
No Matches
Fisher-Kolmogorov Assembly (DG)

Author: Nicola De March nicol.nosp@m.a.de.nosp@m.march.nosp@m.@pol.nosp@m.imi.i.nosp@m.t

This tutorial discusses the specific formulation currently assembled in Vulpes in examples/assembly/fisher-kolmogorov/fk_assembly.hpp, for both the Fisher-Kolmogorov and the modified Fisher-Kolmogorov models.

The diffusion part is the interior penalty DG Laplacian of 02_Laplacian_Assembly.md, with the flux \(\mathbf{D}\nabla u\) in place of \(\nabla u\).

1) DG Formulation of Fisher-Kolmogorov

Consider the problem

\[u_t - \nabla\cdot(\mathbf{D}\nabla u) - R(u) = f \quad \text{in } \Omega \times (0,T], \]

with initial condition \(u(0,x) = u_0(x)\) and the anisotropic diffusion tensor

\[\mathbf{D} = d_{ext}\,\mathbf{I} + d_{axn}\,\mathbf{a}\otimes\mathbf{a}. \]

The reaction term is

\[R(u) = \alpha u - \alpha u^2 \quad \text{(Fisher-Kolmogorov)}, \qquad R(u) = \alpha |u| - \alpha |u|\,u \quad \text{(modified)}. \]

The two models coincide for \(u \ge 0\).

After the DG discretisation in space, the semidiscrete system is

\[M \frac{dU}{dt} + A U + N(U^*)\,U = g(U^*) + F(t), \]

where \(M\) is the mass matrix, \(A\) the static operator, \(N\) and \(g\) the reaction linearised around \(U^*\), and \(F\) the forcing and Dirichlet data. The two models differ only in how the reaction is split:

\(A\) \(N(u^*)\) \(g(u^*)\)
Fisher-Kolmogorov \(A_{diff} - \alpha M\) \(\int_K \alpha\, u^*\, u\, v\) none
modified \(A_{diff}\) \(\int_K \alpha\, \lvert u^*\rvert\, u\, v\) \(\int_K \alpha\,\lvert u^*\rvert\, v\)

In the modified model \(|u^*|\) is evaluated at the quadrature nodes, not on the modal coefficients.

2) Code Notations in the Fisher-Kolmogorov Example

From examples/assembly/fisher-kolmogorov/fk_assembly.hpp, the current code defines:

  • Stiffness term (wf_stiff), with the linear reaction for Fisher-Kolmogorov only:

    \[\int_K \mathbf{D}\nabla u\cdot\nabla v\,dx - \alpha\int_K u\,v\,dx. \]

  • Mass term (wf_mass):

    \[\int_K u v\,dx. \]

  • Same-cell consistency term (wf_IA):

    \[\int_{\partial K} bc\,(\mathbf{D}\nabla u\cdot n)\,v\,ds, \qquad bc = \begin{cases} -\tfrac12 & \text{interior face},\\ -1 & \text{boundary face, Dirichlet data},\\ 0 & \text{boundary face, homogeneous Neumann data}. \end{cases} \]

  • Same-cell penalty term (wf_SA):

    \[\int_{\partial K} \gamma\,u\,v\,ds. \]

  • Neighbour coupling terms (wf_IAn, wf_SAn):

    \[\int_e \tfrac12\,(\mathbf{D}\nabla u\cdot n)\,v_{\mathrm{neigh}}\,ds, \qquad -\int_e \gamma\,u\,v_{\mathrm{neigh}}\,ds. \]

  • Nonlinear reaction (wf_nl_matrix, and wf_nl_vector for the modified model):

    \[\int_K \alpha\,u^*\,u\,v\,dx \quad\text{or}\quad \int_K \alpha\,|u^*|\,u\,v\,dx, \qquad \int_K \alpha\,|u^*|\,v\,dx. \]

The penalty \(\gamma\) is scaled by the largest eigenvalue of \(\mathbf{D}\), \(d_{ext}+d_{axn}\). As for the Laplacian,

\[A = K + IA + IA^t + SA + IAn + IAn^t + SAn, \]

assembled once, while \(N\) and \(g\) are assembled at every time step. The system is advanced in time with CrankNicolsonGeneralized, with \(U^* = \tfrac32 U^n - \tfrac12 U^{n-1}\).

The model and the dimension are selected at compile time in examples/assembly/fisher-kolmogorov/fk_physics.hpp:

inline constexpr std::size_t dim = 3; // 2 or 3
inline constexpr bool modified_fk = false; // true: modified Fisher-Kolmogorov

3) Run

From the build directory.

Brain simulation

mpirun -n 4 ./fk_main ../examples/assembly/fisher-kolmogorov/fk_main_parameters.json [order] [mesh_file]

To run on a brain mesh, set in the JSON file the mesh and a seed problem (homogeneous Neumann data):

"mesh": { "file": "/path/to/brain.vtu" },
"problem": {
"type": "seed",
"seed": { "center": [0.0, -60.0, -18.0], "sigma": 10.0 }
}

Output is written under output/fk_main/ and includes solution snapshots (.pvtu) and the time history of the total amount of \(u\).

Convergence test

mpirun -n 4 ./fk_main_convergence ../examples/assembly/fisher-kolmogorov/fk_main_convergence_parameters.json [order]

The problem (sine by default, with exact solution) is solved on the meshes listed in mesh.files. The \(L^2\) and \(H^1\)-seminorm errors and the convergence table are written under output/fk_convergence/.