summaryrefslogtreecommitdiff
path: root/modules/umfpack/help/en_US/rafiter.xml
blob: 1ae2035b5a34fdf5a0cc4b6b2c138f81ebea34cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?xml version="1.0" encoding="UTF-8"?>
<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="en" xml:id="rafiter">
    <refnamediv>
        <refname>rafiter</refname>
        <refpurpose>
            Iterative refinement for a s.p.d. linear system. <emphasis role="bold">This function is obsolete.</emphasis>  
        </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Calling Sequence</title>
        <synopsis>[xn, rn] = rafiter(A, C_ptr, b, x0, [, nb_iter, verb])</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>A  </term>
                <listitem>
                    <para>a real symmetric positive definite sparse matrix</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>C_ptr  </term>
                <listitem>
                    <para>a pointer to a Cholesky factorization (got with taucs_chfact)</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>b  </term>
                <listitem>
                    <para>column vector (r.h.s of the linear system) but "matrix" (multiple r.h.s.) are allowed.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>x0  </term>
                <listitem>
                    <para>first solution obtained with taucs_chsolve(C_ptr, b)</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>nb_iter  </term>
                <listitem>
                    <para>(optional) number of raffinement iterations (default 2)</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>verb  </term>
                <listitem>
                    <para>(optional) boolean, must be %t for displaying the intermediary results, 
                        and %f (default) if you do not want.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>xn  </term>
                <listitem>
                    <para>new refined solution</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>rn  </term>
                <listitem>
                    <para>
                        residual (<literal>A*xn - b</literal>)
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            This function is somewhat obsolete, use <literal>x = taucs_chsolve(C_ptr,b,A)</literal>
            (see <link linkend="taucs_chsolve">taucs_chsolve</link>) which do one iterative refinement step.
        </para>
        <para>
            To use if you want to improve a little the solution got with taucs_chsolve.
            Note that with verb=%t the displayed internal steps are essentially meaningful 
            in the case where b is a column vector.
        </para>
    </refsection>
    <refsection>
        <title>Caution</title>
        <para>
            Currently there is no verification for the input parameters !
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[ 
[A] = ReadHBSparse(SCI+"/modules/umfpack/examples/bcsstk24.rsa");
C_ptr = taucs_chfact(A);
b = rand(size(A,1),1);
x0 = taucs_chsolve(C_ptr, b);
norm(A*x0 - b)
[xn, rn] = rafiter(A, C_ptr, b, x0, verb=%t);
norm(A*xn - b)
taucs_chdel(C_ptr)
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See Also</title>
        <simplelist type="inline">
            <member>
                <link linkend="taucs_chsolve">taucs_chsolve</link>
            </member>
            <member>
                <link linkend="taucs_chfact">taucs_chfact</link>
            </member>
        </simplelist>
    </refsection>
</refentry>