Skip to content

Commit

Permalink
Removed speculative comment
Browse files Browse the repository at this point in the history
Directly setting the velocity on solid boundaries is necessary. You
never explicitly calculate the pressure of the solid wall, and it's
different for each face anyways, so there's no single value to store.
  • Loading branch information
cgmb committed Jun 7, 2017
1 parent 9d74105 commit 2f78b0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ void project(float dt, float u[Y][X], float v[Y][X], float uout[Y][X], float vou
// update horizontal velocities
for (size_t y = 0; y < Y; ++y) {
for (size_t x = 0; x < X-1; ++x) {
if (g_solid[y][x] || g_solid[y][x+1]) { // todo: unnecessary? probably same as !is_water
if (g_solid[y][x] || g_solid[y][x+1]) {
uout[y][x] = 0.f;
} else if (is_water(y,x) || is_water(y,x+1)) {
uout[y][x] = u[y][x] - k_invd * k_invs * dt * (p[y][x+1] - p[y][x]);
Expand Down

0 comments on commit 2f78b0c

Please sign in to comment.