Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yangfengzzz/fluid-engine-swift
fluid engine developed by using Swift and Metal which is fully speeding up by using Metal Compute Shader and Grand Central Dispatch
https://github.com/yangfengzzz/fluid-engine-swift
computational-fluid-dynamics fluid-simulation-engine gpgpu gpgpu-physics metal physics-engine swift swiftui voxel
Last synced: 3 months ago
JSON representation
fluid engine developed by using Swift and Metal which is fully speeding up by using Metal Compute Shader and Grand Central Dispatch
- Host: GitHub
- URL: https://github.com/yangfengzzz/fluid-engine-swift
- Owner: yangfengzzz
- License: mit
- Created: 2020-09-15T11:17:50.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-21T02:56:15.000Z (over 4 years ago)
- Last Synced: 2024-04-23T03:06:07.534Z (9 months ago)
- Topics: computational-fluid-dynamics, fluid-simulation-engine, gpgpu, gpgpu-physics, metal, physics-engine, swift, swiftui, voxel
- Language: Swift
- Homepage:
- Size: 6.48 MB
- Stars: 31
- Watchers: 4
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This project is inspired by [fluid-engine-dev](https://github.com/doyubkim/fluid-engine-dev) which can support bunch of numerical methods like Flip and SPH. This project transfer all C++ code from [fluid-engine-dev](https://github.com/doyubkim/fluid-engine-dev) by using Swift, which is a very elegent language. Swift is a young language which have less third-party code and I found nothing about numerical simulation at all. luckily Swift 5 is ABI stable and Grand Center Dispatch is functioning well which can replace TBB very well.
GPGPU is the other reason to do this transferment. By using Swift, this project can use Metal API by not writing the Objective-C bridge (which is the common way for graphics engines to use GPU in Apple ecosystem.) you can simplely change Renderer like:
```Swift
Renderer.arch = .GPU
```GPU method will launch kernel to replace Grand Center Dispatch to accelerate the simualtion.
This project is still **on the development** which will add more render features like rayMarching and rasterization. My willingness is to use Metal to replace all Python visuallization code in [fluid-engine-dev](https://github.com/doyubkim/fluid-engine-dev) and display the simulation results on the screens simultaneously.
At last by not least, this project use the drawble object MTKView with SwiftUI. so It is easy to add button and text in GUI which can control the settings of the simualtion.