• Nenhum resultado encontrado

PDF IMSL Fortran Library User's Guide MATH/LIBRARY Volume 1 of 2 - gov

N/A
N/A
Protected

Academic year: 2023

Share "PDF IMSL Fortran Library User's Guide MATH/LIBRARY Volume 1 of 2 - gov"

Copied!
947
0
0

Texto

Some of the routines in the IMSL Fortran library can take advantage of a standard (MPI) Message Passing Interface environment. However, legacy code that calls routines in the previous version of the library without the use of a "use" statement will continue to work as before.

Optional Subprogram Arguments

Optional Data

The package of lin_sol_gen includes the definitions of the self-documenting integer parameters lin_sol_gen_save_LU and lin_sol_gen_solve_A. These parameters have values ​​2 and 3, but the programmer usually does not need to be aware of it. Example 3 in Chapter 1, "Linear Solvers" by lin_sol_self uses three and then four option numbers for the purpose of computing an eigenvector associated with a known eigenvalue.

Error Handling

The main feature of the design is the use of a separate array for each parallel call to a routine. For a more detailed discussion of using this error handler in applications that use MPI for distributed computing, see the reference material.

Printing Results

Using IMSL Fortran Library on Shared-Memory Multiprocessors

Using Operators and Generic Functions

Linear Systems

Routines

Linear Solvers

LFCDH 179 Factors..LFTDH 182 Solving a linear system after factoring ..LFSDH 185 Linear system solution with high accuracy after factoring. LFTZG 314 Solving a linear system after factorization ..LFZG Real Sparse Symmetric Positive Definite Linear Equation Solvers.

Usage Notes

Matrix Types

6 · Chapter 1: Linear Systems IMSL MATHEMATICS/LIBRARY HF Complex Hermitian matrix stored in the upper half of a complex square matrix.

Solution of Linear Systems

IMSL MATH/LIBRARY Chapter 1: Linear Systems · 7 Full discussion of this and other important topics on solving linear equations, see Rice (1983), Stewart (1973), or Golub and van Loan (1989).

Multiple Right Sides

Determinants

Iterative Refinement

Matrix Inversion

Singularity

Special Linear Systems

Iterative Solution of Linear Systems

QR Decomposition

The routine LQRSL, page 398, can be used to find QTPb from the information calculated by LQRRR. If the matrix A is modified by a rank 1 update, A ® A + axyT, the QR decomposition of A can be updated/reduced using the LUPQR routine, page 402.

LIN_SOL_GEN

Specific: The specific interface names are S_LIN_SOL_GEN, D_LIN_SOL_GEN, C_LIN_SOL_GEN and Z_LIN_SOL_GEN. Since the LU factorization is stored in arrays A(:,:) and ipivots(:), at the final step only steps can be resolved in subsequent entries to lin_sol_gen.

LIN_SOL_SELF

If a diagonal term of the matrix U is smaller in size than the value Small, it is replaced by Small. If a diagonal term of the matrix R is smaller in size than the value Small, it is replaced by Small.

LIN_SOL_LSQ

Routine LIN_SOL_LSQ solves a rectangular system of linear algebraic equations in a least-squares sense. 34 · Chapter 1: Linear Systems IMSL MATHEMATICS/LIBRARY. use lin_sol_lsq_int use rand_gen_int.

LIN_SOL_SVD

This example anticipates a problem where the matrix A is ill-conditioned or not fully ranked; so lin_sol_svd is the correct routine. Routine LIN_SOL_SVD solves a rectangular system of linear algebraic equations in the least squares sense.

LIN_SOL_TRI

Spesifi k: Di spesifik intafeys nem dɛn na S_LIN_SOL_TRI, D_LIN_SOL_TRI, C_LIN_SOL_TRI ɛn Z_LIN_SOL_TRI. Rutin lin_sol_tri de sɔlv k sistem dɛn we gɛt tridiagɔnal linya aljɛbrik ikwɛshɔn dɛn, ɛni prɔblɛm we gɛt dimɛnshɔn n ́ n.

LIN_SVD

The lin_svd routine is an implementation of the QR algorithm for computing the SVD of rectangular matrices. In the code of Example 2, Newton's method is used to solve for each control parameter of the k systems.

Parallel Constrained Least-Squares Solvers

Solving Constrained Least-Squares Systems

PARALLEL_NONNEGATIVE_LSQ

INDEX(1:N) — (Output) Array of assumed size of length N containing the NSETP indices of columns in the positive solution and the rest that are on their constraint. The number of positive components in the solution is given by the intrinsic function value of Fortrans.

PARALLEL_BOUNDED_LSQ

Subroutine PARALLEL_BOUNDED_LSQ solves the least-squares linear system Ax b@, a £ £x b, using the algorithm BVLS found in Lawson and Hanson, (1995), pages 279-283. The input for routine PARALLEL_BOUNDED_LSQ expects each processor to obtain that part of J x( ) it.

LSARG

The solution of the linear system is then found using the iterative refinement routine LFIRG, page 96. LSARG fails if U, the upper triangular part of the factorization, has a zero diagonal element or if the iterative refinement algorithm does not converge.

LSLRG

This means that very small changes in A can cause very large changes in solution x. The LSLRG routine fails if U, the upper triangular part of the factorization, has a zero diagonal element.

LFCRG

92 · Chapter 1: Linear Systems IMSL MATH/LIBRARY LFDRG can be called to calculate the determinant of the coefficient matrix after LFCRG has performed the factorization. The strict lower half of F can also be thought of as containing the negative of multipliers.

LFTRG

In this case, the coefficient matrix is ​​assumed to be well-conditioned and correctly scaled. The routine LFDRG can be called to calculate the determinant of the coefficient matrix after LFTRG has performed the factorization.

LFSRG

The routine LFTRG fails if U, the upper triangular part of the factorization, has a zero diagonal element. IMSL MATH/LIBRARY Chapter 1: Linear Systems · 95 IPVT — Vector of length N containing the pivot information for the LU factorization of A.

LFIRG

FACT — The N by N matrix containing the LU factorization of the coefficient matrix A as output from the routine LFCRG/DLFCRG or LFTRG/DLFTRG. Usually almost all the digits in the solution are correct, even if the matrix is ​​somewhat unconditioned.

LFDRG

The LFIRG routine computes the solution of a system of linear algebraic equations having a real general coefficient matrix. 100 · Chapter 1: Linear Systems IMSL MATH/LDFACT LIBRARY — The principal dimension of FACT exactly as specified in the dimension statement of.

LINRG

It first uses the routine LFCRG (page 89) to compute an LU factorization of the coefficient matrix and evaluate the condition number of the matrix. The LINRG routine fails if U, the upper triangular part of the factorization, has a zero diagonal element or if the iterative refinement algorithm fails to converge.

LSACG

The solution of the linear system is then found using the iterative refinement routine LFICG, page 116. LSACG fails if U, the upper triangular part of the factorization, has a zero diagonal element or if the iterative refinement algorithm fails to converge.

LSLCG

17 This option has two values ​​that specify whether the number of L1 conditions should be calculated. If the estimated number of conditions is greater than 1/e (where e is the precision of the machine), an error warning is issued.

LFCCG

LDA — Leading dimension of A exactly as specified in the dimension declaration of the calling program. The routine LFDCG can be called to calculate the determinant of the coefficient matrix after LFCCG has performed the factorization.

LFTCG

A scaled partial rotation differs from a partial rotation in that the rotation strategy is the same as if each line were scaled to have the same norm ¥. The LFDCG routine can be called to calculate the determinant of the coefficient matrix after LFCCG (page 108) has performed the factorization.

LFSCG

Routine LFSCG computes the solution of a system of linear algebraic equations with a complex general coefficient matrix. The forward elimination step consists of solving the system Ly = b by applying the same permutations and elimination operations to b that were applied to the columns of A in the factorization routine.

LFICG

Routine LFICG computes the solution of a system of linear algebraic equations with a complex general coefficient matrix. Iterative refinement only fails if the matrix is ​​very ill-conditioned. page 116) and LFSCG (page 114) both solve a linear system given its LU factorization.

LFDCG

Single: CALL LFDCG (N, FACT, LDFACT, IPVT, DET1, DET2) Double: Double precision name is DLFDCG. Since L is the product of triangular matrices with unit diagonals and permutation matrices, det L = (-1)k, where k is the number of rotating permutations.

LINCG

IMSL MATH/LIBRARY Chapter 1: Linear Systems · 121. The matrix U is stored in the upper triangle of FACT.) Since L is the product of triangular matrices with unit diagonal and permutation matrices, det L = (-1)k where k is the number of rotating exchanges. It first uses the routine LFCCG, page 108, to compute an LU factorization of the coefficient matrix and evaluate the condition number of the matrix.

LSLRT

LINCG fails if U, the upper triangular part of the factorization, has a zero diagonal element or if the iterative refinement algorithm fails to converge. The coefficient matrix has lower triangular form and the right-hand vector, b, has three elements.

LFCRT

The estimation algorithm is the same as used by LINPACK and described by Cline et al.

LFDRT

LINRT

For an upper triangular matrix, only the upper triangular part and diagonal of A are referred to. LDAINV — Front dimension of AINV exactly as specified in the dimension statement of the calling program.

LSLCT

LFCCT

LFDCT

LINCT

LSADS

It first uses the LFCDS routine, page 143, to calculate an RTR Cholesky factorization of the coefficient matrix and to estimate the matrix's condition number. The solution of the linear system is then found using the iterative refinement routine LFIDS, page 150.

LSLDS

Routine LSADS solves a system of linear algebraic equations with a real symmetric positive definite coefficient matrix. Cholesky factorization of the coefficient matrix and to estimate the mode number of the matrix.

LFCDS

LSLDS fails if a submatrix of R is not positive definite or if R has a zero diagonal element. LFCDS fails if a submatrix of R is not positive definite or if R has a zero diagonal element.

LFTDS

148 · Chapter 1: Linear Systems IMSL MATH/LIBRARY LFTDS fails if any submatrix of R is not positive definite or if R has a zero diagonal element. These errors occur only if A is very close to a singular matrix or to a matrix that is not positive definite.

LFSDS

Otherwise, it would be better to call LFCDS (page 143) to perform the factorization, and LFIDS (page 150) to calculate the solutions. This routine computes the solution to a system of linear algebraic equations with a real symmetric positive definite coefficient matrix.

LFIDS

The LFIDS routine computes the solution of a system of linear algebraic equations with a real symmetric positive definite matrix of coefficients. IMSL MATH/LIBRARY Chapter 1: Linear Systems · 153 LFIDS page 150 and LFSDS page 148 both solve a linear system in terms of its RTR factorization.

LFDDS

LINDS

It first uses the routine LFCDS, page 143, to compute an RTR factorization of the coefficient matrix and to estimate the condition number of the matrix. LINDS fails if any submatrix of R is not positive definite or if R has a zero diagonal element.

LSASF

It first uses the routine LFCSF, page 162, to compute a U DUT factorization of the coefficient matrix and to estimate the condition number of the matrix. The solution of the linear system is then found using the iterative refinement routine LFISF, page 169.

LSLSF

IMSL MATH/LIBRARY Chapter 1: Linear Systems · 161 17 This option has two values ​​that determine whether the L1 condition number should be. It first uses the routine LFCSF, page 162, to calculate a U DUT factorization of the coefficient matrix.

LFCSF

LFCSF is called to factorize a matrix and check for singularity or ill-conditionedness. The LFDSF routine can be called to calculate the determinant of the coefficient matrix after the LFCSF has performed the factorization.

LFTSF

U The DUT factors are returned in a form compatible with the routines LFISF, page 169, LFSSF, page 167, and LFDSF, page 172. LDFACT — Leading dimension of FACT exactly as specified in the dimension declaration of the calling program.

LFSSF

Otherwise, it would be better to call LFCSF (page 162) to perform the factorization and LFISF (page 169) to calculate the solutions. The LFSSF routine computes the solution of a system of linear algebraic equations with a real symmetric indefinite coefficient matrix.

LFISF

The right-hand vector is perturbed after solving the system each of the first two times by adding 0.2 to the second element. LFISF computes the solution of a system of linear algebraic equations with a real symmetric undetermined coefficient matrix.

LFDSF

LSADH

The LSADH routine solves a system of linear algebraic equations having a complex Hermitian positive definite coefficient matrix. It first uses the routine LFCDH, page 179, to compute an RH R Cholesky factorization of the coefficient matrix and evaluate the condition number of the matrix.

LSLDH

These errors only occur if A is either very close to a singular matrix, or is a matrix that is not positive definite. LSLDH fails if a submatrix of R is not positive definite or if R has a zero diagonal element.

LFCDH

If the coefficient matrix is ​​poorly conditioned or poorly scaled, it is recommended that LSADH, page 173, be used. LFCDH fails if a submatrix of R is not positive definite or if R has a diagonal element of zero.

LFTDH

You can call the LFDDH routine to calculate the determinant of the coefficient matrix after LFCDH performs the factorization. LFTDH fails if any submatrix of R is not positive definite or if R has a zero diagonal element.

LFSDH

Imagem

Figure 1-1   Solution and Factorization of Linear Systems
Figure 1-2   Least-Squares Routine

Referências

Documentos relacionados

Resultados e Discussão Foram avaliados 145 alunos do Ensino Médio, dos quais 80 eram do 1o ano e 65 do 2o ano, sendo avaliados com 25% da nota distribuída para avaliação bimestral, a