There's a start of this in multigrid-hitting-times.R, but it is (maybe?) having issues around convergence, possibly because the boundary of the set that's getting hit becomes jagged for the coarser grids.
start at coarse, exact solution (on 512x), try to push up to fine grid (256x or maye 128x)
plot state after each update as that happens, and difference to true solution (still exactly solvable), on map, and one against the other (x vs y)
Possible issues:
updates have conservation of mass, except near hole it's trying to hit so if it's off by a constant, mass has to propagate out from there.
beware of being driven by high-hitting time locations
shape of region trying to hit actually changes: trying to solve different problems
near boundary pushing up/down from different grid sizes might not be very close to the right thing
Things to try:
Jacobi updates instead of gradient-based
separately fit overall scaling and shift constants
add constraints to match known hitting times obtained from coarse grid, to help pin down solution and identify overall constant (solve interpolation problem rather than hitting time problem)
There's a start of this in
multigrid-hitting-times.R
, but it is (maybe?) having issues around convergence, possibly because the boundary of the set that's getting hit becomes jagged for the coarser grids.