fluid-cube-create   xtlang


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

Implementation

(bind-func fluid-cube-create
  (lambda (size diffusion viscosity dt:double)
    (let ((cube:fluidcube* (heap-alloc))
    (size3:i64 (* size size size))
    (s:double* (heap-alloc size3))
    (density:double* (heap-alloc size3))
    (Vx:double* (heap-alloc size3))
    (Vy:double* (heap-alloc size3))
    (Vz:double* (heap-alloc size3))
    (Vx0:double* (heap-alloc size3))
    (Vy0:double* (heap-alloc size3))
    (Vz0:double* (heap-alloc size3)))
      (tfill! cube size dt diffusion viscosity s density Vx Vy Vz Vx0 Vy0 Vz0)
      cube)))


Back to Index

Similar Entries

  • fluid-cube-create    xtlang