From 820462de72c5575e6ddd1d641a331522966bc39c Mon Sep 17 00:00:00 2001 From: Olivier Coulaud <Olivier.Coulaud@inria.fr> Date: Mon, 16 Mar 2015 12:02:31 +0100 Subject: [PATCH] Fix problem with convergence criteria - now the test is ok. --- UTests/utestSphericalDirect.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/UTests/utestSphericalDirect.cpp b/UTests/utestSphericalDirect.cpp index de539c1de..2ea7633e9 100755 --- a/UTests/utestSphericalDirect.cpp +++ b/UTests/utestSphericalDirect.cpp @@ -166,8 +166,10 @@ class TestSphericalDirect : public FUTester<TestSphericalDirect> { printf(" Energy DIRECT = %.12e\n",FMath::Abs(energyD)); // Assert - const FReal MaximumDiffPotential = FReal(9e-3); - const FReal MaximumDiffForces = FReal(9e-2); + double epsilon = 1.0/FMath::pow2(ORDER); + const FReal MaximumDiffPotential = FReal(epsilon); + const FReal MaximumDiffForces = FReal(10*epsilon); + printf(" Criteria error - Epsilon %e\n",epsilon); Print("Test1 - Error Relative L2 norm Potential "); uassert(potentialDiff.getRelativeL2Norm() < MaximumDiffPotential); //1 -- GitLab