translation updated for sparse.
[scilab.git] / scilab / modules / sparse / help / ja_JP / iterativesolvers / gmres.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
5  * Copyright (C) XXXX-2008 - INRIA
6  * 
7  * This file must be used under the terms of the CeCILL.
8  * This source file is licensed as described in the file COPYING, which
9  * you should have received as part of this distribution.  The terms
10  * are also available at    
11  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
12  *
13  -->
14
15 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="gmres">
16     
17     <refnamediv>
18         
19         <refname>gmres</refname>
20         
21         <refpurpose>Generalized Minimum RESidual 法</refpurpose>
22         
23     </refnamediv>
24     
25     <refsynopsisdiv>
26         
27         <title>呼び出し手順</title>
28         
29         <synopsis>[x,flag,err,iter,res] = gmres(A,b,[rstr,[tol,[maxi,[M,[x0]]]]])</synopsis>
30         
31     </refsynopsisdiv>
32     
33     <refsection>
34         
35         <title>引数</title>
36         
37         <variablelist>
38             
39             <varlistentry>
40                 
41                 <term>A</term>
42                 
43                 <listitem>
44                     
45                     <para>
46                         
47                         n行n列行列または<literal>A*x</literal>を返す関数.
48                         
49                         <literal>A</literal>が関数の場合,以下のようなヘッダを有すること:
50                         
51                     </para>
52                     
53                     <programlisting role=""><![CDATA[ 
54 function y = A ( x )
55 ]]></programlisting>
56                     
57                 </listitem>
58                 
59             </varlistentry>
60             
61             <varlistentry>
62                 
63                 <term>b</term>
64                 
65                 <listitem>
66                     
67                     <para>右辺ベクトル</para>
68                     
69                 </listitem>
70                 
71             </varlistentry>
72             
73             <varlistentry>
74                 
75                 <term>x0</term>
76                 
77                 <listitem>
78                     
79                     <para>初期推定値ベクトル(デフォルト: zeros(n,1))</para>
80                     
81                 </listitem>
82                 
83             </varlistentry>
84             
85             <varlistentry>
86                 
87                 <term>M</term>
88                 
89                 <listitem>
90                     
91                     <para>
92                         
93                         プリコンディショナ: n行n列行列(デフォルト: eye(n,n))または
94                         
95                         <literal>M*x</literal>を返す関数.
96                         
97                         M が関数の場合,以下のようなヘッダを有すること:
98                         
99                     </para>
100                     
101                     <programlisting role=""><![CDATA[ 
102 function y = M ( x )
103  ]]></programlisting>
104                     
105                 </listitem>
106                 
107             </varlistentry>
108             
109             <varlistentry>
110                 
111                 <term>rstr</term>
112                 
113                 <listitem>
114                     
115                     <para>リスタートまでの反復回数 (デフォルト: 10)</para>
116                     
117                 </listitem>
118                 
119             </varlistentry>
120             
121             <varlistentry>
122                 
123                 <term>maxi</term>
124                 
125                 <listitem>
126                     
127                     <para>最大反復回数 (デフォルト: n)</para>
128                     
129                 </listitem>
130                 
131             </varlistentry>
132             
133             <varlistentry>
134                 
135                 <term>tol</term>
136                 
137                 <listitem>
138                     
139                     <para>許容誤差 (デフォルト: 1e-6)</para>
140                     
141                 </listitem>
142                 
143             </varlistentry>
144             
145             <varlistentry>
146                 
147                 <term>x</term>
148                 
149                 <listitem>
150                     
151                     <para>解のベクトル</para>
152                     
153                 </listitem>
154                 
155             </varlistentry>
156             
157             <varlistentry>
158                 
159                 <term>err</term>
160                 
161                 <listitem>
162                     
163                     <para>最終残差ノルム</para>
164                     
165                 </listitem>
166                 
167             </varlistentry>
168             
169             <varlistentry>
170                 
171                 <term>iter</term>
172                 
173                 <listitem>
174                     
175                     <para>実行した反復回数</para>
176                     
177                 </listitem>
178                 
179             </varlistentry>
180             
181             <varlistentry>
182                 
183                 <term>flag</term>
184                 
185                 <listitem>
186                     
187                     <variablelist>
188                         
189                         <varlistentry>
190                             
191                             <term>0 =</term>
192                             
193                             <listitem>
194                                 
195                                 <para>
196                                     
197                                     <literal>gmres</literal>は,
198                                     
199                                     <literal>maxi</literal>回の反復内に
200                                     
201                                     指定した許容誤差に収束しました
202                                     
203                                 </para>
204                                 
205                             </listitem>
206                             
207                         </varlistentry>
208                         
209                         <varlistentry>
210                             
211                             <term>1 =</term>
212                             
213                             <listitem>
214                                 
215                                 <para>
216                                     
217                                     指定した <literal>maxi</literal>回では収束しませんでした
218                                     
219                                 </para>
220                                 
221                             </listitem>
222                             
223                         </varlistentry>
224                         
225                     </variablelist>
226                     
227                 </listitem>
228                 
229             </varlistentry>
230             
231             <varlistentry>
232                 
233                 <term>res</term>
234                 
235                 <listitem>
236                     
237                     <para>残差ベクトル</para>
238                     
239                 </listitem>
240                 
241             </varlistentry>
242             
243         </variablelist>
244         
245     </refsection>
246     
247     <refsection>
248         
249         <title>説明</title>
250         
251         <variablelist>
252             
253             <varlistentry>
254                 
255                 <term>GMRES </term>
256                 
257                 <listitem>
258                     
259                     <para>
260                         
261                         線形システム<literal>Ax=b</literal>をリスタート付きの
262                         
263                         Generalized Minimal residual法により解きます.
264                         
265                     </para>
266                     
267                 </listitem>
268                 
269             </varlistentry>
270             
271             <varlistentry>
272                 
273                 <term>詳細</term>
274                 
275                 <listitem>
276                     
277                     <para>このアルゴリズムの詳細は以下の文献に記述されています :</para>
278                     
279                     <para>"Templates for the Solution of Linear Systems: Building Blocks for
280                         
281                         Iterative Methods", Barrett, Berry, Chan, Demmel, Donato, Dongarra,
282                         
283                         Eijkhout, Pozo, Romine, and Van der Vorst, SIAM Publications, 1993 (ftp
284                         
285                         netlib2.cs.utk.edu; cd linalg; get templates.ps).
286                         
287                     </para>
288                     
289                     <para>"Iterative Methods for Sparse Linear Systems, Second Edition" Saad,
290                         
291                         SIAM Publications, 2003 (ftp ftp.cs.umn.edu; cd dept/users/saad/PS; get
292                         
293                         all_ps.zip).
294                         
295                     </para>
296                     
297                 </listitem>
298                 
299             </varlistentry>
300             
301         </variablelist>
302         
303     </refsection>
304     
305     <refsection>
306         
307         <title>例</title>
308         
309         <programlisting role="example"><![CDATA[
310         // A および M が行列の場合
311 A=[ 94  0   0   0    0   28  0   0   32  0  
312      0   59  13  5    0   0   0   10  0   0  
313      0   13  72  34   2   0   0   0   0   65 
314      0   5   34  114  0   0   0   0   0   55 
315      0   0   2   0    70  0   28  32  12  0  
316      28  0   0   0    0   87  20  0   33  0  
317      0   0   0   0    28  20  71  39  0   0  
318      0   10  0   0    32  0   39  46  8   0  
319      32  0   0   0    12  33  0   8   82  11 
320      0   0   65  55   0   0   0   0   11  100];
321 b=ones(10,1);
322 [x,flag,err,iter,res] = gmres(A, b)
323 M = eye(10, 10);
324 [x,flag,err,iter,res] = gmres(A, b, 10, 1d-12, 20, M, zeros(10, 1))
325         // Aが行列, Mが関数の場合
326         A=[ 94  0   0   0    0   28  0   0   32  0  
327      0   59  13  5    0   0   0   10  0   0  
328      0   13  72  34   2   0   0   0   0   65 
329      0   5   34  114  0   0   0   0   0   55 
330      0   0   2   0    70  0   28  32  12  0  
331      28  0   0   0    0   87  20  0   33  0  
332      0   0   0   0    28  20  71  39  0   0  
333      0   10  0   0    32  0   39  46  8   0  
334      32  0   0   0    12  33  0   8   82  11 
335      0   0   65  55   0   0   0   0   11  100];
336 b=ones(10,1);
337 function y = Mtimesx(x)
338 M = eye(10,10);
339 y = M*x;
340 endfunction
341 [x,flag,err,iter,res] = gmres(A, b, 10, 1d-12, 20, Mtimesx, zeros(10, 1))
342         // A が関数, M が行列の場合
343         function y = Atimesx(x)
344         A=[ 94  0   0   0    0   28  0   0   32  0  
345      0   59  13  5    0   0   0   10  0   0  
346      0   13  72  34   2   0   0   0   0   65 
347      0   5   34  114  0   0   0   0   0   55 
348      0   0   2   0    70  0   28  32  12  0  
349      28  0   0   0    0   87  20  0   33  0  
350      0   0   0   0    28  20  71  39  0   0  
351      0   10  0   0    32  0   39  46  8   0  
352      32  0   0   0    12  33  0   8   82  11 
353      0   0   65  55   0   0   0   0   11  100];
354          y = A * x;
355          endfunction
356          b = ones(10,1);
357          M = eye(10, 10);
358          [x,flag,err,iter,res] = gmres(Atimesx, b)
359          [x,flag,err,iter,res] = gmres(Atimesx, b, 10, 1d-12, 20, M, zeros(10,1))
360          // A および M が関数
361          function y = Atimesx(x)
362         A=[ 94  0   0   0    0   28  0   0   32  0  
363      0   59  13  5    0   0   0   10  0   0  
364      0   13  72  34   2   0   0   0   0   65 
365      0   5   34  114  0   0   0   0   0   55 
366      0   0   2   0    70  0   28  32  12  0  
367      28  0   0   0    0   87  20  0   33  0  
368      0   0   0   0    28  20  71  39  0   0  
369      0   10  0   0    32  0   39  46  8   0  
370      32  0   0   0    12  33  0   8   82  11 
371      0   0   65  55   0   0   0   0   11  100];
372          y = A * x;
373          endfunction
374          function y = Mtimesx(x)
375 M = eye(10,10);
376 y = M*x;
377 endfunction
378          [x,flag,err,iter,res] = gmres(Atimesx, b, 10, 1d-12, 20, Mtimesx, zeros(10,1))
379  ]]></programlisting>
380         
381     </refsection>
382     
383     <refsection role="see also">
384         
385         <title>参照</title>
386         
387         <simplelist type="inline">
388             
389             <member>
390                 
391                 <link linkend="conjgrad">conjgrad</link>
392                 
393             </member>
394             
395             <member>
396                 
397                 <link linkend="qmr">qmr</link>
398                 
399             </member>
400             
401         </simplelist>
402         
403     </refsection>
404     
405 </refentry>
406