An algorithm for solving Poisson's Equation, optimized for parallel processing.

About Parallel Poisson Solver


This is Poisson's equation:

Screenshot_2024-09-20_23-09-36-smal.png

To roughly transliterate it, it says 'The rate of change of the slope of phi is f', where phi and f are usually 2D or 3D scalar fields. In practice, that usually boils down to a large array of floats.

There are several fields of study where it shows up, and often, the f is known, while phi needs to be found, based on this equation. That is what Poisson solvers do.

A while back, I was making a fluid simulator, and I needed a Poisson solver as well. As I was working in an array language at the time (uiua), I started thinking about how I would make something like that with an eye on parallel processing, and I came up with a fun technique for it. However, I never ended up testing the actual characteristics of the technique with respect to 'known' techniques. (for example: how fast it converges to a solution)

So, for this year's wheel reinvention jam I am going to reimplement the algorithm in a systems language, and for the GPU, to get some proper data on how fast (and maybe useful) it can be. With this, I'll also make some proper documentation, so that people can follow along somewhat!

Read more
Filters

Recent Activity

Did you know you can use a Poisson solver to solve for field lines on an arbitrary distribution?
Field lines 'follow the flow', and they are super useful for visualizing flow fields or charge distributions
&pps

View original message on Discord

Not a lot of super cool pictures that actually mean anything for day 2 of &pps, but I've implemented 'my' algorithm (which I've taken to calling the 'kernel solver') for the CPU (for now), and I was surprised to learn that, when compiled with odin's optimizer, it was actually faster, as well as more efficient, than Successive Overrelaxation
That bodes well!
A lot more characterizing and visualisations have to be done though

View original message on Discord

Accidentally created something that looks like sunset/dawn with &pps
Doing math visualizations is always fun because of stuff like this

View original message on Discord

These are the results of a simple Poisson solver benchmark (I made some reference implementations to compare against), and I'm working on some colourmaps
Currently manually inputting colour values in the code, which is a little janky
Hoping to switch to OKLAB at some point too, instead of lerping rgb hahaha
&pps

View original message on Discord