Skip to content

Commit

Permalink
Fix src/KrylovPreconditioners.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Nov 22, 2024
1 parent eb84ebc commit 43fb107
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions src/KrylovPreconditioners.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,6 @@ import LinearAlgebra: ldiv!
abstract type AbstractKrylovPreconditioner end
export AbstractKrylovPreconditioner

update!(p::AbstractKrylovPreconditioner, A::SparseMatrixCSC) = error("update!() for $(typeof(p)) is not implemented.")
update!(p::AbstractKrylovPreconditioner, A) = error("update!() for $(typeof(p)) is not implemented.")
update!(p::AbstractKrylovOperator, A::SparseMatrixCSC) = error("update!() for $(typeof(p)) is not implemented.")
update!(p::AbstractKrylovOperator, A) = error("update!() for $(typeof(p)) is not implemented.")

export update!, get_timer, reset_timer!

function get_timer(p::AbstractKrylovPreconditioner)
return p.timer_update
end

function reset_timer!(p::AbstractKrylovPreconditioner)
p.timer_update = 0.0
end

# Operators
include("operators.jl")

Expand All @@ -43,4 +28,21 @@ export scaling_csr!
# Ordering
# include(ordering.jl)

update!(p::AbstractKrylovPreconditioner, A::SparseMatrixCSC) = error("update!() for $(typeof(p)) is not implemented.")
update!(p::AbstractKrylovPreconditioner, A) = error("update!() for $(typeof(p)) is not implemented.")
update!(p::AbstractTriangularOperator, A::SparseMatrixCSC) = error("update!() for $(typeof(p)) is not implemented.")
update!(p::AbstractTriangularOperator, A) = error("update!() for $(typeof(p)) is not implemented.")
update!(p::AbstractKrylovOperator, A::SparseMatrixCSC) = error("update!() for $(typeof(p)) is not implemented.")
update!(p::AbstractKrylovOperator, A) = error("update!() for $(typeof(p)) is not implemented.")

export update!, get_timer, reset_timer!

function get_timer(p::AbstractKrylovPreconditioner)
return p.timer_update
end

function reset_timer!(p::AbstractKrylovPreconditioner)
p.timer_update = 0.0
end

end # module KrylovPreconditioners

0 comments on commit 43fb107

Please sign in to comment.