6
·1· Chapter 7. Solution of linear algebraic equations 线性代数方程组的解法 Chapter 7. Solution of linear algebraic equations 线性代数方程组的 解法 Keywords 英文 中文 英文 中文 Algebraic equations 代数方程 Lower triangular matrix 上三角矩阵 Direct method 直接法 Upper triangular matrix 下三角矩阵 Indirect method 间接法 Gaussian elimination 高斯消元 Row Forward elimination 向前消元 Column Back substitution 向后回代 A finite element problem leads to a large set of simultaneous semi-discrete linear equations whose solution provides the nodal and element parameters in the formulation. For example, in the analysis of linear steady-state problems the direct assembly of the element coefficient matrices and load vectors leads to a set of linear algebraic equations. In this section methods to solve the simultaneous algebraic equations are summarized. We consider a direct method, i.e., the Gaussian elimination including the forward elimination and back substitution. 7.1 Direct method by Gaussian elimination Consider first the general problem of direct solution of a set of algebraic equations given by f u Κ ~ (7.1) where K is a square coefficient matrix, u ~ is a vector of unknown parameters, and f is a vector of known values. The reader can associate these with the quantities described previously: namely, the stiffness matrix, the nodal unknowns, and the specified forces or residuals. In the discussion to follow it is assumed that the coefficient matrix has properties such that row and/or column interchanges are unnecessary to achieve an accurate Computational Mechanics-CUMTB

Computational Mechanics-CUMTB·3· Chapter 7. Solution of linear algebraic equations 线性代数方程组的解法 1 2 1 1 1 ~ ~, , , ~ y U u i n n U u U y u n j i i ij j ii i nn

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Computational Mechanics-CUMTB·3· Chapter 7. Solution of linear algebraic equations 线性代数方程组的解法 1 2 1 1 1 ~ ~, , , ~ y U u i n n U u U y u n j i i ij j ii i nn

·1· Chapter 7. Solution of linear algebraic equations 线性代数方程组的解法

Chapter 7. Solution of linear algebraic equations 线性代数方程组的

解法

Keywords

英文 中文 英文 中文

Algebraic equations 代数方程 Lower triangular matrix 上三角矩阵

Direct method 直接法 Upper triangular matrix 下三角矩阵

Indirect method 间接法 Gaussian elimination 高斯消元

Row 行 Forward elimination 向前消元

Column 列 Back substitution 向后回代

A finite element problem leads to a large set of simultaneous semi-discrete linear

equations whose solution provides the nodal and element parameters in the formulation.

For example, in the analysis of linear steady-state problems the direct assembly of the

element coefficient matrices and load vectors leads to a set of linear algebraic equations.

In this section methods to solve the simultaneous algebraic equations are summarized.

We consider a direct method, i.e., the Gaussian elimination including the forward

elimination and back substitution.

7.1 Direct method by Gaussian elimination

Consider first the general problem of direct solution of a set of algebraic equations

given by

fuΚ ~ (7.1)

where K is a square coefficient matrix, u~ is a vector of unknown parameters, and f is

a vector of known values. The reader can associate these with the quantities described

previously: namely, the stiffness matrix, the nodal unknowns, and the specified forces

or residuals.

In the discussion to follow it is assumed that the coefficient matrix has properties

such that row and/or column interchanges are unnecessary to achieve an accurate

Compu

tation

al Mech

anics

-CUMTB

Page 2: Computational Mechanics-CUMTB·3· Chapter 7. Solution of linear algebraic equations 线性代数方程组的解法 1 2 1 1 1 ~ ~, , , ~ y U u i n n U u U y u n j i i ij j ii i nn

Chapter 7. Solution of linear algebraic equations 线性代数方程组的解法 ·2·

solution. This is true in cases where K is symmetric positive (or negative) definite.

Pivoting may or may not be required with unsymmetric, or indefinite, conditions which

can occur when the finite element formulation is based on some weighted residual

methods. In these cases, some checks or modifications may be necessary to ensure that

the equations can be solved accurately [1–3]. For the moment consider that the

coefficient matrix can be written as the product of a lower triangular matrix with unit

diagonals and an upper triangular matrix. Accordingly,

LUΚ (7.2)

where

1

01

001

21

21

nn LL

LL (7.3)

and

nn

n

n

U

UU

UUU

00

0 222

11211

U (7.4)

This form is called a triangular decomposition of K. The solution to the equations

can now be obtained by solving the pair of equations:

fLy (7.5)

and

yuU ~ (7.6)

where y is introduced to facilitate the separation, e.g., see Refs. [1–5] for additional

details. The reader can easily observe that the solution to these equations is trivial. In

terms of the individual equations the solution is given by:

niyLfy

fyi

jjijii ,,,

11

321

1

(7.7)

and

Compu

tation

al Mech

anics

-CUMTB

Page 3: Computational Mechanics-CUMTB·3· Chapter 7. Solution of linear algebraic equations 线性代数方程组的解法 1 2 1 1 1 ~ ~, , , ~ y U u i n n U u U y u n j i i ij j ii i nn

·3· Chapter 7. Solution of linear algebraic equations 线性代数方程组的解法

1211

1

,,,~~

~

nniuUyU

u

U

yu

n

ijjiji

iii

nn

nn

(7.8)

Equation (7.7) is commonly called forward elimination while Eq. (7.8) is called back

substitution.

Based on the organization of Fig. 7.1 it is convenient to consider the coefficient

array to be divided into three parts: part one being the region that is fully reduced; part

two the region which is currently being reduced (called the active zone); and part three

the region which contains the original unreduced coefficients.

Figure 7.1 Triangular decomposition of K.

These regions are shown in Fig. 7.2 where the j th column above the diagonal and

the j th row to the left of the diagonal constitute the active zone.

Compu

tation

al Mech

anics

-CUMTB

Page 4: Computational Mechanics-CUMTB·3· Chapter 7. Solution of linear algebraic equations 线性代数方程组的解法 1 2 1 1 1 ~ ~, , , ~ y U u i n n U u U y u n j i i ij j ii i nn

Chapter 7. Solution of linear algebraic equations 线性代数方程组的解法 ·4·

Figure 7.2 Reduced, active, and unreduced parts.

The algorithm for the triangular decomposition of an n×n square matrix can be

deduced from Figs 7.1 and 7.3 as follows:

1111111 LKU , (7.9)

For each active zone j from 2 to n,

jjj

j KUU

KL 11

11

1

1 , (7.10)

132

1

1

1

1

1

jiULKU

ULKU

L

i

mmjimijij

i

mmijmji

iiji

,,,

(7.11)

and finally with Ljj=1

1

1

j

mmjjmjjjj ULKU (7.12)

The ordering of the reduction process and the terms used are shown in Fig. 7.3.

The results from Fig. 7.1 and Eqs. (7.9)–(7.12) can be verified using the matrix given

in the example shown in Table 7.1.

Compu

tation

al Mech

anics

-CUMTB

Page 5: Computational Mechanics-CUMTB·3· Chapter 7. Solution of linear algebraic equations 线性代数方程组的解法 1 2 1 1 1 ~ ~, , , ~ y U u i n n U u U y u n j i i ij j ii i nn

·5· Chapter 7. Solution of linear algebraic equations 线性代数方程组的解法

Table 7.1 Example: Triangular Decomposition of 3×3 Matrix.

Once the triangular decomposition of the coefficient matrix is computed, several

solutions for different right-hand sides f can be computed using Eqs. (7.7) and (7.8).

This process is often called a resolution since it is not necessary to recompute the L and

U arrays. For large size coefficient matrices the triangular decomposition step is very

costly while a resolution is relatively cheap; consequently, a resolution capability is

necessary in any finite element solution system using a direct method.

Figure 7.3 Terms used to construct Uij and Lji.

Compu

tation

al Mech

anics

-CUMTB

Page 6: Computational Mechanics-CUMTB·3· Chapter 7. Solution of linear algebraic equations 线性代数方程组的解法 1 2 1 1 1 ~ ~, , , ~ y U u i n n U u U y u n j i i ij j ii i nn

Chapter 7. Solution of linear algebraic equations 线性代数方程组的解法 ·6·

7.2 Problems

7.2.1 Based on the triangular decomposition of stiffness matrix K, compute the

displacements.

1

4

8

621

262

126

with~ fKfuK , (7.13)

References

[1] A. Ralston, A First Course in Numerical Analysis, McGraw-Hill, New York, 1965.

[2] J.H. Wilkinson, C. Reinsch, Linear Algebra, Handbook for Automatic Computation,

vol. II, Springer-Verlag, Berlin, 1971.

[3] J. Demmel, Applied Numerical Linear Algebra, Society for Industrial and Applied

Mathematics, Philadelphia, PA, 1997.

[4] R.L. Taylor, Solution of linear equations by a profile solver, Eng. Comput. 2 (1985)

344–350.

[5] G. Strang, Linear Algebra and ItsApplication, Academic Press, NewYork, 1976.

Compu

tation

al Mech

anics

-CUMTB