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
e4d6a3bPrecondition with the operator's symbol; project the correction onto the bandDan Fortunato 12function [Un, u] = step(U, lam, filt, gx, gy, gz, p1, p2, q2, r, jhat, eps2, dt, niter)
15 Bu = U + dt * analys(u - u.^3);
e4d6a3bPrecondition with the operator's symbol; project the correction onto the bandDan Fortunato 16
17 % Mean-J preconditioning -- see models/schnakenberg.m.
18 lamJ = lam ./ jhat;
19 Un = Bu ./ (1 + (dt * eps2) * lamJ);
0af3386Reaction-diffusion on spherical-harmonic surfacesJeremy Magland 20
21 for k = 1:niter
591a4f5Reduce the Laplace-Beltrami matvec to 6 transforms per species per iterationDan Fortunato 22 % dlap = lap_g - lap_s, evaluated at the current iterate in flux form
23 % (see models/schnakenberg.m, docs/richardson-iteration.md and
a4fee9cBatch independent transforms through one Legendre dispatchDan Fortunato 24 % docs/reduced-transforms.md for the derivation; the grouped calls run
25 % the gradient syntheses and the flux analyses as batched dispatches).
8144287WIP: added code for Laplace-Beltrami operator evaluation on smooth genus-0 surfaceOwen Melia 26 Fu = Un .* filt;
a4fee9cBatch independent transforms through one Legendre dispatchDan Fortunato 27 vtu = dthetac(Fu);
28 vpu = dphic(Fu);
29 [Ftu, Fpu] = synth(vtu, vpu);
591a4f5Reduce the Laplace-Beltrami matvec to 6 transforms per species per iterationDan Fortunato 30 Pu = p1 .* Ftu + p2 .* Fpu;
31 Qu = p2 .* Ftu + q2 .* Fpu;
a4fee9cBatch independent transforms through one Legendre dispatchDan Fortunato 33 Pcu = PAu .* filt;
35 Lu = synth(scu);
36 dQu = dphig(Qu);
37 lapu = r .* (Lu + dQu);
e4d6a3bPrecondition with the operator's symbol; project the correction onto the bandDan Fortunato 38 dLu = (analys(lapu) + lamJ .* Un) .* filt;
8144287WIP: added code for Laplace-Beltrami operator evaluation on smooth genus-0 surfaceOwen Melia 39
e4d6a3bPrecondition with the operator's symbol; project the correction onto the bandDan Fortunato 40 Un = (Bu + (dt * eps2) * dLu) ./ (1 + (dt * eps2) * lamJ);
42end