fluid_lin_solve   xtlang


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

Implementation

(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))


Back to Index

Similar Entries

  • cerberus_moog_ladder_inlined    xtlang
  • circle_line    xtlang
  • desolve    macro
  • draw_a_line    xtlang
  • draw_a_line    xtlang
  • dv_draw_line    xtlang
  • dv_draw_line_segments    xtlang
  • explin    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_project    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
  • impc:aot:add-win-link-library    scheme
  • impc:aot:currently-compiling?    scheme
  • impc:compiler:print-could-not-resolve-generic-type-error    scheme
  • impc:compiler:print-could-not-resolve-type-error    scheme
  • impc:compiler:print-could-not-resolve-types    scheme
  • impc:compiler:print-could-not-resolve-types_find-expr    scheme
  • impc:ir:function-calling-convention    scheme
  • impc:ti:find-unresolved-simple-types    scheme
  • impc:ti:try-to-resolve-named-types    scheme
  • linear_c    xtlang
  • linear_mc_c    xtlang
  • linsolve    macro
  • make-timeline    scheme
  • midi_input_polling    xtlang
  • moog_ladder_inlined    xtlang
  • on_before_command_line_processing    xtlang
  • perlin    xtlang
  • pipeline    xtlang
  • pipeline    xtlang
  • pipeline_stage    xtlang
  • pipeline_stage    xtlang
  • pipeline_stage    xtlang
  • reverse_inline    xtlang
  • sampler_note_linear    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
  • set-data-arrays-lines    xtlang
  • solve    macro
  • svm_parse_line    xtlang
  • svm_read_line    xtlang
  • sys_file_link    xtlang
  • test_add_blinker    xtlang
  • test_blink_blinker    xtlang
  • test_double_blink_blinker    xtlang
  • update-fluid-sym-state    xtlang
  • world_add_blinker    xtlang
  • xtm_add_line    xtlang
  • xtm_add_line    xtlang
  • xtm_add_line    xtlang
  • xtm_add_lined    xtlang
  • xtm_draw_line    xtlang
  • xtm_draw_line    xtlang
  • xtm_draw_line    xtlang
  • xtm_draw_line    xtlang
  • xtm_draw_line    xtlang
  • xtm_draw_lined    xtlang