Skip to content

Commit 158318f

Browse files
committed
Update isnans
1 parent 06e63d3 commit 158318f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

SU2_CFD/src/output/CFlowCompOutput.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -773,13 +773,13 @@ void CFlowCompOutput::WriteTurboSpanwisePerformance(std::shared_ptr<CTurboOutput
773773
}
774774
file.width(30); file << BladePerf->GetInletState().GetVelocityValue()*config[ZONE_0]->GetVelocity_Ref();
775775
// This captures NaNs
776-
if(isnan(BladePerf->GetInletState().GetAbsFlowAngle())){
776+
if(std::isnan(BladePerf->GetInletState().GetAbsFlowAngle())){
777777
file.width(30); file << "0.0000";
778778
}
779779
else {
780780
file.width(30); file << BladePerf->GetInletState().GetAbsFlowAngle()*180.0/PI_NUMBER;
781781
}
782-
if(isnan(BladePerf->GetInletState().GetFlowAngle())){
782+
if(std::isnan(BladePerf->GetInletState().GetFlowAngle())){
783783
file.width(30); file << "0.0000";
784784
}
785785
else{
@@ -836,13 +836,13 @@ void CFlowCompOutput::WriteTurboSpanwisePerformance(std::shared_ptr<CTurboOutput
836836
file.width(30); file << BladePerf->GetOutletState().GetVelocity()[iDim]*config[ZONE_0]->GetVelocity_Ref();
837837
}
838838
file.width(30); file << BladePerf->GetInletState().GetVelocityValue()*config[ZONE_0]->GetVelocity_Ref();
839-
if(isnan(BladePerf->GetInletState().GetAbsFlowAngle())){
839+
if(std::isnan(BladePerf->GetInletState().GetAbsFlowAngle())){
840840
file.width(30); file << "0.0000";
841841
}
842842
else {
843843
file.width(30); file << BladePerf->GetOutletState().GetAbsFlowAngle()*180.0/PI_NUMBER;
844844
}
845-
if(isnan(BladePerf->GetInletState().GetAbsFlowAngle())){
845+
if(std::isnan(BladePerf->GetInletState().GetAbsFlowAngle())){
846846
file.width(30); file << "0.0000";
847847
}
848848
else{

SU2_CFD/src/solvers/CEulerSolver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9191,7 +9191,7 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC
91919191
for (auto iDim = 2; iDim < nDim +1;iDim++)
91929192
avgVelocity[iDim-1] = AverageFlux[iMarker][iSpan][iDim] / AverageFlux[iMarker][iSpan][0];
91939193

9194-
if (isnan(avgDensity) || isnan(avgPressure) || avgPressure < 0.0 || avgDensity < 0.0 ){
9194+
if (std::isnan(avgDensity) || std::isnan(avgPressure) || avgPressure < 0.0 || avgDensity < 0.0 ){
91959195
val_init_pressure = TotalAreaPressure / TotalArea;
91969196
MixedOut_Average (config, val_init_pressure, AverageFlux[iMarker][iSpan], AverageTurboNormal, avgPressure, avgDensity);
91979197
avgVelocity[0] = ( AverageFlux[iMarker][iSpan][1] - avgPressure) / AverageFlux[iMarker][iSpan][0];
@@ -9228,7 +9228,7 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC
92289228
}
92299229

92309230
/* --- check if averaged quantities are correct otherwise reset the old quantities ---*/
9231-
const bool nanSolution = (isnan(AverageDensity[iMarker][iSpan]) || isnan(AveragePressure[iMarker][iSpan]));
9231+
const bool nanSolution = (std::isnan(AverageDensity[iMarker][iSpan]) || std::isnan(AveragePressure[iMarker][iSpan]));
92329232
const bool negSolution = (AverageDensity[iMarker][iSpan] < 0.0 || AveragePressure[iMarker][iSpan] < 0.0);
92339233
if (nanSolution || negSolution){
92349234
if (nanSolution)

0 commit comments

Comments
 (0)