Merge branch 'blender2.7'
[blender.git] / intern / elbeem / intern / solver_main.cpp
index 514087b6130190e6c7be5d3ad554ceb68a8a4f09..961bd44e08fdb90da5f6c251a0acfcb7e42ea3dc 100644 (file)
@@ -1,5 +1,5 @@
-/** \file elbeem/intern/solver_main.cpp
- *  \ingroup elbeem
+/** \file
+ * \ingroup elbeem
  */
 /******************************************************************************
  *
@@ -17,6 +17,9 @@
 #include "globals.h"
 
 #include <stdlib.h>
+#include <cmath>
+
+using std::isfinite;
 
 /*****************************************************************************/
 /*! perform a single LBM step */
@@ -216,8 +219,8 @@ void LbmFsgrSolver::stepMain() {
 
 #ifndef WIN32
        // good indicator for instabilities
-       if( (!finite(mMxvx)) || (!finite(mMxvy)) || (!finite(mMxvz)) ) { CAUSE_PANIC; }
-       if( (!finite(mCurrentMass)) || (!finite(mCurrentVolume)) ) { CAUSE_PANIC; }
+       if( (!isfinite(mMxvx)) || (!isfinite(mMxvy)) || (!isfinite(mMxvz)) ) { CAUSE_PANIC; }
+       if( (!isfinite(mCurrentMass)) || (!isfinite(mCurrentVolume)) ) { CAUSE_PANIC; }
 #endif // WIN32
 
        // output total step time
@@ -250,7 +253,7 @@ void LbmFsgrSolver::stepMain() {
        if(!this->mPanic){ FSGR_FORIJK_BOUNDS(mMaxRefine) { \
                if(RFLAG(mMaxRefine,i,j,k,mLevel[mMaxRefine].setCurr)&(CFFluid|CFInter)) { \
                for(int l=0;l<dTotalNum;l++) { \
-                       if(!finite(QCELL(mMaxRefine,i,j,k,mLevel[mMaxRefine].setCurr,l))) { errMsg("NNOFIN"," "<<str<<" at "<<PRINT_IJK<<" l"<<l<<" "); }\
+                       if(!isfinite(QCELL(mMaxRefine,i,j,k,mLevel[mMaxRefine].setCurr,l))) { errMsg("NNOFIN"," "<<str<<" at "<<PRINT_IJK<<" l"<<l<<" "); }\
                }/*for*/ \
                }/*if*/ \
        } }