fluid_project   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/contrib/fluids_2d.xtm

Implementation

(bind-func fluid_project
  (lambda (velocx:double* velocy:double* p:double* div:double* iter Ny N)
    (let ((j 0)
          (i 0)
          (jj 0)
          (ii 0))
      (dotimes (j (- Ny 1))
        (dotimes (i (- N 1))
          (pset! div (+ (+ i 1) (* (+ j 1) N))
                 (* -0.5 (/ (+ (- (pref velocx (+ (+ i 2) (* (+ j 1) N)))
                                  (pref velocx (+ i (* (+ j 1) N))))
                               (- (pref velocy (+ (+ i 1) (* (+ j 2) N)))
                                  (pref velocy (+ (+ i 1) (* j N)))))
                            (i64tod N))))
          (pset! p (+ (+ i 1) (* (+ j 1) N)) 0.0)
          1))


Back to Index

Similar Entries

  • cpvproject    xtlang
  • fill_projection_matrix    xtlang
  • fill_projection_matrix    xtlang
  • fill_projection_matrix    xtlang
  • fluid-advect    xtlang
  • fluid-advect    xtlang
  • fluid-cube-add-density    xtlang
  • fluid-cube-add-density    xtlang
  • fluid-cube-add-velocity    xtlang
  • fluid-cube-add-velocity    xtlang
  • fluid-cube-create    xtlang
  • fluid-cube-create    xtlang
  • fluid-cube-get-column    xtlang
  • fluid-cube-get-first-column    xtlang
  • fluid-cube-get-first-row    xtlang
  • fluid-cube-get-last-column    xtlang
  • fluid-cube-get-last-row    xtlang
  • fluid-cube-get-row    xtlang
  • fluid-cube-set-column    xtlang
  • fluid-cube-set-first-column    xtlang
  • fluid-cube-set-first-row    xtlang
  • fluid-cube-set-last-column    xtlang
  • fluid-cube-set-last-row    xtlang
  • fluid-cube-set-row    xtlang
  • fluid-diffuse    xtlang
  • fluid-diffuse    xtlang
  • fluid-fsc-1    xtlang
  • fluid-fsc-2    xtlang
  • fluid-ix    xtlang
  • fluid-ix    xtlang
  • fluid-lin-solve    xtlang
  • fluid-lin-solve    xtlang
  • fluid-project    xtlang
  • fluid-project    xtlang
  • fluid-set-boundary    xtlang
  • fluid-set-boundary    xtlang
  • fluid-set-boundary    xtlang
  • fluid-step-cube    xtlang
  • fluid-step-cube    xtlang
  • fluid_advect    xtlang
  • fluid_cube_add_density    xtlang
  • fluid_cube_add_velocity    xtlang
  • fluid_cube_create    xtlang
  • fluid_diffuse    xtlang
  • fluid_fsc    xtlang
  • fluid_ix    xtlang
  • fluid_lin_solve    xtlang
  • fluid_set_boundary    xtlang
  • fluid_step_cube    xtlang
  • get-fluid-cube    xtlang
  • get-fluid-cube-1    xtlang
  • get-fluid-cube-2    xtlang
  • get_fluid_cube    xtlang
  • send-fluid-column-osc    xtlang
  • send-fluid-first-column-osc    xtlang
  • send-fluid-first-row-osc    xtlang
  • send-fluid-last-row-osc    xtlang
  • send-fluid-row-osc    xtlang
  • shader_update_projection_texture    xtlang
  • update-fluid-sym-state    xtlang
  • xtm_project    xtlang
  • xtm_projection_texture_load    xtlang
  • xtm_projecton_texture_weight    xtlang
  • xtm_unproject    xtlang