shaoyaoqian / dcgrid

DCGrid: An Adaptive Grid Structure for Memory-Constrained Fluid Simulation on the GPU

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DCGrid

Please note: The project won't run out of the box. For managing the window, UI, user input, etc. A proprietary library was used, which I can't include here. Only main.cpp and simulation.* are affected. I'd be happy to accept a PR that allows this project to run without the library. If you're interested in helping out, feel free to reach out for any questions.

Prerequisites

  • Visual Studio 2019
  • CUDA v11.1 or later
  • VCPKG
  • C++ boost

Installation

  1. Clone the repository
  2. Open the repository in Visual Studio
  3. Run the project in Visual Studio (Preferably in "Release" or "Release with debug symbols" mode)

Controls

Key Description
N Switch between uniform and adaptive simulation
H Reset simulation
Space Toggle Pause / Running
T Toggle terrain debugging
1 Set render mode: normal
2 Set render mode: pressure
3 Set render mode: temperature
4 Set render mode: resolution
5 Set render mode: vapor
6 Set render mode: velocity
W S A D Move camera
Mousewheel Move camera back and forth

Explore the UI for further interactions.

Related paper

About

DCGrid: An Adaptive Grid Structure for Memory-Constrained Fluid Simulation on the GPU

License:GNU General Public License v3.0


Languages

Language:Cuda 48.4%Language:C++ 30.9%Language:C 18.6%Language:JavaScript 1.0%Language:CMake 1.0%Language:GLSL 0.2%