Cleanup: Replace deprecated finite with isfinite
Differential Revision: https://developer.blender.org/D4649
This commit is contained in:
parent
2bd8f2dfad
commit
fce469a30c
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include "mvmcoords.h"
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER > 1600
|
||||
// std::greater
|
||||
|
@ -24,6 +25,7 @@
|
|||
|
||||
|
||||
using std::vector;
|
||||
using std::isfinite;
|
||||
|
||||
void MeanValueMeshCoords::clear()
|
||||
{
|
||||
|
@ -170,8 +172,8 @@ void MeanValueMeshCoords::computeWeights(vector<ntlVec3Gfx> &reference_vertices,
|
|||
for (vector<mvmIndexWeight>::iterator viter = tds.weights.begin();
|
||||
viter != tds.weights.end(); ++viter) {
|
||||
viter->weight *= invTotalWeight;
|
||||
//assert(finite(viter->weight) != 0);
|
||||
if(!finite(viter->weight)) viter->weight=0.;
|
||||
//assert(isfinite(viter->weight) != 0);
|
||||
if(!isfinite(viter->weight)) viter->weight=0.;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
#include "solver_relax.h"
|
||||
#include "particletracer.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
using std::isfinite;
|
||||
|
||||
/*****************************************************************************/
|
||||
//! coarse step functions
|
||||
|
@ -1244,7 +1246,7 @@ void LbmFsgrSolver::adaptTimestep() {
|
|||
uz += (dfDvecZ[l]*m);
|
||||
}
|
||||
#ifndef WIN32
|
||||
if (!finite(rho)) {
|
||||
if (!isfinite(rho)) {
|
||||
errMsg("adaptTimestep","Brute force non-finite rho at"<<PRINT_IJK); // DEBUG!
|
||||
rho = 1.0;
|
||||
ux = uy = uz = 0.0;
|
||||
|
|
|
@ -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*/ \
|
||||
} }
|
||||
|
|
Loading…
Reference in New Issue