/ concept-collection / turing-surface
Sign in
concept-collection / turing-surface
18 lines · 584 BBlameHistoryRaw
1% Allen-Cahn on a closed surface: interfaces form, then coarsen.
2%
3% du/dt = eps2*lap_g(u) + u - u^3
4%
5% Same scheme as models/schnakenberg.m: explicit reaction, then the implicit
6% diffusion solve handed to solve(...) — the solver the app's selector picks.
8function [U, u] = init(noise)
9 U = analys(noise);
10 u = synth(U);
11end
13function [Un, u] = step(U, lam, filt, wlm, gx, gy, gz, Vtx, Vty, Vtz, Vpx, Vpy, Vpz, eps2, dt, nlm, niter)
14 u = synth(U);
16 Bu = U + dt * analys(u - u.^3);
17 Un = solve(Bu, dt * eps2, lam, filt, wlm, Vtx, Vty, Vtz, Vpx, Vpy, Vpz, nlm, niter);
18end
moveopenescclose