Documentation
¶
Overview ¶
Package gp provides sparse LU factorization with partial pivoting.
The algorithm is described in "Sparse Partial Pivoting in Time Proportional to Arithmetic Operations" by John R. Gilbert and Tim Peierls.
@article{Gilbert1988, doi = {10.1137/0909058}, url = {https://doi.org/10.1137/0909058}, year = {1988}, month = {sep}, publisher = {Society for Industrial {\&} Applied Mathematics ({SIAM})}, volume = {9}, number = {5}, pages = {862--874}, author = {John R. Gilbert and Tim Peierls}, title = {Sparse Partial Pivoting in Time Proportional to Arithmetic Operations}, journal = {SIAM Journal on Scientific and Statistical Computing} }
This package is translated from the gp FORTRAN code distributed in Sivan Toledo's work on incomplete-factorization, from PARC in the early 1990s, as published in the ILU package on Netlib:
http://www.netlib.org/linalg/ilu.tgz
This source code is distributed, with the kind permission of John Gilbert and Tim Peierls, under a 3-clause BSD license.
Index ¶
- Variables
- func Solve(lu *LU, rhs [][]complex128, trans bool) error
- type LU
- type OptFunc
- func ColFillRatio(colFillRatio float64) OptFunc
- func ColPerm(colPerm []int) OptFunc
- func DropThreshold(dropThreshold float64) OptFunc
- func ExpandRatio(expandRatio float64) OptFunc
- func FillRatio(fillRatio float64) OptFunc
- func PartialPivoting(pivotThreshold float64) OptFunc
- func ThresholdPivoting() OptFunc
- func WithoutPivoting() OptFunc
Constants ¶
This section is empty.
Variables ¶
var Logger io.Writer
Logger is a writer used for logging messages.
Functions ¶
Types ¶
type LU ¶
type LU struct {
// contains filtered or unexported fields
}
LU is a lower-upper numeric factorization.
func Factor ¶
Factor performs sparse LU factorization with partial pivoting.
Given a matrix A in sparse format by columns, it performs an LU factorization, with partial or threshold pivoting, if desired. The factorization is PA = LU, where L and U are triangular. P, L, and U are returned. This subroutine uses the Coleman-Gilbert-Peierls algorithm, in which total time is O(nonzero multiplications).
type OptFunc ¶
type OptFunc func(*options) error
func ColFillRatio ¶
ColFillRatio sets the column fill ratio. If < 0 the column fill ratio is not limited. Default value is -1.
func DropThreshold ¶
DropThreshold sets drop tolerance.
For each major step of the algorithm, the pivot is chosen to be a nonzero below the diagonal in the current column of A with the most nonzeros to the right in its row, with absolute value at least dropThreshold*maxpiv, where maxpiv is the largest absolute value below the diagonal in the current column. Note that if dropThreshold <= 0.0, then the pivot is chosen purely on the basis of row sparsity. Also, if dropThreshold >= 1.0, then the pivoting is effectively partial pivoting with ties broken on the basis of sparsity.
func ExpandRatio ¶
ExpandRatio sets the ratio for LU size growth. Default value is 1.2.
func PartialPivoting ¶
PartialPivoting enables partial pivoting. Enabled by default. pivotThreshold is the fraction of max pivot candidate acceptable for pivoting. Default value is 1.
func ThresholdPivoting ¶
func ThresholdPivoting() OptFunc
ThresholdPivoting enables threshold pivoting.