diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2008-01-04 17:26:22 (GMT) |
---|---|---|
committer | Oliver Schinagl <oliver@schinagl.nl> | 2008-01-04 17:26:22 (GMT) |
commit | cf983359977dbea21b49747e3430725209a804ee (patch) | |
tree | c69181513a7ba12d365330b614b3b7586410f6e4 /Smoke/fluids.h | |
parent | b12d6854cbb458c3de11266efefa8fb2ea11a1cf (diff) | |
download | 2iv35-cf983359977dbea21b49747e3430725209a804ee.zip 2iv35-cf983359977dbea21b49747e3430725209a804ee.tar.gz 2iv35-cf983359977dbea21b49747e3430725209a804ee.tar.bz2 |
force/vel/rho now selectable (for flowvis)
Diffstat (limited to 'Smoke/fluids.h')
-rw-r--r-- | Smoke/fluids.h | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/Smoke/fluids.h b/Smoke/fluids.h index ca2c214..c042094 100644 --- a/Smoke/fluids.h +++ b/Smoke/fluids.h @@ -3,13 +3,11 @@ //--- SIMULATION PARAMETERS ------------------------------------------------------------------------ -extern const int DIM; //size of simulation grid extern double dt; //simulation time step extern float visc; //fluid viscosity extern fftw_real *vx, *vy; //(vx,vy) = velocity field at the current moment -extern fftw_real *vx0, *vy0; //(vx0,vy0) = velocity field at the previous moment extern fftw_real *fx, *fy; //(fx,fy) = user-controlled simulation forces, steered with the mouse -extern fftw_real *rho, *rho0; //smoke density at the current (rho) and previous (rho0) moment +extern fftw_real *rho; //smoke density at the current (rho) and previous (rho0) moment extern rfftwnd_plan plan_rc, plan_cr; //simulation domain discretization extern fftw_real *height_array; //used for hight plot struct point *normal_array; //used for normal vectors @@ -22,6 +20,7 @@ extern int frame_index; #define DATASET_FORCE 2 #define DATASET_DIVV 3 #define DATASET_DIVF 4 +#define DATASET_HIST 5 #define SCALAR_RHO 0 #define SCALAR_VEL 1 @@ -41,15 +40,6 @@ extern int vis_dataset; extern int glyph_scalar; extern int glyph_vector; -fftw_real *init_simulation(int n); - -int rescale_to_winwidth(float value); - -void calculate_one_simulation_step(fftw_real *field); - -float get_dataset(int index); -void set_autoscaling(void); - ////////////////// void select_dataset(int arg); @@ -67,6 +57,17 @@ struct point { float z; }; +struct vis_data_arrays { + fftw_real *rho; + fftw_real *vel; + fftw_real *force; + fftw_real *div_vel; + fftw_real *div_force; + fftw_real *height; + struct point *normals; + fftw_real *history[50]; +}; + extern int isolines_nr; extern float threshold1; @@ -77,6 +78,17 @@ void fluids_init(int dim); void fluids_set_calculate(int calculate); int fluids_get_calculate(void); + void fluids_insert_smoke(int x, int y); +int fluids_get_dim(void); + +fftw_real *init_simulation(int n, struct vis_data_arrays *vis_data); + +int rescale_to_winwidth(float value); + +void calculate_one_simulation_step(struct vis_data_arrays *vis_data); + +float get_dataset(int index); +void set_autoscaling(void); #endif |