-
Notifications
You must be signed in to change notification settings - Fork 2
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
changebasis
sometimes returns incorrect nonzero element
#177
Labels
Comments
hyrodium
changed the title
Mar 24, 2022
changebasis
sometimes return nonzero value for zerochangebasis
sometimes returns invalid nonzero element
hyrodium
changed the title
Mar 24, 2022
changebasis
sometimes returns invalid nonzero elementchangebasis
sometimes returns incorrect nonzero element
Note that there still be some incorrect non-zero with julia> using BasicBSpline
julia> p = 3
3
julia> P1 = BSplineSpace{p}(KnotVector(1:8))
BSplineSpace{3, Int64}(KnotVector([1, 2, 3, 4, 5, 6, 7, 8]))
julia> P2 = BSplineSpace{p}(KnotVector(2,3,3,4,5,6,7,8))
BSplineSpace{3, Int64}(KnotVector([2, 3, 3, 4, 5, 6, 7, 8]))
julia> BasicBSpline._changebasis_sim(P1,P2)
4×4 Matrix{Float64}:
0.666667 0.0 0.0 0.0
0.333333 1.0 0.0 0.0
0.0 0.0 1.0 0.0
0.0 0.0 0.0 1.0
julia> changebasis(P1,P2)
4×4 Matrix{Float64}:
0.666667 0.0 0.0 0.0
0.333333 1.0 0.0 -5.55112e-17
3.70074e-17 0.0 1.0 -2.22045e-16
0.0 0.0 0.0 1.0 |
Here's another case: julia> p = 3
3
julia> P = BSplineSpace{p}(KnotVector(1:10))
BSplineSpace{3, Int64, KnotVector{Int64}}(KnotVector([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))
julia> P′ = BSplineSpace{p}(KnotVector([1,2,3,4,4.5,5,6,7,8.1,9.1,10.5]))
BSplineSpace{3, Float64, KnotVector{Float64}}(KnotVector([1.0, 2.0, 3.0, 4.0, 4.5, 5.0, 6.0, 7.0, 8.1, 9.1, 10.5]))
julia> changebasis(P,P′)
6×7 Matrix{Float64}:
1.0 0.166667 0.0 0.0 0.0 0.0 0.0
8.88178e-16 0.833333 0.5 0.0 0.0 0.0 0.0
1.33227e-15 -5.55112e-17 0.5 0.833333 5.55112e-17 5.55112e-17 -3.05866e-16
-5.82867e-16 4.16334e-17 4.16334e-17 0.166667 1.0 -0.0333333 0.0183333
0.0 0.0 0.0 0.0 0.0 1.03333 -0.103333
0.0 0.0 0.0 0.0 0.0 0.0 1.085 |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: