Skip to content
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

Fix expandspace_I #359

Merged
merged 8 commits into from
Dec 17, 2023
Merged

Fix expandspace_I #359

merged 8 commits into from
Dec 17, 2023

Conversation

hyrodium
Copy link
Owner

This PR fixes #358.

Before this PR

julia> using BasicBSpline

julia> p1 = 3
3

julia> k1 = KnotVector(1:8)
KnotVector([1, 2, 3, 4, 5, 6, 7, 8])

julia> P1 = BSplineSpace{p1}(k1)
BSplineSpace{3, Int64, KnotVector{Int64}}(KnotVector([1, 2, 3, 4, 5, 6, 7, 8]))

julia> P1′ = expandspace_I(P1, KnotVector([9,19]))
BSplineSpace{3, Int64, KnotVector{Int64}}(KnotVector([1, 2, 3, 4, 5, 6, 7, 8, 9, 19]))

julia> domain(P1)
4 .. 5

julia> domain(P1′)
4 .. 7

julia> P1  P1′
false

After this PR

julia> using BasicBSpline

julia> p1 = 3
3

julia> k1 = KnotVector(1:8)
KnotVector([1, 2, 3, 4, 5, 6, 7, 8])

julia> P1 = BSplineSpace{p1}(k1)
BSplineSpace{3, Int64, KnotVector{Int64}}(KnotVector([1, 2, 3, 4, 5, 6, 7, 8]))

julia> P1′ = expandspace_I(P1, KnotVector([9,19]))
ERROR: DomainError with KnotVector([1, 2, 3, 4, 5, 6, 7, 8]):
input knot vector is out of domain.

Copy link

codecov bot commented Dec 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b762ee2) 96.25% compared to head (643c461) 96.27%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #359      +/-   ##
==========================================
+ Coverage   96.25%   96.27%   +0.02%     
==========================================
  Files          14       14              
  Lines        1788     1800      +12     
==========================================
+ Hits         1721     1733      +12     
  Misses         67       67              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hyrodium hyrodium merged commit cd6476f into main Dec 17, 2023
13 checks passed
@hyrodium hyrodium deleted the fix/expandspace_I branch December 17, 2023 07:34
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.

expandspace_I should throw an error
1 participant