forked from bartvdbraak/blender
Fix T36769: fluid sim modifier can crash blender
Crash only happened when the number of openmp threads were greater than the resolution.
This commit is contained in:
parent
6213d88c85
commit
1ab86e3f1f
@ -799,6 +799,15 @@ bool LbmFsgrSolver::initializeSolverMemory()
|
||||
mLevel[i].avgOmegaCnt = 0.0;
|
||||
}
|
||||
|
||||
/*
|
||||
// DG: this would be the correct sanity check, not the "hack below" */
|
||||
// if(( mSizey / mNumOMPThreads) * mNumOMPThreads != mSizey) {
|
||||
// setNumOMPThreads();
|
||||
//}
|
||||
if( mSizey < mNumOMPThreads ) {
|
||||
setNumOMPThreads(mSizey);
|
||||
}
|
||||
|
||||
// init sizes
|
||||
mLevel[mMaxRefine].lSizex = mSizex;
|
||||
mLevel[mMaxRefine].lSizey = mSizey;
|
||||
|
Loading…
Reference in New Issue
Block a user