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

Increase error tolerance for advanced mode #410

Merged
merged 2 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Circuitscape"
uuid = "2b7a1792-8151-5239-925d-e2b8fdfa3201"
version = "5.13.2"
version = "5.13.3"

[deps]
AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c"
Expand Down
6 changes: 3 additions & 3 deletions src/raster/advanced.jl
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ function multiple_solve(s::AMGSolver, matrix::SparseMatrixCSC{T,V}, sources::Vec
csinfo("Time taken to construct preconditioner = $t1 seconds", suppress_info)
t1 = @elapsed volt = solve_linear_system(matrix, sources, M)
# @assert norm(matrix*volt .- sources) < (eltype(sources) == Float64 ? TOL_DOUBLE : TOL_SINGLE)
@assert (norm(matrix*volt .- sources) / norm(sources)) < 1e-6
@assert (norm(matrix*volt .- sources) / norm(sources)) < 1e-4
csinfo("Time taken to solve linear system = $t1 seconds", suppress_info)
volt
end
Expand All @@ -319,7 +319,7 @@ function multiple_solve(s::CholmodSolver, matrix::SparseMatrixCSC{T,V}, sources:
factor = construct_cholesky_factor(matrix, s, suppress_info)
t1 = @elapsed volt = solve_linear_system(factor, matrix, sources)
# @assert norm(matrix*volt .- sources) < (eltype(sources) == Float64 ? TOL_DOUBLE : TOL_SINGLE)
@assert (norm(matrix*volt .- sources) / norm(sources)) < 1e-6
@assert (norm(matrix*volt .- sources) / norm(sources)) < 1e-4
csinfo("Time taken to solve linear system = $t1 seconds", suppress_info)
volt
end
Expand All @@ -328,7 +328,7 @@ function multiple_solve(s::MKLPardisoSolver, matrix::SparseMatrixCSC{T,V}, sourc
factor = construct_cholesky_factor(matrix, s, suppress_info)
t1 = @elapsed volt = solve_linear_system(factor, matrix, sources)
# @assert norm(matrix*volt .- sources) < (eltype(sources) == Float64 ? TOL_DOUBLE : TOL_SINGLE)
@assert (norm(matrix*volt .- sources) / norm(sources)) < 1e-6
@assert (norm(matrix*volt .- sources) / norm(sources)) < 1e-4
csinfo("Time taken to solve linear system = $t1 seconds", suppress_info)
volt
end
Expand Down
Loading