Page MenuHome

solver_main.diff

File Metadata

Author
Austin Benesh (abtrumpet)
Created
Nov 13 2013, 1:09 PM

solver_main.diff

Index: solver_main.cpp
===================================================================
RCS file: /cvsroot/bf-blender/blender/intern/elbeem/intern/solver_main.cpp,v
retrieving revision 1.6
diff -u -i -r1.6 solver_main.cpp
--- solver_main.cpp 27 Feb 2006 11:45:41 -0000 1.6
+++ solver_main.cpp 3 Mar 2006 06:00:27 -0000
@@ -2493,8 +2493,10 @@
if((RFLAG(workLev,i,j,k, workSet)&(CFInter|CFNoDelete)) == (CFInter|CFNoDelete)) {
// remove entry
if(debugFlagreinit) errMsg("EMPT REMOVED!!!", PRINT_IJK<<" mss"<<QCELL(workLev, i,j,k, workSet, dMass) <<" rho"<< QCELL(workLev, i,j,k, workSet, 0) ); // DEBUG SYMM
- iter = mListEmpty.erase(iter);
- iter--; // and continue with next...
+
+ /* std::copy used instead of vector::erase(iter) because it does
+ not throw exceptions due to NULL pointer; see vector::erase() for more details */
+ std::copy(iter + 1, mListEmpty.end(), iter);
// treat as "new inter"
addToNewInterList(i,j,k);
@@ -2541,7 +2543,7 @@
// precompute weights to get rid of order dependancies
- vector<lbmFloatSet> vWeights;
+ vector<lbmFloatSet> vWeights(1);
vWeights.reserve( mListFull.size() + mListEmpty.size() );
int weightIndex = 0;
int nbCount = 0;
@@ -2570,6 +2572,7 @@
vWeights[weightIndex].numNbs = 0.0;
}
weightIndex++;
+ vWeights.resize( weightIndex + 1 );
}
for( vector<LbmPoint>::iterator iter=mListEmpty.begin();
iter != mListEmpty.end(); iter++ ) {
@@ -2594,6 +2597,7 @@
vWeights[weightIndex].numNbs = 0.0;
}
weightIndex++;
+ vWeights.resize( weightIndex + 1 );
}
weightIndex = 0;
@@ -2642,6 +2646,7 @@
//errMsg(" FULL PROBLEM ", PRINT_IJK<<" "<<this->mFixMass);
}
weightIndex++;
+ vWeights.resize( weightIndex + 1 );
// already done? RFLAG(workLev,i,j,k, workSet) = CFFluid;
QCELL(workLev,i,j,k, workSet, dMass) = myrho; // should be rho... but unused?
@@ -2695,6 +2700,7 @@
//errMsg(" EMPT PROBLEM ", PRINT_IJK<<" "<<this->mFixMass);
}
weightIndex++;
+ vWeights.resize( weightIndex + 1 );
// finally... make it empty
// already done? RFLAG(workLev,i,j,k, workSet) = CFEmpty;

Event Timeline