Documentation
¶
Overview ¶
Package gallery generates deterministic test matrices: finite-difference Laplacians, a convection-diffusion operator, and seeded random sparse matrices. They are the inputs of the verification and benchmark harnesses.
Index ¶
- func ConvectionDiffusion2D(nx, ny int, peclet float64) *sparse.CSR[float64]
- func Laplacian1D(n int) *sparse.CSR[float64]
- func Laplacian2D(nx, ny int) *sparse.CSR[float64]
- func Laplacian3D(nx, ny, nz int) *sparse.CSR[float64]
- func RandomSparse(n, perRow int, sym bool, seed uint64) *sparse.CSR[float64]
- func Scramble(a *sparse.CSR[float64], seed uint64) (*sparse.CSR[float64], []int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvectionDiffusion2D ¶
ConvectionDiffusion2D is the nonsymmetric upwind 5-point operator -Δu + peclet*(u_x + u_y) on an nx x ny grid with unit spacing.
func Laplacian1D ¶
Laplacian1D is the n x n tridiagonal matrix tridiag(-1, 2, -1).
func Laplacian2D ¶
Laplacian2D is the 5-point Laplacian on an nx x ny grid (Dirichlet).
func Laplacian3D ¶
Laplacian3D is the 7-point Laplacian on an nx x ny x nz grid (Dirichlet).
func RandomSparse ¶
RandomSparse is an n x n matrix with about perRow random off-diagonal entries per row (uniform in [-1, 1]) and a diagonal making it strictly diagonally dominant; sym mirrors the pattern and values (symmetric positive definite then).
Types ¶
This section is empty.