Skip to content

Commit 3240462

Browse files
Remove boundary testing section as requested
Removed the 'Additional boundary testing' section that tested exact boundaries with different algorithms. This simplifies the test to focus on the core different-algorithm-per-size-category verification. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent a372fdb commit 3240462

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

test/preferences.jl

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -258,39 +258,6 @@ using Preferences
258258
@test norm(A * sol.u - b) < (test_size <= 10 ? 1e-12 : 1e-8)
259259
end
260260

261-
# Additional boundary testing
262-
boundary_test_cases = [
263-
# Test exact boundaries
264-
(20, "tiny", LinearSolve.DefaultAlgorithmChoice.GenericLUFactorization), # At tiny boundary
265-
(21, "small", LinearSolve.DefaultAlgorithmChoice.RFLUFactorization), # Start of small
266-
(100, "small", LinearSolve.DefaultAlgorithmChoice.RFLUFactorization), # End of small
267-
(101, "medium", LinearSolve.DefaultAlgorithmChoice.AppleAccelerateLUFactorization), # Start of medium
268-
(300, "medium", LinearSolve.DefaultAlgorithmChoice.AppleAccelerateLUFactorization), # End of medium
269-
(301, "large", LinearSolve.DefaultAlgorithmChoice.MKLLUFactorization), # Start of large
270-
(1000, "large", LinearSolve.DefaultAlgorithmChoice.MKLLUFactorization), # End of large
271-
(1001, "big", LinearSolve.DefaultAlgorithmChoice.LUFactorization) # Start of big
272-
]
273-
274-
for (boundary_size, boundary_category, boundary_expected) in boundary_test_cases
275-
A_boundary = rand(Float64, boundary_size, boundary_size) + I(boundary_size)
276-
b_boundary = rand(Float64, boundary_size)
277-
278-
chosen_boundary = LinearSolve.defaultalg(A_boundary, b_boundary, LinearSolve.OperatorAssumptions(true))
279-
280-
if boundary_size <= 10
281-
@test chosen_boundary.alg === LinearSolve.DefaultAlgorithmChoice.GenericLUFactorization
282-
else
283-
# Test that it matches expected algorithm for the boundary
284-
@test chosen_boundary.alg === boundary_expected
285-
println(" Boundary $(boundary_size) ($(boundary_category)) chose: $(chosen_boundary.alg)")
286-
end
287-
288-
# Test that boundary cases solve correctly
289-
prob_boundary = LinearProblem(A_boundary, b_boundary)
290-
sol_boundary = solve(prob_boundary)
291-
@test sol_boundary.retcode == ReturnCode.Success
292-
@test norm(A_boundary * sol_boundary.u - b_boundary) < (boundary_size <= 10 ? 1e-12 : 1e-8)
293-
end
294261
end
295262

296263
# Final cleanup: Reset all preferences to original state

0 commit comments

Comments
 (0)