diff options
author | Andre Susano Pinto <andresusanopinto@gmail.com> | 2009-10-06 05:58:22 +0400 |
---|---|---|
committer | Andre Susano Pinto <andresusanopinto@gmail.com> | 2009-10-06 05:58:22 +0400 |
commit | 63a88075b574e8f2f9adc041f423f49a7356d736 (patch) | |
tree | 951f1f65d74d052debdafa14f6ad22750b6aad04 /intern/smoke/intern/FLUID_3D.cpp | |
parent | 11bdf6ea10ee7bc5e2862cdddbf42eddb06c42fa (diff) | |
parent | 69a24325742c617a9902376b061006dfb24f0a3c (diff) |
svn merge -r 23528:23646 https://svn.blender.org/svnroot/bf-blender/trunk/blendersoc-2009-jaguarandi
Diffstat (limited to 'intern/smoke/intern/FLUID_3D.cpp')
-rw-r--r-- | intern/smoke/intern/FLUID_3D.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/intern/smoke/intern/FLUID_3D.cpp b/intern/smoke/intern/FLUID_3D.cpp index 8a32eaa2e68..bb2227801c7 100644 --- a/intern/smoke/intern/FLUID_3D.cpp +++ b/intern/smoke/intern/FLUID_3D.cpp @@ -399,16 +399,12 @@ void FLUID_3D::project() for (y = 1; y < _yRes - 1; y++, index += 2) for (x = 1; x < _xRes - 1; x++, index++) { - // if(!_obstacles[index]) + if(!_obstacles[index]) { _xVelocity[index] -= 0.5f * (_pressure[index + 1] - _pressure[index - 1]) * invDx; _yVelocity[index] -= 0.5f * (_pressure[index + _xRes] - _pressure[index - _xRes]) * invDx; _zVelocity[index] -= 0.5f * (_pressure[index + _slabSize] - _pressure[index - _slabSize]) * invDx; - }/* - else - { - _xVelocity[index] = _yVelocity[index] = _zVelocity[index] = 0.0f; - }*/ + } } if (_pressure) delete[] _pressure; @@ -497,23 +493,15 @@ void FLUID_3D::setObstaclePressure(float *_pressure) if (top && !bottom) { _pressure[index] += _pressure[index - _slabSize]; pcnt += 1.; - // _zVelocity[index] += - _zVelocity[index - _slabSize]; - // vp += 1.0; } if (!top && bottom) { _pressure[index] += _pressure[index + _slabSize]; pcnt += 1.; - // _zVelocity[index] += - _zVelocity[index + _slabSize]; - // vp += 1.0; } if(pcnt > 0.000001f) _pressure[index] /= pcnt; - // test - dg - // if(vp > 0.000001f) - // _zVelocity[index] /= vp; - // TODO? set correct velocity bc's // velocities are only set to zero right now // this means it's not a full no-slip boundary condition |