diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-08 16:55:31 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-08 16:55:31 +0300 |
commit | ec7df03c867d28316708e9b91bec5cef0aee832e (patch) | |
tree | 3f560939b745032e235d9ac789c4117d669d6462 /intern/smoke | |
parent | 4c318539b2f6abdf8f2a02376b6fcb8d30a4b12e (diff) |
Warning fixes, one actual bug found in sequencer sound wave drawing. Also
changed some malloc to MEM_mallocN while trying to track down a memory leak.
Diffstat (limited to 'intern/smoke')
-rw-r--r-- | intern/smoke/intern/FLUID_3D.cpp | 6 | ||||
-rw-r--r-- | intern/smoke/intern/FLUID_3D_STATIC.cpp | 6 |
2 files changed, 3 insertions, 9 deletions
diff --git a/intern/smoke/intern/FLUID_3D.cpp b/intern/smoke/intern/FLUID_3D.cpp index 25673630fc4..4ac960b5ef0 100644 --- a/intern/smoke/intern/FLUID_3D.cpp +++ b/intern/smoke/intern/FLUID_3D.cpp @@ -204,16 +204,13 @@ void FLUID_3D::initBlenderRNA(float *alpha, float *beta) ////////////////////////////////////////////////////////////////////// void FLUID_3D::step() { - - int threadval = 1; #if PARALLEL==1 + int threadval = 1; threadval = omp_get_max_threads(); -#endif int stepParts = 1; float partSize = _zRes; -#if PARALLEL==1 stepParts = threadval*2; // Dividing parallelized sections into numOfThreads * 2 sections partSize = (float)_zRes/stepParts; // Size of one part; @@ -935,7 +932,6 @@ void FLUID_3D::addVorticity(int zBegin, int zEnd) float *_xVorticity, *_yVorticity, *_zVorticity, *_vorticity; - int _vIndex = _slabSize + _xRes + 1; int bb=0; int bt=0; int bb1=-1; diff --git a/intern/smoke/intern/FLUID_3D_STATIC.cpp b/intern/smoke/intern/FLUID_3D_STATIC.cpp index 89ac2c74e15..6a27541f432 100644 --- a/intern/smoke/intern/FLUID_3D_STATIC.cpp +++ b/intern/smoke/intern/FLUID_3D_STATIC.cpp @@ -57,7 +57,6 @@ void FLUID_3D::addSmokeTestCase(float* field, Vec3Int res) float xTotal = dx * res[0]; float yTotal = dx * res[1]; - float zTotal = dx * res[2]; float heighMin = 0.05; float heighMax = 0.10; @@ -408,11 +407,11 @@ void FLUID_3D::advectFieldSemiLagrange(const float dt, const float* velx, const void FLUID_3D::advectFieldMacCormack1(const float dt, const float* xVelocity, const float* yVelocity, const float* zVelocity, float* oldField, float* tempResult, Vec3Int res, int zBegin, int zEnd) { - const int sx= res[0]; + /*const int sx= res[0]; const int sy= res[1]; const int sz= res[2]; - /*for (int x = 0; x < sx * sy * sz; x++) + for (int x = 0; x < sx * sy * sz; x++) phiHatN[x] = phiHatN1[x] = oldField[x];*/ // not needed as all the values are written first float*& phiN = oldField; @@ -433,7 +432,6 @@ void FLUID_3D::advectFieldMacCormack2(const float dt, const float* xVelocity, co float* t1 = temp1; const int sx= res[0]; const int sy= res[1]; - const int sz= res[2]; float*& phiN = oldField; float*& phiN1 = newField; |