From f7f2592bd26e8005a739cfe19169097c0146e269 Mon Sep 17 00:00:00 2001 From: Knut Andreas Meyer Date: Wed, 31 Jul 2024 12:55:56 +0200 Subject: [PATCH] remove ApplyStrategy enums (#1013) ApplyStrategy was deprecated in #489, but kept for backwards compat (having no effect). This PR removes them completely. --- .github/workflows/Check.yml | 2 +- benchmark/benchmarks-boundary-conditions.jl | 6 ++---- src/Dofs/ConstraintHandler.jl | 8 +------- src/Ferrite.jl | 2 +- src/exports.jl | 1 - 5 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/Check.yml b/.github/workflows/Check.yml index bc783ec483..08dc6b83e0 100644 --- a/.github/workflows/Check.yml +++ b/.github/workflows/Check.yml @@ -38,7 +38,7 @@ jobs: run: | using Ferrite, ExplicitImports, Metis, BlockArrays # Check Ferrite - allow_unanalyzable = (ApplyStrategy, ColoringAlgorithm) # baremodules + allow_unanalyzable = (ColoringAlgorithm,) # baremodules check_no_implicit_imports(Ferrite; allow_unanalyzable) check_no_stale_explicit_imports(Ferrite; allow_unanalyzable) check_all_qualified_accesses_via_owners(Ferrite) diff --git a/benchmark/benchmarks-boundary-conditions.jl b/benchmark/benchmarks-boundary-conditions.jl index fe9b96dd8b..6964196f70 100644 --- a/benchmark/benchmarks-boundary-conditions.jl +++ b/benchmark/benchmarks-boundary-conditions.jl @@ -32,12 +32,10 @@ for spatial_dim ∈ [2] # Non-symmetric application M, f = FerriteAssemblyHelper._assemble_mass(dh, cellvalues, false); - DIRICHLET_SUITE["global"]["apply!(M,f,APPLY_TRANSPOSE)"] = @benchmarkable apply!($M, $f, $ch; strategy=$(Ferrite.APPLY_TRANSPOSE)); - DIRICHLET_SUITE["global"]["apply!(M,f,APPLY_INPLACE)"] = @benchmarkable apply!($M, $f, $ch; strategy=$(Ferrite.APPLY_INPLACE)); + DIRICHLET_SUITE["global"]["apply!(M,f)"] = @benchmarkable apply!($M, $f, $ch); # Symmetric application M, f = FerriteAssemblyHelper._assemble_mass(dh, cellvalues, true); - DIRICHLET_SUITE["global"]["apply!(M_sym,f,APPLY_TRANSPOSE)"] = @benchmarkable apply!($M, $f, $ch; strategy=$(Ferrite.APPLY_TRANSPOSE)); - DIRICHLET_SUITE["global"]["apply!(M_sym,f,APPLY_INPLACE)"] = @benchmarkable apply!($M, $f, $ch; strategy=$(Ferrite.APPLY_INPLACE)); + DIRICHLET_SUITE["global"]["apply!(M_sym,f)"] = @benchmarkable apply!($M, $f, $ch); DIRICHLET_SUITE["global"]["apply!(f)"] = @benchmarkable apply!($f, $ch); DIRICHLET_SUITE["global"]["apply_zero!(f)"] = @benchmarkable apply!($f, $ch); diff --git a/src/Dofs/ConstraintHandler.jl b/src/Dofs/ConstraintHandler.jl index aaba4cfd7d..54ce73a56a 100644 --- a/src/Dofs/ConstraintHandler.jl +++ b/src/Dofs/ConstraintHandler.jl @@ -595,13 +595,7 @@ function apply_zero!(K::Union{SparseMatrixCSC,Symmetric}, f::AbstractVector, ch: apply!(K, f, ch, true) end -# For backwards compatibility, not used anymore -@enumx ApplyStrategy Transpose Inplace -const APPLY_TRANSPOSE = ApplyStrategy.Transpose -const APPLY_INPLACE = ApplyStrategy.Inplace - -function apply!(KK::Union{SparseMatrixCSC,Symmetric}, f::AbstractVector, ch::ConstraintHandler, applyzero::Bool=false; - strategy::ApplyStrategy.T=ApplyStrategy.Transpose) +function apply!(KK::Union{SparseMatrixCSC,Symmetric}, f::AbstractVector, ch::ConstraintHandler, applyzero::Bool=false) @assert isclosed(ch) sym = isa(KK, Symmetric) K = sym ? KK.data : KK diff --git a/src/Ferrite.jl b/src/Ferrite.jl index 0776f2f6be..c543704cd6 100644 --- a/src/Ferrite.jl +++ b/src/Ferrite.jl @@ -8,7 +8,7 @@ using Base: using EnumX: EnumX, @enumx using LinearAlgebra: - LinearAlgebra, Symmetric, Transpose, cholesky, det, norm, pinv, tr + LinearAlgebra, Symmetric, cholesky, det, norm, pinv, tr using NearestNeighbors: NearestNeighbors, KDTree, knn using OrderedCollections: diff --git a/src/exports.jl b/src/exports.jl index f2c17a0d11..2c02bad172 100644 --- a/src/exports.jl +++ b/src/exports.jl @@ -151,7 +151,6 @@ export apply_assemble!, add!, free_dofs, - ApplyStrategy, # iterators CellCache,