fuzzycompatevtu.py: only complain if the pressure difference is larger than 0.1 Pa

This commit is contained in:
Andreas Lauser 2012-10-25 15:52:53 +02:00
parent b77c58b502
commit 73b1fa0594

View File

@ -35,7 +35,10 @@ def isFuzzyEqual(vtkFile1, vtkFile2, absTol, relTol):
if curFieldName.startswith("saturation") and abs(number1 - number2) > 1e-3:
print 'Difference between %f and %f too large in data field "%s: %s"'%(number1,number2,curFieldName,abs(number1 - number2))
return False
if abs(number1 - number2) > absTol and number2 != 0 and abs(number1/number2 - 1) > relTol:
elif curFieldName.startswith("pressure") and abs(number1 - number2) > 0.1:
print 'Difference between %f and %f too large in data field "%s: %s"'%(number1,number2,curFieldName,abs(number1 - number2))
return False
elif abs(number1 - number2) > absTol and number2 != 0 and abs(number1/number2 - 1) > relTol:
print 'Difference between %f and %f too large (%f%%) in data field "%s"'%(number1,number2,abs(number1/number2 - 1)*100, curFieldName)
return False
return True