(bind-func fluid_lin_solve
(lambda (b:i64 x:double* x0:double* a c iter:i64 Ny:i64 N:i64)
(let ((cRecip (/ 1.0 c))
(k 0)
(m 0)
(j 0)
(i 0))
(dotimes (k iter)
(dotimes (j (- Ny 1))
(dotimes (i (- N 1))
(pset! x (+ (+ i 1) (* (+ j 1) N))
(* cRecip
(+ (pref x0 (+ (+ i 1) (* (+ j 1) N)))
(* a (+ (pref x (+ (+ i 2) (* (+ j 1) N)))
(pref x (+ i (* (+ j 1) N)))
(pref x (+ (+ i 1) (* (+ j 2) N)))
(pref x (+ (+ i 1) (* j N)))))))))))
(fluid_set_boundary b x Ny N))
1))