Skip to content

Commit

Permalink
Clean adjoint_forward_substitution!
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Apr 30, 2024
1 parent f9fb038 commit 618cc3d
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/application.jl
Original file line number Diff line number Diff line change
Expand Up @@ -181,34 +181,11 @@ end

function adjoint_forward_substitution!(F::ILUFactorization, y::AbstractVector)
ldiv!(LowerTriangular(F.U'), y)
# U = F.U
# @inbounds for col = 1 : U.n
# y[col] /= U.nzval[U.colptr[col]]
# end
# @inbounds for col = 1 : U.n
# for idx = U.colptr[col] + 1 : U.colptr[col + 1] - 1
# y[U.rowval[idx]] -= (U.nzval[idx] / U.nzval[U.colptr[U.rowval[idx]]]) * y[col]
# end
# end

y
end

function adjoint_forward_substitution!(F::ILUFactorization, y::AbstractMatrix)
ldiv!(LowerTriangular(F.U'), y)
# U = F.U
# p = size(y, 2)
# @inbounds for c = 1 : p
# @inbounds for col = 1 : U.n
# y[col,c] /= U.nzval[U.colptr[col]]
# end
# @inbounds for col = 1 : U.n
# for idx = U.colptr[col] + 1 : U.colptr[col + 1] - 1
# y[U.rowval[idx],c] -= (U.nzval[idx] / U.nzval[U.colptr[U.rowval[idx]]]) * y[col,c]
# end
# end
# end

y
end

Expand Down

0 comments on commit 618cc3d

Please sign in to comment.