Draft: MatrixMarket for GMPField and Float128
Summary
This MR solves an issue with MatrixMarket writer for GMPField (and Float128) that came up on the mailinglist, see https://lists.dune-project.org/pipermail/dune/2021-June/015117.html
Merge request reports
Activity
Note, the
matrixmarkettest
still fails due to some problem in the test for equality of floating point values in combination with SIMD types. There is the checkDune::Simd::anyTrue(*entry!=*entry1)
that compares the written with the read vector entries. But unfortunately one cannot control the tolerance in the comparison (at least, I don't know how). For GMPField this test then fails.You could fix the test by checking the difference
Dune::Simd::anyTrue(abs(*entry - *entry1) > eps)
with a suitably choseneps
.The choice of the
eps
is then the main question... The docs stateThe nonzero values may be in either in fixed or floating point representation, to any precision (although Fortran and C typically parse less than 20 significant digits).
So the question is in which precision do we want to write
GMPField
andFloat128
? The latter could be written exact, while forGPMField
this might be (practically) impossible. So... do we need an addition precision parameter?The test currently assumes that we write the data with full precision and that is exactly what is checked.
changed milestone to %DUNE 2.8.0
changed milestone to %DUNE 2.9.0
removed milestone %DUNE 2.9.0
changed milestone to %DUNE 2.11.0