Browse Source

submitted

float
alistair 2 years ago
parent
commit
8f37532b3b
  1. 4
      CMakeLists.txt
  2. 34
      README.md

4
CMakeLists.txt

@ -5,8 +5,8 @@ cmake_minimum_required(VERSION 3.10) @@ -5,8 +5,8 @@ cmake_minimum_required(VERSION 3.10)
project(test)
#add_compile_options(-O3)
add_compile_options(-g -O3 -fno-pie -fno-builtin -ffast-math -mavx -pg --std=c++17)
add_link_options(-g -O3 -fno-pie -fno-builtin -ffast-math -mavx -pg --std=c++17)
add_compile_options(-g -O3 -fno-pie -fno-builtin -pg --std=c++17)
add_link_options(-g -O3 -fno-pie -fno-builtin -mavx -pg --std=c++17)
#add_subdirectory(lib/matplotplusplus)
#add_subdirectory(lib/fmt)

34
README.md

@ -1,5 +1,3 @@ @@ -1,5 +1,3 @@
## Compiling on Getafix
```
@ -8,4 +6,36 @@ mkdir build @@ -8,4 +6,36 @@ mkdir build
cd build
cmake3 ..
make
./test -h # print cli options
./test: invalid option -- 'h'
Invalid option
Usage:
-d x : rest density (default 1000kg)
-r x : particle radius (default 0.1m)
-m x : viscosity (default 0.0007)
-t x : timestep (default 0.0004 s)
-s path : save frames in folder path
-p path : save plot data in folder path
-l x : sim time between frames saved (default 0.033 sec)
-w x : sim time to run for (default 5 sec)
-e path : convert .bin to .txt onto stdout
-c x : room width (default 0.6)
-n x : number of particles to limit to
-v : use sdt::vector instead of spatial hash map
```
### Files
- `src/test.cpp` contains simulation main function
- `src/sphfunctions.cpp` contains SPH simulation code
- `src/sphash.hpp` contains spatial hash map and simulation_data class implementation
- `src/sphash-test.cpp` contains misc unit tests
- `src/plot_binary.py` script used for plotting used to plot the data output by default.
- `src/plot3d.py` used to plot the 3d animation frame output generated by specifying `-s`
---
```
ffmpeg -framerate 60 -pattern_type glob -i '*.png' -vf scale=1920:1080,setsar=1:1 out2.webm
```

Loading…
Cancel
Save