Bugfix for wrong / bad vorticity forming weird banding on the y and z axis.
authorDaniel Genrich <daniel.genrich@gmx.net>
Mon, 2 Jul 2012 12:55:23 +0000 (12:55 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Mon, 2 Jul 2012 12:55:23 +0000 (12:55 +0000)
Part of Blender Smoke Develeopment Milestone III.

intern/smoke/intern/FLUID_3D.cpp

index f638a936049f65a1552e080d4f1b4170ec8cc33a..99d3fc4b56644f3909594e3eb326e058ace92ee8 100644 (file)
@@ -1306,8 +1306,8 @@ void FLUID_3D::addVorticity(int zBegin, int zEnd)
                                                N[2] *= magnitude;
 
                                                _xForce[index] += (N[1] * _zVorticity[vIndex] - N[2] * _yVorticity[vIndex]) * _dx * eps;
-                                               _yForce[index] -= (N[0] * _zVorticity[vIndex] - N[2] * _xVorticity[vIndex]) * _dx * eps;
-                                               _zForce[index] += (N[0] * _yVorticity[vIndex] - N[1] * _xVorticity[vIndex]) * _dx * eps;
+                                               _yForce[index] += (N[0] * _zVorticity[vIndex] - N[2] * _xVorticity[vIndex]) * _dx * eps;
+                                               _zForce[index] -= (N[0] * _yVorticity[vIndex] - N[1] * _xVorticity[vIndex]) * _dx * eps;
                                        }
                                        }       // if
                                        vIndex++;