62e6cc4Simplify UI text and built-in .m script commentsJeremy Magland 1% Allen-Cahn on a closed surface: interfaces form, then coarsen.
3% du/dt = eps2*lap_g(u) + u - u^3
4%
62e6cc4Simplify UI text and built-in .m script commentsJeremy Magland 5% Same scheme as models/schnakenberg.m.
0af3386Reaction-diffusion on spherical-harmonic surfacesJeremy Magland 6
7function [U, u] = init(noise)
8 U = analys(noise);
9 u = synth(U);
10end
591a4f5Reduce the Laplace-Beltrami matvec to 6 transforms per species per iterationDan Fortunato 12function [Un, u] = step(U, lam, filt, gx, gy, gz, p1, p2, q2, r, eps2, dt, niter)
15 Bu = U + dt * analys(u - u.^3);
16 Un = Bu ./ (1 + (dt * eps2) * lam);
18 for k = 1:niter
591a4f5Reduce the Laplace-Beltrami matvec to 6 transforms per species per iterationDan Fortunato 19 % dlap = lap_g - lap_s, evaluated at the current iterate in flux form
20 % (see models/schnakenberg.m, docs/richardson-iteration.md and
a4fee9cBatch independent transforms through one Legendre dispatchDan Fortunato 21 % docs/reduced-transforms.md for the derivation; the grouped calls run
22 % the gradient syntheses and the flux analyses as batched dispatches).
8144287WIP: added code for Laplace-Beltrami operator evaluation on smooth genus-0 surfaceOwen Melia 23 Fu = Un .* filt;
a4fee9cBatch independent transforms through one Legendre dispatchDan Fortunato 24 vtu = dthetac(Fu);
25 vpu = dphic(Fu);
26 [Ftu, Fpu] = synth(vtu, vpu);
591a4f5Reduce the Laplace-Beltrami matvec to 6 transforms per species per iterationDan Fortunato 27 Pu = p1 .* Ftu + p2 .* Fpu;
28 Qu = p2 .* Ftu + q2 .* Fpu;
a4fee9cBatch independent transforms through one Legendre dispatchDan Fortunato 29 [PAu, QAu] = analys(Pu, Qu);
30 Pcu = PAu .* filt;
31 Qcu = QAu .* filt;
591a4f5Reduce the Laplace-Beltrami matvec to 6 transforms per species per iterationDan Fortunato 32 scu = dthetac(Pcu) + dphic(Qcu);
33 lapu = r .* synth(scu);
8144287WIP: added code for Laplace-Beltrami operator evaluation on smooth genus-0 surfaceOwen Melia 34 dLu = analys(lapu) + lam .* Un;
0af3386Reaction-diffusion on spherical-harmonic surfacesJeremy Magland 36 Un = (Bu + (dt * eps2) * dLu) ./ (1 + (dt * eps2) * lam);
37 end
38end