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.
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user