Skip to content

More general \ and ldiv! for incomplete Cholesky #33

Description

@JeffFessler

The diagonal preconditioner has a general ldiv! method that can apply to a vector or a matrix because b is duck typed:

ldiv!(C::DiagonalPreconditioner, b) = ldiv!(b, C, b)

In contrast, the incomplete Cholesky preconditioner ldiv! is pinned to a Vector argument:

@inline function ldiv!(y::AbstractVector, C::CholeskyPreconditioner, b::AbstractVector)

Could the package provide a more general RHS? Something like:

@inline function ldiv!(y::AbstractVecOrMat, C::CholeskyPreconditioner, b::AbstractVecOrMat)

One related hack is something like this:

import Base.\
\(C::CholeskyPreconditioner, A::AbstractMatrix) = reduce(hcat, [C \ c for c in eachcol(A)])

but I think there should be a better way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions