🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@GBillotey
Copy link
Contributor

Correction in cubic interpolation function:
the interpolated values on refined triangular grids should be the same regardless of the triangles ordering.

As of today, this was not the case for the cubic interpolation, as discovered by @ianthomas23 (refer to the new test enclosed in this PR, which was failing and should now pass). The differences were small but I consider this was a bug (at least highly unexpected).
The solution is a new choice for the Gauss quadrature points.

I added a new (non-image) test and updated the 2 baseline images involving this kind of cubic interpolation (one was failing as a result of this PR ; I also updated the 2nd to get a fresh start).

Note:
As changing the Gauss points was not my first guess (unfortunately...) I also made a double-check of the various shape functions used in _ReducedHCT_Element For this I found that it was more convenient to arrange them by columns, even if it this is not strictly pep8. If this is considered bad practise, please tell me ; I would be happy to revert.

@ianthomas23
Copy link
Member

Confirmed that this PR fixes the bug. Thanks @GBillotey.

ianthomas23 added a commit that referenced this pull request Sep 3, 2013
[bug correction] trirefine is now independant of triangulation numbering
@ianthomas23 ianthomas23 merged commit 271db8c into matplotlib:master Sep 3, 2013
@ianthomas23
Copy link
Member

As this is a bug fix, I have also cherry-picked it into v1.3.x.

@mdboom
Copy link
Member

mdboom commented Sep 3, 2013

Thanks!

@GBillotey GBillotey deleted the new_test_triinterpolate branch September 3, 2013 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants