-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added interpolation Lagrange{2,RefCube,3} #701
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to add the new interpolation to the test suite, see: https://github.com/Ferrite-FEM/Ferrite.jl/blob/master/test/test_interpolations.jl#L3-L36
Looks like the tolerance here Ferrite.jl/test/test_interpolations.jl Line 106 in ade9292
|
Give me some more time to think about this adjustment, because I am not really sure about what could break downstream due to such spurious evaluations and what the related thresholds to prevent numerical oscillations are. Also I do not know how these affect the overall assembly precision. Generally speaking we should still be able to reorder the expressions to eliminate errors in the tested delta property (even though it is not trivial). |
Perhaps we can BigFloats and truncate to Float64 after evaluation. |
But this will be a big performance hit for the value call then. |
Maybe, but it is only called in the constructor. |
How about using |
Thanks for this suggestions!
For order 3 (and maybe order 4) this should be fine, but when moving to higher order one quickyl runs into the issue that assembly degrades solver performance quite severly. Here usually matrix-free techniques are deployed which require reevaluation of the basis functions. I think
This would certainly fix the tests, but IIRC then general quadrature points are unfortunately Irrational. However, I am happy to get corrected if I am wrong on this. |
You're right. AccurateArithmetic.jl can be helpful? |
Good point. Kahan summation could solve the problem already. |
Okay maybe we can bring this over the finish line as follows. We can increase the number of points in the partition of unity test here (points outside the domain should be rejected!) Ferrite.jl/test/test_interpolations.jl Lines 50 to 55 in 1fadc1f
and increase the tolerance here Ferrite.jl/test/test_interpolations.jl Line 107 in 1fadc1f
Alternatively we can try to overdub the value calls in the tests with Kahan summations, but this might be a bit more work. It think the linked package fails with AD (just skipped over the implementation). |
introduced interpolation Lagrange{2,RefCube,3} to src/interpolations.jl