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%
3d078cfSplit the flux-form divergence against the round sphereDan Fortunato 5% Same scheme as models/schnakenberg.m, sphere-split flux divergence included.
0af3386Reaction-diffusion on spherical-harmonic surfacesJeremy Magland 6
0ae15cfSeed runs from smooth random fields, and add the blob geometryDan Fortunato 7% Seeded from a smooth random field -- see models/schnakenberg.m.
8function [U, u] = init(lam3, gx, gy, gz)
9 U = analys(0.01 * randnfun3(lam3, gx, gy, gz));
11end
3d078cfSplit the flux-form divergence against the round sphereDan Fortunato 13function [Un, u] = step(U, lam, filt, gx, gy, gz, p2, r, dp1, dq2, jinv, jhat, eps2, dt, niter)
16 Bu = U + dt * analys(u - u.^3);
e4d6a3bPrecondition with the operator's symbol; project the correction onto the bandDan Fortunato 17
18 % Mean-J preconditioning -- see models/schnakenberg.m.
19 lamJ = lam ./ jhat;
20 Un = Bu ./ (1 + (dt * eps2) * lamJ);
0af3386Reaction-diffusion on spherical-harmonic surfacesJeremy Magland 21
22 for k = 1:niter
591a4f5Reduce the Laplace-Beltrami matvec to 6 transforms per species per iterationDan Fortunato 23 % dlap = lap_g - lap_s, evaluated at the current iterate in flux form
24 % (see models/schnakenberg.m, docs/richardson-iteration.md and
a4fee9cBatch independent transforms through one Legendre dispatchDan Fortunato 25 % docs/reduced-transforms.md for the derivation; the grouped calls run
26 % the gradient syntheses and the flux analyses as batched dispatches).
8144287WIP: added code for Laplace-Beltrami operator evaluation on smooth genus-0 surfaceOwen Melia 27 Fu = Un .* filt;
a4fee9cBatch independent transforms through one Legendre dispatchDan Fortunato 28 vtu = dthetac(Fu);
29 vpu = dphic(Fu);
3d078cfSplit the flux-form divergence against the round sphereDan Fortunato 30 [Ftu, Fpu, Su] = synth(vtu, vpu, lam .* Fu);
31 Pu = dp1 .* Ftu + p2 .* Fpu;
32 Qu = p2 .* Ftu + dq2 .* Fpu;
a4fee9cBatch independent transforms through one Legendre dispatchDan Fortunato 34 Pcu = PAu .* filt;
36 Lu = synth(scu);
37 dQu = dphig(Qu);
3d078cfSplit the flux-form divergence against the round sphereDan Fortunato 38 lapu = r .* (Lu + dQu) - jinv .* Su;
e4d6a3bPrecondition with the operator's symbol; project the correction onto the bandDan Fortunato 39 dLu = (analys(lapu) + lamJ .* Un) .* filt;
8144287WIP: added code for Laplace-Beltrami operator evaluation on smooth genus-0 surfaceOwen Melia 40
e4d6a3bPrecondition with the operator's symbol; project the correction onto the bandDan Fortunato 41 Un = (Bu + (dt * eps2) * dLu) ./ (1 + (dt * eps2) * lamJ);
43end