|
kusano |
7d535a |
|
|
kusano |
7d535a |
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
|
|
kusano |
7d535a |
<title>SuperLU: SRC/sgsrfs.c File Reference</title>
|
|
kusano |
7d535a |
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
kusano |
7d535a |
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Main Page
|
|
kusano |
7d535a |
Data Structures
|
|
kusano |
7d535a |
Files
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
SRC/sgsrfs.c File ReferenceImproves computed solution to a system of inear equations. More...
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#include <math.h>
|
|
kusano |
7d535a |
#include "slu_sdefs.h"
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Defines
|
|
kusano |
7d535a |
#define ITMAX 5
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Functions
|
|
kusano |
7d535a |
void sgsrfs (trans_t trans, SuperMatrix *A, SuperMatrix *L, SuperMatrix *U, int *perm_c, int *perm_r, char *equed, float *R, float *C, SuperMatrix *B, SuperMatrix *X, float *ferr, float *berr, SuperLUStat_t *stat, int *info)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Detailed Description
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
-- SuperLU routine (version 3.0) --
|
|
kusano |
7d535a |
Univ. of California Berkeley, Xerox Palo Alto Research Center,
|
|
kusano |
7d535a |
and Lawrence Berkeley National Lab.
|
|
kusano |
7d535a |
October 15, 2003
|
|
kusano |
7d535a |
Modified from lapack routine SGERFS
|
|
kusano |
7d535a |
Define Documentation
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#define ITMAX 5
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Function Documentation
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
void sgsrfs
|
|
kusano |
7d535a |
(
|
|
kusano |
7d535a |
trans_t
|
|
kusano |
7d535a |
trans,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
SuperMatrix *
|
|
kusano |
7d535a |
A,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
SuperMatrix *
|
|
kusano |
7d535a |
L,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
SuperMatrix *
|
|
kusano |
7d535a |
U,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int *
|
|
kusano |
7d535a |
perm_c,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int *
|
|
kusano |
7d535a |
perm_r,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
char *
|
|
kusano |
7d535a |
equed,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
float *
|
|
kusano |
7d535a |
R,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
float *
|
|
kusano |
7d535a |
C,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
SuperMatrix *
|
|
kusano |
7d535a |
B,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
SuperMatrix *
|
|
kusano |
7d535a |
X,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
float *
|
|
kusano |
7d535a |
ferr,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
float *
|
|
kusano |
7d535a |
berr,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
SuperLUStat_t *
|
|
kusano |
7d535a |
stat,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int *
|
|
kusano |
7d535a |
info
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Purpose
|
|
kusano |
7d535a |
=======
|
|
kusano |
7d535a |
SGSRFS improves the computed solution to a system of linear
|
|
kusano |
7d535a |
equations and provides error bounds and backward error estimates for
|
|
kusano |
7d535a |
the solution.
|
|
kusano |
7d535a |
If equilibration was performed, the system becomes:
|
|
kusano |
7d535a |
(diag(R)*A_original*diag(C)) * X = diag(R)*B_original.
|
|
kusano |
7d535a |
See supermatrix.h for the definition of 'SuperMatrix' structure.
|
|
kusano |
7d535a |
Arguments
|
|
kusano |
7d535a |
=========
|
|
kusano |
7d535a |
trans (input) trans_t
|
|
kusano |
7d535a |
Specifies the form of the system of equations:
|
|
kusano |
7d535a |
= NOTRANS: A * X = B (No transpose)
|
|
kusano |
7d535a |
= TRANS: A'* X = B (Transpose)
|
|
kusano |
7d535a |
= CONJ: A**H * X = B (Conjugate transpose)
|
|
kusano |
7d535a |
A (input) SuperMatrix*
|
|
kusano |
7d535a |
The original matrix A in the system, or the scaled A if
|
|
kusano |
7d535a |
equilibration was done. The type of A can be:
|
|
kusano |
7d535a |
Stype = SLU_NC, Dtype = SLU_S, Mtype = SLU_GE.
|
|
kusano |
7d535a |
L (input) SuperMatrix*
|
|
kusano |
7d535a |
The factor L from the factorization Pr*A*Pc=L*U. Use
|
|
kusano |
7d535a |
compressed row subscripts storage for supernodes,
|
|
kusano |
7d535a |
i.e., L has types: Stype = SLU_SC, Dtype = SLU_S, Mtype = SLU_TRLU.
|
|
kusano |
7d535a |
U (input) SuperMatrix*
|
|
kusano |
7d535a |
The factor U from the factorization Pr*A*Pc=L*U as computed by
|
|
kusano |
7d535a |
sgstrf(). Use column-wise storage scheme,
|
|
kusano |
7d535a |
i.e., U has types: Stype = SLU_NC, Dtype = SLU_S, Mtype = SLU_TRU.
|
|
kusano |
7d535a |
perm_c (input) int*, dimension (A->ncol)
|
|
kusano |
7d535a |
Column permutation vector, which defines the
|
|
kusano |
7d535a |
permutation matrix Pc; perm_c[i] = j means column i of A is
|
|
kusano |
7d535a |
in position j in A*Pc.
|
|
kusano |
7d535a |
perm_r (input) int*, dimension (A->nrow)
|
|
kusano |
7d535a |
Row permutation vector, which defines the permutation matrix Pr;
|
|
kusano |
7d535a |
perm_r[i] = j means row i of A is in position j in Pr*A.
|
|
kusano |
7d535a |
equed (input) Specifies the form of equilibration that was done.
|
|
kusano |
7d535a |
= 'N': No equilibration.
|
|
kusano |
7d535a |
= 'R': Row equilibration, i.e., A was premultiplied by diag(R).
|
|
kusano |
7d535a |
= 'C': Column equilibration, i.e., A was postmultiplied by
|
|
kusano |
7d535a |
diag(C).
|
|
kusano |
7d535a |
= 'B': Both row and column equilibration, i.e., A was replaced
|
|
kusano |
7d535a |
by diag(R)*A*diag(C).
|
|
kusano |
7d535a |
R (input) float*, dimension (A->nrow)
|
|
kusano |
7d535a |
The row scale factors for A.
|
|
kusano |
7d535a |
If equed = 'R' or 'B', A is premultiplied by diag(R).
|
|
kusano |
7d535a |
If equed = 'N' or 'C', R is not accessed.
|
|
kusano |
7d535a |
C (input) float*, dimension (A->ncol)
|
|
kusano |
7d535a |
The column scale factors for A.
|
|
kusano |
7d535a |
If equed = 'C' or 'B', A is postmultiplied by diag(C).
|
|
kusano |
7d535a |
If equed = 'N' or 'R', C is not accessed.
|
|
kusano |
7d535a |
B (input) SuperMatrix*
|
|
kusano |
7d535a |
B has types: Stype = SLU_DN, Dtype = SLU_S, Mtype = SLU_GE.
|
|
kusano |
7d535a |
The right hand side matrix B.
|
|
kusano |
7d535a |
if equed = 'R' or 'B', B is premultiplied by diag(R).
|
|
kusano |
7d535a |
X (input/output) SuperMatrix*
|
|
kusano |
7d535a |
X has types: Stype = SLU_DN, Dtype = SLU_S, Mtype = SLU_GE.
|
|
kusano |
7d535a |
On entry, the solution matrix X, as computed by sgstrs().
|
|
kusano |
7d535a |
On exit, the improved solution matrix X.
|
|
kusano |
7d535a |
if *equed = 'C' or 'B', X should be premultiplied by diag(C)
|
|
kusano |
7d535a |
in order to obtain the solution to the original system.
|
|
kusano |
7d535a |
FERR (output) float*, dimension (B->ncol)
|
|
kusano |
7d535a |
The estimated forward error bound for each solution vector
|
|
kusano |
7d535a |
X(j) (the j-th column of the solution matrix X).
|
|
kusano |
7d535a |
If XTRUE is the true solution corresponding to X(j), FERR(j)
|
|
kusano |
7d535a |
is an estimated upper bound for the magnitude of the largest
|
|
kusano |
7d535a |
element in (X(j) - XTRUE) divided by the magnitude of the
|
|
kusano |
7d535a |
largest element in X(j). The estimate is as reliable as
|
|
kusano |
7d535a |
the estimate for RCOND, and is almost always a slight
|
|
kusano |
7d535a |
overestimate of the true error.
|
|
kusano |
7d535a |
BERR (output) float*, dimension (B->ncol)
|
|
kusano |
7d535a |
The componentwise relative backward error of each solution
|
|
kusano |
7d535a |
vector X(j) (i.e., the smallest relative change in
|
|
kusano |
7d535a |
any element of A or B that makes X(j) an exact solution).
|
|
kusano |
7d535a |
stat (output) SuperLUStat_t*
|
|
kusano |
7d535a |
Record the statistics on runtime and floating-point operation count.
|
|
kusano |
7d535a |
See util.h for the definition of 'SuperLUStat_t'.
|
|
kusano |
7d535a |
info (output) int*
|
|
kusano |
7d535a |
= 0: successful exit
|
|
kusano |
7d535a |
< 0: if INFO = -i, the i-th argument had an illegal value
|
|
kusano |
7d535a |
Internal Parameters
|
|
kusano |
7d535a |
===================
|
|
kusano |
7d535a |
ITMAX is the maximum number of steps of iterative refinement.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
<address style="text-align: right;"><small>Generated on Mon Nov 22 10:23:48 2010 for SuperLU by </small></address>
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
1.5.5
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|