Skip to content

Commit

Permalink
Add changelog and deprecations for COOAssembler (#1080)
Browse files Browse the repository at this point in the history
  • Loading branch information
KnutAM authored Sep 28, 2024
1 parent 225a016 commit de2d66b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,8 @@ more discussion).
- The function `reshape_to_nodes` have been deprecated in favor of `evaluate_at_grid_nodes`.
([#703])

- `start_assemble([n::Int])` has been deprecated in favor of calling `Ferrite.COOAssembler()` directly ([#916], [#1058]).

- `start_assemble(f, K)` have been deprecated in favor of the "canonical" `start_assemble(K,
f)`. ([#707])

Expand Down Expand Up @@ -1000,9 +1002,11 @@ poking into Ferrite internals:
[#880]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/880
[#888]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/888
[#914]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/914
[#916]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/916
[#924]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/924
[#943]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/943
[#949]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/949
[#953]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/953
[#974]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/974
[#1058]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1058
[#1059]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1059
6 changes: 6 additions & 0 deletions src/deprecations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -443,3 +443,9 @@ end
function assemble!(::AbstractAssembler, ::AbstractVector{<:Integer}, ::AbstractVector, ::AbstractMatrix)
throw(DeprecationError("assemble!(assembler, dofs, fe, Ke)" => "assemble!(assembler, dofs, Ke, fe)"))
end

start_assemble(::Int) = throw(DeprecationError("start_assemble(n::Int)" => "Ferrite.COOAssembler(; sizehint = n)"))
start_assemble() = throw(DeprecationError("start_assemble()" => "Ferrite.COOAssembler()"))

export getfaceset
getfaceset(args...) = throw(DeprecationError("getfaceset(...)" => "getfacetset(...)"))
5 changes: 5 additions & 0 deletions test/test_deprecations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,9 @@ end
@test_throws Ferrite.DeprecationError Ferrite.default_interpolation(Triangle)
end

@testset "start_assemble" begin
@test_throws Ferrite.DeprecationError start_assemble()
@test_throws Ferrite.DeprecationError start_assemble(10)
end

end # testset deprecations

0 comments on commit de2d66b

Please sign in to comment.