msvc: Use source folder structure for project file.
[blender.git] / intern / elbeem / intern / solver_init.cpp
index 4c398ab9cb4d65af64a0f5adf79e2b366398a0b3..8b962d604cf8532dcce9057273805b96f4377928 100644 (file)
@@ -685,6 +685,8 @@ bool LbmFsgrSolver::initializeSolverMemory()
                if(firstMInit) {
                        mrSetup();
                }
+#else
+               (void)firstMInit;
 #endif // LBM_INCLUDE_TESTSOLVERS==1
                firstMInit=false;
 
@@ -799,6 +801,17 @@ bool LbmFsgrSolver::initializeSolverMemory()
                mLevel[i].avgOmegaCnt = 0.0;
        }
 
+#if PARALLEL == 1
+       /*
+       // DG: this would be the correct sanity check, not the "hack below" */
+       // if(( mSizey / mNumOMPThreads) * mNumOMPThreads != mSizey) {
+               // setNumOMPThreads();
+       //}
+       if( mSizey < mNumOMPThreads ) {
+               setNumOMPThreads(mSizey);
+       }
+#endif
+
        // init sizes
        mLevel[mMaxRefine].lSizex = mSizex;
        mLevel[mMaxRefine].lSizey = mSizey;
@@ -1340,13 +1353,13 @@ bool LbmFsgrSolver::initializeSolverPostinit() {
                                } } \
                                if(ntype&(CFBndFreeslip)) { \
                                        const LbmFloat dp=dot(objvel, vec2L((*pNormals)[n]) ); \
-                                       const LbmVec oldov=objvel; /*DEBUG*/ \
+                                       /* const LbmVec oldov=objvel; */ /*DEBUG*/ \
                                        objvel = vec2L((*pNormals)[n]) *dp; \
                                        /* if((j==24)&&(n%5==2)) errMsg("FSBT","n"<<n<<" v"<<objvel<<" nn"<<(*pNormals)[n]<<" dp"<<dp<<" oldov"<<oldov ); */ \
                                } \
                                else if(ntype&(CFBndPartslip)) { \
                                        const LbmFloat dp=dot(objvel, vec2L((*pNormals)[n]) ); \
-                                       const LbmVec oldov=objvel; /*DEBUG*/ \
+                                       /* const LbmVec oldov=objvel; */ /*DEBUG*/ \
                                        /* if((j==24)&&(n%5==2)) errMsg("FSBT","n"<<n<<" v"<<objvel<<" nn"<<(*pNormals)[n]<<" dp"<<dp<<" oldov"<<oldov ); */ \
                                        const LbmFloat partv = mObjectPartslips[OId]; \
                                        /*errMsg("PARTSLIP_DEBUG","l="<<l<<" ccel="<<RAC(ccel, dfInv[l] )<<" partv="<<partv<<",id="<<(int)(mnbf>>24)<<" newval="<<newval ); / part slip debug */ \