Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix fcompare's --abs_tol (AMReX-Codes#2504)
There is a bug that ignores the absolute errors of components that do not have the biggest relative error when --abs_tol is used. It results in something like below fcompare.gnu.ex --abs_tol 1.e-12 plt00010 plt00002 variable name absolute error relative error (||A - B||) (||A - B||/||A||) ---------------------------------------------------------------------------- level = 0 density 0 0 pressure 0 0 theta 0 0 x_velocity 4.39990436e-05 2.749038203e-06 y_velocity 4.818762188e-05 9.964503154e-06 z_velocity 4.70120484e-19 0.7986458289 PLOTFILE AGREE to specified tolerances: absolute = 1e-12 relative = 0 In this commit, this is fixed by applying the test to each component separately. A component passes if its relative error or absolute error satisfies the respective tolerance. The whole comparison passes if all components pass.
- Loading branch information