-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize the Jacobi method and add documentation
Moved the stencil to the outer loop. Added documentation to the library and readme.
- Loading branch information
Showing
6 changed files
with
113 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
target | ||
Cargo.lock | ||
examples/fluid-frame*.ppm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,19 @@ | ||
# Jacobi solver | ||
|
||
This small library computes the [jacobi | ||
iteration](https://en.wikipedia.org/wiki/Jacobi_method) using a given | ||
[stencil](https://en.wikipedia.org/wiki/Stencil_code). | ||
|
||
# Fluid example | ||
|
||
An example of using the jacobi method to solve the discrete pressure Poisson | ||
equation that arrises in fluid simulation is given. The fluid simulation example | ||
can be run through Cargo, and the resulting .ppm frames can be assembled with | ||
ffmpeg: | ||
|
||
~~~bash | ||
cargo run --release --example fluid | ||
sips -s format png out.ppm --out png; open png | ||
|
||
ffmpeg -y -r 60 -f image2 -i examples/fluid-frame%d.ppm -vcodec libx264 -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 images/fluid.mp4 | ||
~~~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters