![]() |
Vulpes
0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
|
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\).
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.
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:
From the build directory.
To run on a brain mesh, set in the JSON file the mesh and a seed problem (homogeneous Neumann data):
Output is written under output/fk_main/ and includes solution snapshots (.pvtu) and the time history of the total amount of \(u\).
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/.