You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- `K::KLUFactorization`: The matrix factorization object to be factored.
498
518
- `check::Bool`: If `true` (default) check for errors after the factorization. If `false` errors must be checked by the user with `klu.common.status`.
499
-
- `allowsingular::Bool`: If `true` (default `false`) allow the factorization to proceed even if the matrix is singular. Note that this will allow for
500
-
silent divide by zero errors in subsequent `solve!` or `ldiv!` calls if singularity is not checked by the user with `klu.common.status == KLU.KLU_SINGULAR`
519
+
- `allowsingular::Bool`: If `true` (default `false`) allow the factorization to proceed even if the matrix is singular. Note that this will allow for \
520
+
silent divide by zero errors in subsequent `solve!` or `ldiv!` calls if singularity is not checked by the user with `klu.common.status == KLU.KLU_SINGULAR`
501
521
502
-
The `K.common` struct can be used to modify certain options and parameters, see the
@@ -538,8 +558,10 @@ The relation between `K` and `A` is
538
558
# Arguments
539
559
- `A::SparseMatrixCSC` or `n::Integer`, `colptr::Vector{Ti}`, `rowval::Vector{Ti}`, `nzval::Vector{Tv}`: The sparse matrix or the zero-based sparse matrix components to be factored.
540
560
- `check::Bool`: If `true` (default) check for errors after the factorization. If `false` errors must be checked by the user with `klu.common.status`.
541
-
- `allowsingular::Bool`: If `true` (default `false`) allow the factorization to proceed even if the matrix is singular. Note that this will allow for
542
-
silent divide by zero errors in subsequent `solve!` or `ldiv!` calls if singularity is not checked by the user with `klu.common.status == KLU.KLU_SINGULAR`
561
+
- `allowsingular::Bool`: If `true` (default `false`) allow the factorization to proceed even if the matrix is singular.\
562
+
Note that this will allow for silent divide by zero errors in subsequent `solve!` or `ldiv!` calls if singularity is not checked by the user with `klu.common.status == KLU.KLU_SINGULAR`
563
+
- `full_factor::Bool`: if `true` (default), perform both numeric and symbolic factorization. If `false`, only perform symbolic factorization. \
564
+
Useful for cases where only the sparse structure of `A` is known at time of construction.
543
565
544
566
!!! note
545
567
`klu(A::SparseMatrixCSC)` uses the KLU[^ACM907] library that is part of
@@ -549,31 +571,56 @@ The relation between `K` and `A` is
549
571
550
572
[^ACM907]: Davis, Timothy A., & Palamadai Natarajan, E. (2010). Algorithm 907: KLU, A Direct Sparse Solver for Circuit Simulation Problems. ACM Trans. Math. Softw., 37(3). doi:10.1145/1824801.1824814
551
573
"""
552
-
functionklu(n, colptr::Vector{Ti}, rowval::Vector{Ti}, nzval::Vector{Tv}; check=true, allowsingular=false) where {Ti<:KLUITypes, Tv<:AbstractFloat}
Recompute the KLU factorization `K` using the values of `A` or `nzval`. The pattern of the original
579
626
matrix used to create `K` must match the pattern of `A`.
@@ -589,7 +636,7 @@ See also: [`klu`](@ref)
589
636
- `A::SparseMatrixCSC` or `n::Integer`, `colptr::Vector{Ti}`, `rowval::Vector{Ti}`, `nzval::Vector{Tv}`: The sparse matrix or the zero-based sparse matrix components to be factored.
590
637
- `check::Bool`: If `true` (default) check for errors after the factorization. If `false` errors must be checked by the user with `klu.common.status`.
591
638
- `allowsingular::Bool`: If `true` (default `false`) allow the factorization to proceed even if the matrix is singular. Note that this will allow for
592
-
silent divide by zero errors in subsequent `solve!` or `ldiv!` calls if singularity is not checked by the user with `klu.common.status == KLU.KLU_SINGULAR`
639
+
silent divide by zero errors in subsequent `solve!` or `ldiv!` calls if singularity is not checked by the user with `klu.common.status == KLU.KLU_SINGULAR`
593
640
594
641
!!! note
595
642
`klu(A::SparseMatrixCSC)` uses the KLU[^ACM907] library that is part of
@@ -641,6 +688,12 @@ function klu!(K::KLUFactorization{U}, S::SparseMatrixCSC{U}; check=true, allowsi
641
688
returnklu!(K, S.nzval; check, allowsingular)
642
689
end
643
690
691
+
"""
692
+
klu_refactor!(...) -> K::KLUFactorization
693
+
694
+
Same as [`klu!`](@ref): alias for naming consistency reasons."""
695
+
klu_refactor!(args...) =klu!(args...)
696
+
644
697
#B is the modified argument here. To match with the math it should be (klu, B). But convention is
645
698
# modified first. Thoughts?
646
699
@@ -665,13 +718,13 @@ This function overwrites `B` with the solution `X`, for a new solution vector `X
0 commit comments