0af3386Reaction-diffusion on spherical-harmonic surfacesJeremy Magland 1% Allen-Cahn on a closed surface. One species: interfaces form and then coarsen
2% until one domain swallows the surface.
3%
4% du/dt = eps2*lap_g(u) + u - u^3
5%
6% See models/schnakenberg.m for what the caller provides and for how the
7% implicit solve is split between the round-sphere operator and the geometry.
9function [U, u] = init(noise)
10 U = analys(noise);
11 u = synth(U);
12end
14function [Un, u] = step(U, lam, gx, gy, gz, eps2, dt, niter)
15 u = synth(U);
17 Bu = U + dt * analys(u - u.^3);
18 Un = Bu ./ (1 + (dt * eps2) * lam);
20 for k = 1:niter
21 % ---- placeholder: dlap = lap_g - lap_s (see models/schnakenberg.m) ----
22 dLu = 0 * Un;
23 % ----------------------------------------------------------------------
24 Un = (Bu + (dt * eps2) * dLu) ./ (1 + (dt * eps2) * lam);
25 end
26end