library.sparse
Submodule¶
Module Summary¶
Interfaces for the NAG Mark 30.3 sparse Chapter.
sparse
- Large Scale Linear Systems
This module provides functions for the solution of large sparse systems of simultaneous linear equations.
These include iterative methods for real nonsymmetric and symmetric, complex non-Hermitian and Hermitian linear systems and direct methods for general real linear systems.
Further direct methods are currently available in submodule matop
and submodule linsys
.
See Also¶
naginterfaces.library.examples.sparse
:This subpackage contains examples for the
sparse
module. See also the Examples subsection.
Functionality Index¶
Basic functions for complex Hermitian linear systems
diagnostic function:
complex_herm_basic_diag()
reverse communication CG or SYMMLQ solver function:
complex_herm_basic_solver()
setup function:
complex_herm_basic_setup()
Basic functions for complex non-Hermitian linear systems
diagnostic function:
complex_gen_basic_diag()
reverse communication RGMRES, CGS, Bi-CGSTAB or TFQMR solver function:
complex_gen_basic_solver()
setup function:
complex_gen_basic_setup()
Basic functions for real nonsymmetric linear systems
diagnostic function:
real_gen_basic_diag()
reverse communication RGMRES, CGS, Bi-CGSTAB or TFQMR solver function:
real_gen_basic_solver()
setup function:
real_gen_basic_setup()
Basic functions for real symmetric linear systems
diagnostic function:
real_symm_basic_diag()
reverse communication CG or SYMMLQ solver:
real_symm_basic_solver()
setup function:
real_symm_basic_setup()
Black Box functions for complex Hermitian linear systems
CG or SYMMLQ solver
with incomplete Cholesky preconditioning:
complex_herm_solve_ilu()
with no preconditioning, Jacobi or SSOR preconditioning:
complex_herm_solve_jacssor()
Black Box functions for complex non-Hermitian linear systems
RGMRES, CGS, Bi-CGSTAB or TFQMR solver
with block Jacobi or additive Schwarz preconditioning:
complex_gen_solve_bdilu()
with incomplete preconditioning:
complex_gen_solve_ilu()
with no preconditioning, Jacobi, or SSOR preconditioning:
complex_gen_solve_jacssor()
Black Box functions for real nonsymmetric linear systems
RGMRES, CGS, Bi-CGSTAB or TFQMR solver
with block Jacobi or additive Schwarz preconditioning:
real_gen_solve_bdilu()
with incomplete preconditioning:
real_gen_solve_ilu()
with no preconditioning, Jacobi, or SSOR preconditioning:
real_gen_solve_jacssor()
Black Box functions for real symmetric linear systems
CG or SYMMLQ solver
with incomplete Cholesky preconditioning:
real_symm_solve_ichol()
with no preconditioning, Jacobi, or SSOR preconditioning:
real_symm_solve_jacssor()
Direct methods for real sparse nonsymmetric linear systems in CCS format
apply iterative refinement to the solution and compute error estimates, after factorizing the matrix of coefficients:
direct_real_gen_refine()
condition number estimation, after factorizing the matrix of coefficients:
direct_real_gen_cond()
factorization
solution of simultaneous linear equations, after factorizing the matrix of coefficients:
direct_real_gen_solve()
utility
compute a norm or the element of largest absolute value:
direct_real_gen_norm()
matrix-matrix multiplier:
direct_real_gen_matmul()
Utility function for complex Hermitian linear systems
incomplete Cholesky factorization:
complex_herm_precon_ichol()
matrix-vector multiplier for complex Hermitian matrices in SCS format:
complex_herm_matvec()
solver for linear systems involving preconditioning matrix from
complex_herm_precon_ichol()
:complex_herm_precon_ilu_solve()
solver for linear systems involving SSOR preconditioning matrix:
complex_herm_precon_ssor_solve()
sort function for complex Hermitian matrices in SCS format:
complex_herm_sort()
Utility function for complex linear systems
solver for linear systems involving iterated Jacobi method:
complex_gen_precon_jacobi()
Utility function for complex non-Hermitian linear systems
incomplete factorization:
complex_gen_precon_ilu()
incomplete factorization of local or overlapping diagonal blocks:
complex_gen_precon_bdilu()
matrix-vector multiplier for complex non-Hermitian matrices in CS format:
complex_gen_matvec()
solver for linear systems involving preconditioning matrix from
complex_gen_precon_ilu()
:complex_gen_precon_ilu_solve()
solver for linear systems involving SSOR preconditioning matrix:
complex_gen_precon_ssor_solve()
sort function for complex non-Hermitian matrices in CS format:
complex_gen_sort()
Utility function for real linear systems
solver for linear systems involving iterated Jacobi method:
real_gen_precon_jacobi()
Utility function for real nonsymmetric linear systems
incomplete factorization:
real_gen_precon_ilu()
incomplete factorization of local or overlapping diagonal blocks:
real_gen_precon_bdilu()
matrix-vector multiplier for real nonsymmetric matrices in CS format:
real_gen_matvec()
solver for linear systems involving preconditioning matrix from
real_gen_precon_ilu()
:real_gen_precon_ilu_solve()
solver for linear systems involving SSOR preconditioning matrix:
real_gen_precon_ssor_solve()
sort function for real nonsymmetric matrices in CS format:
real_gen_sort()
sort function for real rectangular matrices in CS or CCS format:
real_rect_sort()
Utility function for real symmetric linear systems
incomplete Cholesky factorization:
real_symm_precon_ichol()
matrix-vector multiplier for real symmetric matrices in SCS format:
real_symm_matvec()
solver for linear systems involving preconditioning matrix from
real_symm_precon_ichol()
:real_symm_precon_ichol_solve()
solver for linear systems involving SSOR preconditioning matrix:
real_symm_precon_ssor_solve()
sort function for real symmetric matrices in SCS format:
real_symm_sort()
Utility function for real symmetric linear systems, compute bandwidth-reducing reverse Cuthill–McKee permutation: sym_rcm()
For full information please refer to the NAG Library document
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/f11/f11intro.html
Examples¶
- naginterfaces.library.examples.sparse.real_gen_basic_solver_ex.main()[source]¶
Example for
naginterfaces.library.sparse.real_gen_basic_solver()
.This example solves an 8×8 nonsymmetric system of simultaneous linear equations using the bi-conjugate gradient stabilized method of order l=1, where the coefficient matrix A has a random sparsity pattern. An incomplete LU preconditioner is used.
>>> main() naginterfaces.library.sparse.real_gen_basic_solver Python Example Results. Monitoring at iteration no. 1 residual no rm: 1.4059e+02 Monitoring at iteration no. 2 residual no rm: 3.2742e+01 Final results Number of iterations for convergence: 3 Residual norm: ... Right-hand side of termination criterion: 5.5900e-06 1-norm of matrix A: 1.1000e+01 Solution vector Residual vector 1.0000e+00 ... 2.0000e+00 ... 3.0000e+00 ... 4.0000e+00 ... 5.0000e+00 ... 6.0000e+00 ... 7.0000e+00 ... 8.0000e+00 ...