예제 #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();
 }