Heat is a real time 2D heat equation solver. It uses SDL2 to simulate a hypothetical "plate" in a 2D space and the evolution of its temperature through time.
I recently came across this beautiful YouTube playlist, where I had the opportunity to learn a little more about differential equations, so I decided to write this program with the hope of consolidating that knowledge and to learn some numerical methods for solving PDEs. I also decided to use CUDA to accelerate the computations using a GPU.
You can run the program either by using the Nix package manager (recommended) or CMake. It is mandatory that you have a CUDA capable GPU to run the program with hardware acceleration.
If you are already using Nix you should probably already know the drill.
Simply start nix-shell
inside the directory and you are done.
- Grab the latest CUDA toolkit available
- Clone this repository
- Run
cmake
inside it.
By default, GPU acceleration is ON. You can turn it off with cmake -DGPU=OFF
.