node8.html
来自「htmdoc for html coding」· HTML 代码 · 共 496 行
HTML
496 行
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2 Final//FR"><!-- Converted with LaTeX2HTML 95.1 (Fri Jan 20 1995) --><!-- by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds --><!-- Modified Simulog 03/97 --><HTML><HEAD><TITLE>1.3 Solution by an iterative method</TITLE><LINK REL=STYLESHEET TYPE="text/css" HREF="./Modulef.css" TITLE="Modulef CSS"><meta name="description" value="1.3 Solution by an iterative method"><meta name="keywords" value="Guide5"><meta name="resource-type" value="document"><meta name="distribution" value="global"></HEAD><BODY BGCOLOR="#FFFFFF"><P> <IMG SRC="../icons/smallmod.gif" WIDTH=211 HEIGHT=50 ALIGN=BOTTOM ALT="Modulef"><A NAME=tex2html400 HREF="node7.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/previous_motif.gif" ALT="previous"></A><A NAME=tex2html406 HREF="node5.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/up_motif.gif" ALT="up"></A><A NAME=tex2html408 HREF="node9.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/next_motif.gif" ALT="next"></A><A NAME=tex2html410 HREF="node2.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/contents_motif.gif" ALT="contents"></A><A HREF="../Guide5-18/node8.html"><IMG BORDER=0 SRC="../icons/zoom18.gif" ALIGN=BOTTOM ALT="[BIG]"></A><A HREF="../Guide5-14/node8.html"><IMG BORDER=0 SRC="../icons/zoom14.gif" ALIGN=BOTTOM ALT="[Normal]"></A><A HREF="../Guide5-10/node8.html"><IMG BORDER=0 SRC="../icons/zoom10.gif" ALIGN=BOTTOM ALT="[small]"></A><BR><B> Next: </B> <A NAME=tex2html409 HREF="node9.html">1.4 Solution by domain decomposition</A><B>Up: </B> <A NAME=tex2html407 HREF="node5.html">1 Solution of linear systems</A><B> Prev: </B> <A NAME=tex2html401 HREF="node7.html">1.2 Solution by a direct method</A><B><A HREF="node2.html" >Contents</A></B><HR SIZE=3 WIDTH="75%"><H1><A NAME=SECTION03130000000000000000>1.3 Solution by an iterative method</A></H1><P><P><P><H2><A NAME=SECTION03131000000000000000>1.3.1 Introduction</A></H2><P><P><P>The methods presented in this chapter are classical methods, of conjugate gradient type, for the solution of linear systems.We can distinguish between:<P><UL><LI> The classical conjugate gradient method, preconditioned <A NAME=810> </A> or not, used when matrix <b>A</b> of the linear system to be solved is <b> symmetric positive definite</b><A NAME=812> </A><A NAME=813> </A>.<LI> The accelerated double conjugate gradient method <A NAME=814> </A> preconditioned by incomplete factorization <A NAME=815> </A> of matrix<b>A</b>, for the <b> non-symmetric</b> case<A NAME=817> </A>.</UL><P>The first method is implemented in the MODULEF code with three different preconditioning techniques. The matrix is storedin an AMAT type data structure.<P><P><P><H2><A NAME=SECTION03132000000000000000>1.3.2 The AMAT data structure</A></H2><P><P><P>For more details consult [<A HREF="node44.html#guide2"><A NAME=tex2html208 HREF="../Guide2/welcome.html">MODULEF User Guide - 2</A></A>].<P><P><P><H3><A NAME=SECTION03132100000000000000> Contents</A></H3><P><P><P>This DS is used to store the non-zero coefficients of a "finite element" type rectangular or square sparse matrix. This type of storageis called <i> compact</i> storage.<P>The DS <b> AMAT</b> is composed of seven arrays of predefined order.<P><DL COMPACT><DT>Array AMA0:<DD> General information. <BR><P>This integer array contains 32 variables, giving a description of the job(title, date, name), of the DS <b> AMAT</b> (type, level, ...), and indicates the presence (or absence) of array <b> AMA1</b>:<P><P><P><DL COMPACT><DT> 1:20 <tt> TITLE</tt><DD><P>the job title in 20 words of 4 characters (stored in integers),<P> </DL><P><DL COMPACT><DT> 21:22 <tt> DATE</tt><DD><P>the creation date in 2 words of 4 characters (ditto),<P> </DL><P><DL COMPACT><DT> 23:28 <tt> NOMCRE</tt><DD><P>the name of the creator in 6 words of 4 characters (ditto),<P> </DL><P><DL COMPACT><DT> 29 <tt> 'AMAT'</tt><DD><P>the DS type,<P> </DL><P><DL COMPACT><DT> 30 <tt> NIVEAU</tt><DD><P>the DS level,<P> </DL><P><DL COMPACT><DT> 31 <tt> ETAT</tt><DD><P>a reserved parameter,<P> </DL><P><DL COMPACT><DT> 32 <tt> NTACM</tt><DD><P>the number of supplementary arrays corresponding to the DS. <BR> (they are described in array <b> AMA1</b>).<P> </DL><P><DT>Array AMA1:<DD> Description of any supplementary arrays. <BR><P>This array is analogous to array <b> B1</b> of DS <b> B</b> (see thisDS).<P><DT>Array AMA2:<DD> General matrix description. <BR><P>This integer array contains 10 values:<P><P><P><DL COMPACT><DT> 1 <tt> NTDL</tt><DD><P>matrix order,<P> </DL><P><DL COMPACT><DT> 2 <tt> NTYP</tt><DD><P>the type of matrix coefficients,<P> </DL><P><DL COMPACT><DT> 3 <tt> NTCOEF</tt><DD><P>the number of <em> a priori</em> non-zero matrix coefficients,<P> </DL><P><DL COMPACT><DT> 4 <tt> NMO56</tt><DD><P>the number of words necessary in M.M. to store arrays <b> AMA5</b> and <b> AMA6</b>,<P> </DL><P><DL COMPACT><DT> 5 <tt> NPAGE</tt><DD><P>the number of pages for the matrix (if secondary memory is used),<P> </DL><P><DL COMPACT><DT> 6 <tt> NCODSA</tt><DD><P>the type of matrix storage: <UL><LI> 1: symmetric matrix; only the lower triangle is stored, line per line,<LI> 0: diagonal matrix,<LI> -1: non-symmetric matrix; stored line per line, the diagonal coefficient coming last.<LI> -l: non-symmetric rectangular matrix; stored line per line, of l lines and <b> NTDL</b> columns, <BR> </UL> </DL><P><DL COMPACT><DT> 7 <tt> ND</tt><DD><P>the number of degrees of freedom per node if it is constant, or 0,<P> </DL><P><DL COMPACT><DT> 8 <tt> NOE</tt><DD><P>the number of nodes,<P> </DL><P><DL COMPACT><DT> 9 <tt> NMASMS</tt><DD><P>the number of matrices assembled and stored in S.M. (if 0: <b> AMA5</b> exists but <b> AMA6</b>is absent),<P> </DL><P><DL COMPACT><DT> 10 <tt> NFACTO</tt><DD><P>the type of matrix factorization,<UL><LI> 0: no factorization,<LI> 1: complete or incomplete Cholesky factorization,<LI> 2: complete or incomplete Crout factorization.</UL> </DL><P><DT>Array AMA3:<DD> Pointer to the last line on each page. <BR><P>This integer array of NPAGE + 1 words contains:<P><UL><LI> AMA3(1) = 0,<LI> AMA3(i+1) = the number of the last line of page i of the matrix.</UL><P><DT>Array AMA4:<DD> Pointer to the diagonal coefficient of each line. <BR><P>This integer array of NTDL + 1 (or 2) words in length contains:<P><UL><LI> if NCODSA = 0<UL><LI> AMA4(1) = 0<LI> AMA4(2) = NTDL. In this case, array <b> AMA5</b> does not exist.</UL><LI> if NCODSA = 1 or -1 <UL><LI> AMA4(1) = 0<LI> AMA4(i+1) = the index of the couple (i,A<IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img18.gif"> of the diagonal coefficient A<IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img19.gif"> (pointstherefore to <b> AMA5</b> and <b> AMA6</b>)</UL> <LI> if NCODSA = -l <UL><LI> AMA4(1) = 0<LI> AMA4(i+1) = the number of the last coefficient of line i.</UL></UL><P><DT>Array AMA5:<DD> Pointer to the columns. <BR><P>This integer array contains NTCOEF words if NCODSA <IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img3.gif"> 0 and 0 words if not:<P><UL><LI> AMA5(k) = column number of the k-th <em> a priori</em> non-zero matrix coefficient .</UL><P><DT>Array AMA6:<DD> The matrix coefficients. <BR><P>This array of type NTYP contains the NTCOEF non-zero matrix coefficients:<P><UL><LI> AMA6(k) = value of the k-th non-zero matrix coefficient.</UL><P> </DL><P><P><P><H3><A NAME=SECTION03132200000000000000> Example 1: Diagonal matrix in M.M. </A></H3><P><P><P>Consider the 9-th order matrix shown below (the values indicated correspond to the rows of the matrix storage and not matrix coefficients):<P><DIV ALIGN=center><IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img20.gif"></DIV> <P><P>Thus, we have:<P><UL><LI> NCODSA = 0<LI> array <b> AMA3</b>: (0 9)<LI> array <b> AMA4</b>: (0 9)<LI> array <b> AMA5</b> does not exist<LI> array <b> AMA6</b>:<DIV ALIGN=center><IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img21.gif"></DIV></UL><P><P><P><H3><A NAME=SECTION03132300000000000000> Example 2: Symmetric matrix in M.M.</A></H3><P><P><P>Consider the following 9-th order matrix (the values indicated correspond to the rows of the matrix storage and not to the matrix coefficients):<P><DIV ALIGN=center><IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img22.gif"></DIV> <P><P>Thus, we have:<P><UL><LI> NCODSA = 1 <LI> array <b> AMA3</b>:<DIV ALIGN=center><IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img23.gif"></DIV> <P> <LI> array <b> AMA4</b>:<DIV ALIGN=center><IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img24.gif"></DIV> <P> <LI> array <b> AMA5</b>:<DIV ALIGN=center><IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img25.gif"></DIV> <P> <LI> array <b> AMA6</b>:<DIV ALIGN=center><IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img26.gif"></DIV> <DIV ALIGN=center><IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img27.gif"></DIV> <P> </UL><P>The correspondence between arrays <b> AMA3</b>, <b> AMA4</b> and <b> AMA5</b>, therefore theposition of the matrix coefficients in array <b> AMA6</b>, is illustrated in figure <A HREF="#figex1amat">1.1</A>.<P><P><A NAME=1474> </A><IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img28.gif"><BR><STRONG>Figure 1.1:</STRONG> <i> Correspondence for example 2</i><A NAME=1470iCorrespondenceforexample2i1470> </A><BR><P><P><P><P><P><H3><A NAME=SECTION03132400000000000000> Example 3: Non-symmetric matrix in M.M.</A></H3><P><P><P>Consider the following 9-th order matrix (the values indicated correspond to the rows of the matrix storage and not to the matrix coefficients):<P><DIV ALIGN=center><IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img29.gif"></DIV> <P><P>Thus, we have:<P><UL><LI> NCODSA = -1 <LI> array <b> AMA3</b>:<DIV ALIGN=center><IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img23.gif"></DIV> <P> <LI> array <b> AMA4</b>:<DIV ALIGN=center><IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img30.gif"></DIV> <P> <LI> array <b> AMA5</b>:<DIV ALIGN=center><IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img31.gif"></DIV> <P> <LI> array <b> AMA6</b>:<DIV ALIGN=center><IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img32.gif"></DIV> <DIV ALIGN=center><IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img33.gif"></DIV> <P> </UL><P>The correspondence between arrays <b> AMA3</b>, <b> AMA4</b> and <b> AMA5</b>, therefore thepositions of the matrix coefficients in array <b> AMA6</b>, is illustrated in figure <A HREF="#figex3amat">1.2</A>.<P><P><A NAME=1484> </A><IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img34.gif"><BR><STRONG>Figure 1.2:</STRONG> <i> Correspondence for example 3</i><A NAME=1480iCorrespondenceforexample3i1480> </A><BR><P><P><P><P><P>For the symmetric case<A NAME=1201> </A>, matrix <b>A</b>is stored in a one-dimensional array AMAT6<A NAME=1202> </A> as follows:for each row <b>i</b>, we only retain the <b> non-zero</b> coefficients <IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img10.gif">, for <IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img11.gif"><FONT color="#B8860B" SIZE=-1><I>(<IMG ALIGN=middle SRC="../icons/foot_motif.gif" ALT="[note]"> see the description of D.S. MUA for the definition of <b>mc(i)</b>)</I></FONT>, ordered according to increasing index of column <b>j</b>.The rows are therefore ordered in increasing order in AMAT6.To manage the correspondence between AMAT6 and<b>A</b>, pointer AMAT4<A NAME=1206> </A> is used to indicate the address of the last non-zero coefficient <IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img10.gif"> inAMAT6 for each row <b>i</b>.Lastly, pointer AMAT5<A NAME=1208> </A> of the same size as AMAT6, and ordered in a coherent manner, gives the corresponding index of column <b>j</b>for each coefficient <IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img10.gif">.We therefore only store the non-zero coefficients of matrix <b>A</b>. Address <b>ia</b> in AMAT6 of an arbitrary coefficient <IMG BORDER=0 ALIGN=MIDDLE ALT="" SRC="img10.gif"> is notaccessible directly, and it is necessary to search for the column <b>j</b>'s index in AMAT5 between addresses AMAT4(i)+1 and AMAT4(i+1).<P>For the non-symmetric case<A NAME=1211> </A>, we adopt the same form of storage,i.e. we keep all the non-zero coefficients of the complete row, by ordering them by increasing column index, with the exception of thediagonal coefficient, placed at the end of the row.<P><P><P>This storage mode is called <b> compact storage<A NAME=1212> </A></b>, also called <b> Morse storage<A NAME=1213> </A></b> in MODULEF.<P><P><P><HR SIZE=3 WIDTH="75%"><IMG SRC="../icons/smallmod.gif" WIDTH=211 HEIGHT=50 ALIGN=BOTTOM ALT="Modulef"><A NAME=tex2html400 HREF="node7.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/previous_motif.gif" ALT="previous"></A><A NAME=tex2html406 HREF="node5.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/up_motif.gif" ALT="up"></A><A NAME=tex2html408 HREF="node9.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/next_motif.gif" ALT="next"></A><A NAME=tex2html410 HREF="node2.html"><IMG BORDER=0 ALIGN=BOTTOM SRC="../icons/contents_motif.gif" ALT="contents"></A><A HREF="../Guide5-18/node8.html"><IMG BORDER=0 SRC="../icons/zoom18.gif" ALIGN=BOTTOM ALT="[BIG]"></A><A HREF="../Guide5-14/node8.html"><IMG BORDER=0 SRC="../icons/zoom14.gif" ALIGN=BOTTOM ALT="[Normal]"></A><A HREF="../Guide5-10/node8.html"><IMG BORDER=0 SRC="../icons/zoom10.gif" ALIGN=BOTTOM ALT="[small]"></A><BR><B> Next: </B> <A NAME=tex2html409 HREF="node9.html">1.4 Solution by domain decomposition</A><B>Up: </B> <A NAME=tex2html407 HREF="node5.html">1 Solution of linear systems</A><B> Prev: </B> <A NAME=tex2html401 HREF="node7.html">1.2 Solution by a direct method</A><B><A HREF="node2.html" >Contents</A></B><BR> <HR><P><ADDRESS></ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?