// Controls and resolution ladders reused across chapters, so that "the smooth // case" means the same thing everywhere and two chapters can be compared. import type { Control } from '../ui/types.ts' export const KIND_CONTROL: Control = { kind: 'select', key: 'kind', label: 'manufactured solution', options: [ { value: 'smooth', label: 'smooth: exp(sin 3πx)' }, { value: 'oscil', label: 'oscillatory: sin 8πx + x' }, { value: 'peak', label: 'narrow peak at x = 0.4' }, { value: 'layer', label: 'boundary layer, width 1/50' }, { value: 'lowreg', label: 'low regularity: |x − ½|^{5/2}' }, ], } export const EXACT2D_CONTROL: Control = { kind: 'select', key: 'kind', label: 'harmonic solution', options: [ { value: 'expsin', label: 'exp(x) sin(y)' }, { value: 'poly', label: 'Re (x + iy)^5' }, { value: 'wave', label: 'exp(ky) sin(kx), k = 8' }, { value: 'log', label: 'log|z − z₀|, z₀ just outside' }, ], } export const NS_1D = [8, 16, 32, 64, 128, 256, 512, 1024] export const NS_1D_LONG = [16, 64, 256, 1024, 4096, 16384, 65536, 262144, 1048576] export const NS_2D = [8, 16, 32, 64, 128, 256]