mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-26 03:00:17 -06:00
fuzzycompatevtu.py: only complain if the pressure difference is larger than 0.1 Pa
This commit is contained in:
parent
b77c58b502
commit
73b1fa0594
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user