precice icon indicating copy to clipboard operation
precice copied to clipboard

Bug in Watch Integral

Open BenjaminRodenberg opened this issue 1 year ago • 1 comments

While working on https://github.com/precice/precice/pull/1526 we discovered that the test always was testing for wrong results.

The problematic part is here:

https://github.com/precice/precice/blob/b0b9593b37aa1ddb33a05797db6ce32180991cec/tests/serial/watch-integral/WatchIntegralScaleAndNoScale.cpp#L112-L115

Actually the following would be correct (see https://github.com/precice/precice/pull/1526#discussion_r1084139281):

 auto expected = std::vector<double>{ 
    1.0, 6.0, 3.0,
    2.0, 9.0, 3.0,
    3.0, 12.0, 3.0};

Describe the problem Watch Integral returns wrong results and test uses wrong reference result.

Step To Reproduce

  1. Replace expected in test with correct result from above
  2. Test should fail.

Expected behaviour Watch integral should return the expected results.

BenjaminRodenberg avatar Feb 23 '23 10:02 BenjaminRodenberg

Shifting it to 3.x.x, because it is not critical in my opinion and the bug has always been there. Feel free to shift it back to 3.0.0, if you are willing to work on it.

BenjaminRodenberg avatar Oct 16 '23 19:10 BenjaminRodenberg