From c1820f19d34c1763d5ac5ac7b3b97596d1cfbc0b Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 31 Oct 2019 14:48:31 +0000 Subject: [PATCH] postProcessing::noise: Improved robustness of the uniform time-step check --- applications/utilities/postProcessing/noise/noise.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/utilities/postProcessing/noise/noise.C b/applications/utilities/postProcessing/noise/noise.C index 1d0f51a336..dd66fe750a 100644 --- a/applications/utilities/postProcessing/noise/noise.C +++ b/applications/utilities/postProcessing/noise/noise.C @@ -98,13 +98,13 @@ Foam::scalar checkUniformTimeStep(const scalarField& t) { for (label i = 1; i < t.size(); i++) { - scalar dT = t[i] - t[i-1]; + const scalar dT = t[i] - t[i-1]; if (deltaT < 0) { deltaT = dT; } - if (mag(deltaT - dT) > small) + if (mag(deltaT - dT) > rootSmall) { FatalErrorInFunction << "Unable to process data with a variable time step"