blaxill / jacobi

Simple example of the jacobi method.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jacobi solver

This small library computes the jacobi iteration using a given stencil.

Fluid example

fluid image

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:

cargo run --release --example fluid

ffmpeg -y -r 60 -f image2 -i images/fluid-frame%d.ppm -vcodec libx264 -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 images/fluid.mp4

About

Simple example of the jacobi method.


Languages

Language:Rust 100.0%