Пример #1
0
 void update(double timestep) {
     buildRhs();
     project(600, timestep);
     applyPressure(timestep);
     
     _d->advect(timestep, *_u, *_v);
     _u->advect(timestep, *_u, *_v);
     _v->advect(timestep, *_u, *_v);
     
     _d->flip();
     _u->flip();
     _v->flip();
 }
Пример #2
0
 void update(double timestep) {
     buildRhs();
     project(600, timestep);
     applyPressure(timestep);
     
     _d->advect(timestep, *_u, *_v);
     _u->advect(timestep, *_u, *_v);
     _v->advect(timestep, *_u, *_v);
     
     /* Make effect of advection visible, since it's not an in-place operation */
     _d->flip();
     _u->flip();
     _v->flip();
 }