#multigrid — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #multigrid, aggregated by home.social.
-
Trying to improve my multigrid algorithm for calculating the potential field. I am using two grids, the fine one and the coarse one which is 20 times as wide. First I do 20 fine iterations, then 60 coarse ones, then I interpolate to the fine grid and do another 20 there.
I use the jacobi iteration step which is to take the average of the 4 adjacent grid values and add the value of the source of the point times the step size.
This means the source term matters a lot for the coarse iteration. This is a problem because depending on the location of the particle there is one or up to four coarse grid vertices within its radius. This makes a huge difference on their effect. (spot the tiny yellow dots: they are the same mass&radius as the others).I want to do many coarse steps to get some reach fast.
Alternating between coarse&fine steps is not good because the portals make the interpolation rather expensive.Maybe I need to distribute my mass more naturally within the radius: more dense in the center, less so in the periphery...
-
The difficult part about using multigrid technique with portals present is interpolating the values of the coarse grid back to the fine grid.
In my simple 2grid v-cycle I just avoided the problem by just allowing portals on the middle linea between the coarse vertices. So passsing a portal doesn't change the grid. But if I want multiscale grids that is a harsh limitation.One idea is to first spread out the coarse grid values voronoi-style and then do some smoothing interpolation.
Other ideas? Calculation-cheap ideas?