Affine Particle in Cell in 2D
APIC2D is an educational project to illustrate the affine-particle-in-cell algorithm in 2D, for water simulation.
The papers implemented here include:
Jiang, Chenfanfu, et al. "The affine particle-in-cell method." ACM Transactions on Graphics (TOG) 34.4 (2015): 51.
Batty, Christopher, Florence Bertails, and Robert Bridson. "A fast variational framework for accurate solid-fluid coupling." ACM Transactions on Graphics (TOG). Vol. 26. No. 3. ACM, 2007.
Ando, Ryoichi, Nils Thurey, and Reiji Tsuruno. "Preserving fluid sheets with adaptively sampled anisotropic particles." IEEE transactions on visualization and computer graphics 18.8 (2012): 1202-1214.
Dependencies
APIC2D depends on the Eigen libraries (included) as well as GLUT for simple visualization.
Compilation
To compile APIC2D, you'll need CMake on Mac OS X or Linux, or CMake-GUI (https://cmake.org) on Windows.
On Mac OS X or Linux:
- make a directory, say, build, with mkdir build, enter the build directory, type cmake ..
- Optionally you can adjust the options with ccmake .
- type make to compile the code. For speeding up the compilation process you may use make -j.
On Windows:
- open CMake-GUI, enter the correct directory for source code and build. Then click Configure, choose your installed version of the Microsoft Visual Studio.
- after configuration you may find several libraries not found, check the Advanced box and locate those missing libraries manually. Please make sure you have picked the libraries corresponding to the architecture you have selected (say, 32-bit libraries for x86, and 64-bit libraries for x64).
- click generate after fixing all missing variables to generate your Visual Studio solution.
- open the solution and compile the code.