Skip to content
Snippets Groups Projects
Commit ff36065a authored by Oliver Sander's avatar Oliver Sander
Browse files

[!352] add ctype dependent tolerance to grid tests

Merge branch 'issue/test_tolerances' into 'master'

ref:core/dune-grid

### Summary

Change the fixed hard coded tolerances in grid tests with something related to
numeric_limits<ctype>::epsilon().

### Details

Many tolerances in the grid tests are hard coded to something like 1.e-8.
Those tests will fail if ctype=float. Thus, all those comparisons are changed
to either sqrt(numeric_limits<ctype>::epsilon()) or
numeric_limits<ctype>::epsilon(), depending on the previous value.

### Discussion

The tolerance values seem quite arbitrary. Sometimes it is compared against
1.e-8, sometimes 1.e-7 or 1.e-6 or 1e3*numeric_limits<ctype>::epsilon(). Maybe
it would be cleaner to use the FloatCmp utilities and clearly define what's
the expected accuracy.

See merge request [!352]

  [!352]: gitlab.dune-project.org/core/dune-grid/merge_requests/352
parents 31cd7d71 2b557f8a
No related branches found
No related tags found
1 merge request!352add ctype dependent tolerance to grid tests
Pipeline #21598 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment