|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
|
|
"http://www.w3.org/TR/html4/loose.dtd">
|
|
|
|
<html >
|
|
|
|
<head><title>User Interface</title>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
|
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
|
|
|
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
|
|
|
|
<!-- html,3 -->
|
|
|
|
<meta name="src" content="userhtml.tex">
|
|
|
|
<link rel="stylesheet" type="text/css" href="userhtml.css">
|
|
|
|
</head><body
|
|
|
|
>
|
|
|
|
<!--l. 1--><div class="crosslinks"><p class="noindent"><span
|
|
|
|
class="cmbx-12">[</span><a
|
|
|
|
href="userhtmlse7.html" ><span
|
|
|
|
class="cmbx-12">next</span></a><span
|
|
|
|
class="cmbx-12">] [</span><a
|
|
|
|
href="userhtmlse5.html" ><span
|
|
|
|
class="cmbx-12">prev</span></a><span
|
|
|
|
class="cmbx-12">] [</span><a
|
|
|
|
href="userhtmlse5.html#tailuserhtmlse5.html" ><span
|
|
|
|
class="cmbx-12">prev-tail</span></a><span
|
|
|
|
class="cmbx-12">] [</span><a
|
|
|
|
href="#tailuserhtmlse6.html"><span
|
|
|
|
class="cmbx-12">tail</span></a><span
|
|
|
|
class="cmbx-12">] [</span><a
|
|
|
|
href="userhtml.html#userhtmlse6.html" ><span
|
|
|
|
class="cmbx-12">up</span></a><span
|
|
|
|
class="cmbx-12">] </span></p></div>
|
|
|
|
<h3 class="sectionHead"><span class="titlemark"><span
|
|
|
|
class="cmbx-12">6 </span></span> <a
|
|
|
|
id="x19-180006"></a><span
|
|
|
|
class="cmbx-12">User Interface</span></h3>
|
|
|
|
<!--l. 5--><p class="noindent" ><span
|
|
|
|
class="cmbx-12">The basic user interface of AMG4PBLAS consists of eight methods. The six</span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">methods </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">init</span></span></span><span
|
|
|
|
class="cmbx-12">, </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">set</span></span></span><span
|
|
|
|
class="cmbx-12">, </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">build</span></span></span><span
|
|
|
|
class="cmbx-12">, </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">hierarchy_build</span></span></span><span
|
|
|
|
class="cmbx-12">, </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">smoothers_build</span></span></span> <span
|
|
|
|
class="cmbx-12">and </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">apply</span></span></span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">encapsulate all the functionalities for the setup and the application of any</span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">multilevel and one-level preconditioner implemented in the package. The</span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">method </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">free</span></span></span> <span
|
|
|
|
class="cmbx-12">deallocates the preconditioner data structure, while </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">descr</span></span></span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">prints a description of the preconditioner setup by the user. For</span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">backward compatibility, methods are also accessible as stand-alone</span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">subroutines.</span>
|
|
|
|
<!--l. 16--><p class="indent" > <span
|
|
|
|
class="cmbx-12">For each method, the same user interface is overloaded with respect to</span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">the real/ complex case and the single/double precision; arguments with</span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">appropriate data types must be passed to the method, i.e.,</span>
|
|
|
|
<ul class="itemize1">
|
|
|
|
<li class="itemize"><span
|
|
|
|
class="cmbx-12">the sparse matrix data structure, containing the matrix to be</span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">preconditioned, must be of type </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">psb_</span></span></span><span
|
|
|
|
class="cmbxti-10x-x-120">x</span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">spmat_type</span></span></span> <span
|
|
|
|
class="cmbx-12">with </span><span
|
|
|
|
class="cmbxti-10x-x-120">x </span><span
|
|
|
|
class="cmbx-12">= </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">s</span></span></span> <span
|
|
|
|
class="cmbx-12">for</span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">real single precision, </span><span
|
|
|
|
class="cmbxti-10x-x-120">x </span><span
|
|
|
|
class="cmbx-12">= </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">d</span></span></span> <span
|
|
|
|
class="cmbx-12">for real double precision, </span><span
|
|
|
|
class="cmbxti-10x-x-120">x </span><span
|
|
|
|
class="cmbx-12">= </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">c</span></span></span> <span
|
|
|
|
class="cmbx-12">for</span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">complex single precision, </span><span
|
|
|
|
class="cmbxti-10x-x-120">x </span><span
|
|
|
|
class="cmbx-12">= </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">z</span></span></span> <span
|
|
|
|
class="cmbx-12">for complex double precision;</span>
|
|
|
|
</li>
|
|
|
|
<li class="itemize"><span
|
|
|
|
class="cmbx-12">the preconditioner data structure must be of type </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">amg_</span></span></span><span
|
|
|
|
class="cmbxti-10x-x-120">x</span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">prec_type</span></span></span><span
|
|
|
|
class="cmbx-12">,</span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">with </span><span
|
|
|
|
class="cmbxti-10x-x-120">x </span><span
|
|
|
|
class="cmbx-12">= </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">s</span></span></span><span
|
|
|
|
class="cmbx-12">, </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">d</span></span></span><span
|
|
|
|
class="cmbx-12">, </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">c</span></span></span><span
|
|
|
|
class="cmbx-12">, </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">z</span></span></span><span
|
|
|
|
class="cmbx-12">, according to the sparse matrix data structure;</span>
|
|
|
|
</li>
|
|
|
|
<li class="itemize"><span
|
|
|
|
class="cmbx-12">the arrays containing the vectors </span><span
|
|
|
|
class="cmmi-12">v </span><span
|
|
|
|
class="cmbx-12">and </span><span
|
|
|
|
class="cmmi-12">w </span><span
|
|
|
|
class="cmbx-12">involved in</span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">the preconditioner application </span><span
|
|
|
|
class="cmmi-12">w </span><span
|
|
|
|
class="cmr-12">= </span><span
|
|
|
|
class="cmmi-12">B</span><sup><span
|
|
|
|
class="cmsy-8">-</span><span
|
|
|
|
class="cmr-8">1</span></sup><span
|
|
|
|
class="cmmi-12">v </span><span
|
|
|
|
class="cmbx-12">must be of type</span>
|
|
|
|
<span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">psb_</span></span></span><span
|
|
|
|
class="cmbxti-10x-x-120">x</span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">vect_type</span></span></span> <span
|
|
|
|
class="cmbx-12">with </span><span
|
|
|
|
class="cmbxti-10x-x-120">x </span><span
|
|
|
|
class="cmbx-12">= </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">s</span></span></span><span
|
|
|
|
class="cmbx-12">, </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">d</span></span></span><span
|
|
|
|
class="cmbx-12">, </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">c</span></span></span><span
|
|
|
|
class="cmbx-12">, </span><span class="obeylines-h"><span class="verb"><span
|
|
|
|
class="cmtt-12">z</span></span></span><span
|
|
|
|
class="cmbx-12">, in a manner completely</span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">analogous to the sparse matrix type;</span>
|
|
|
|
</li>
|
|
|
|
<li class="itemize"><span
|
|
|
|
class="cmbx-12">real parameters defining the preconditioner must be declared</span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">according to the precision of the sparse matrix and preconditioner</span>
|
|
|
|
<span
|
|
|
|
class="cmbx-12">data structures (see Section</span><span
|
|
|
|
class="cmbx-12"> </span><a
|
|
|
|
href="userhtmlsu11.html#x21-200006.2"><span
|
|
|
|
class="cmbx-12">6.2</span><!--tex4ht:ref: sec:precset --></a><span
|
|
|
|
class="cmbx-12">).</span></li></ul>
|
|
|
|
<!--l. 39--><p class="noindent" ><span
|
|
|
|
class="cmbx-12">A description of each method is given in the remainder of this section.</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="subsectionTOCS">
|
|
|
|
<span
|
|
|
|
class="cmbx-12"> </span><span class="subsectionToc" ><span
|
|
|
|
class="cmbx-12">6.1 </span><a
|
|
|
|
href="userhtmlsu10.html#x20-190006.1"><span
|
|
|
|
class="cmbx-12">Method init</span></a></span>
|
|
|
|
<br /> <span
|
|
|
|
class="cmbx-12"> </span><span class="subsectionToc" ><span
|
|
|
|
class="cmbx-12">6.2 </span><a
|
|
|
|
href="userhtmlsu11.html#x21-200006.2"><span
|
|
|
|
class="cmbx-12">Method set</span></a></span>
|
|
|
|
<br /> <span
|
|
|
|
class="cmbx-12"> </span><span class="subsectionToc" ><span
|
|
|
|
class="cmbx-12">6.3 </span><a
|
|
|
|
href="userhtmlsu12.html#x22-210006.3"><span
|
|
|
|
class="cmbx-12">Method hierarchy</span><span
|
|
|
|
class="cmbx-12">_build</span></a></span>
|
|
|
|
<br /> <span
|
|
|
|
class="cmbx-12"> </span><span class="subsectionToc" ><span
|
|
|
|
class="cmbx-12">6.4 </span><a
|
|
|
|
href="userhtmlsu13.html#x23-220006.4"><span
|
|
|
|
class="cmbx-12">Method smoothers</span><span
|
|
|
|
class="cmbx-12">_build</span></a></span>
|
|
|
|
<br /> <span
|
|
|
|
class="cmbx-12"> </span><span class="subsectionToc" ><span
|
|
|
|
class="cmbx-12">6.5 </span><a
|
|
|
|
href="userhtmlsu14.html#x24-230006.5"><span
|
|
|
|
class="cmbx-12">Method build</span></a></span>
|
|
|
|
<br /> <span
|
|
|
|
class="cmbx-12"> </span><span class="subsectionToc" ><span
|
|
|
|
class="cmbx-12">6.6 </span><a
|
|
|
|
href="userhtmlsu15.html#x25-240006.6"><span
|
|
|
|
class="cmbx-12">Method apply</span></a></span>
|
|
|
|
<br /> <span
|
|
|
|
class="cmbx-12"> </span><span class="subsectionToc" ><span
|
|
|
|
class="cmbx-12">6.7 </span><a
|
|
|
|
href="userhtmlsu16.html#x26-250006.7"><span
|
|
|
|
class="cmbx-12">Method free</span></a></span>
|
|
|
|
<br /> <span
|
|
|
|
class="cmbx-12"> </span><span class="subsectionToc" ><span
|
|
|
|
class="cmbx-12">6.8 </span><a
|
|
|
|
href="userhtmlsu17.html#x27-260006.8"><span
|
|
|
|
class="cmbx-12">Method descr</span></a></span>
|
|
|
|
<br /> <span
|
|
|
|
class="cmbx-12"> </span><span class="subsectionToc" ><span
|
|
|
|
class="cmbx-12">6.9 </span><a
|
|
|
|
href="userhtmlsu18.html#x28-270006.9"><span
|
|
|
|
class="cmbx-12">Auxiliary Methods</span></a></span>
|
|
|
|
<br /> <span
|
|
|
|
class="cmbx-12"> </span><span
|
|
|
|
class="cmbx-12"> </span><span class="subsubsectionToc" ><span
|
|
|
|
class="cmbx-12">6.9.1 </span><a
|
|
|
|
href="userhtmlsu18.html#x28-280006.9.1"><span
|
|
|
|
class="cmbx-12">Method: dump</span></a></span>
|
|
|
|
<br /> <span
|
|
|
|
class="cmbx-12"> </span><span
|
|
|
|
class="cmbx-12"> </span><span class="subsubsectionToc" ><span
|
|
|
|
class="cmbx-12">6.9.2 </span><a
|
|
|
|
href="userhtmlsu18.html#x28-290006.9.2"><span
|
|
|
|
class="cmbx-12">Method: clone</span></a></span>
|
|
|
|
<br /> <span
|
|
|
|
class="cmbx-12"> </span><span
|
|
|
|
class="cmbx-12"> </span><span class="subsubsectionToc" ><span
|
|
|
|
class="cmbx-12">6.9.3 </span><a
|
|
|
|
href="userhtmlsu18.html#x28-300006.9.3"><span
|
|
|
|
class="cmbx-12">Method: sizeof</span></a></span>
|
|
|
|
<br /> <span
|
|
|
|
class="cmbx-12"> </span><span
|
|
|
|
class="cmbx-12"> </span><span class="subsubsectionToc" ><span
|
|
|
|
class="cmbx-12">6.9.4 </span><a
|
|
|
|
href="userhtmlsu18.html#x28-310006.9.4"><span
|
|
|
|
class="cmbx-12">Method: allocate</span><span
|
|
|
|
class="cmbx-12">_wrk</span></a></span>
|
|
|
|
<br /> <span
|
|
|
|
class="cmbx-12"> </span><span
|
|
|
|
class="cmbx-12"> </span><span class="subsubsectionToc" ><span
|
|
|
|
class="cmbx-12">6.9.5 </span><a
|
|
|
|
href="userhtmlsu18.html#x28-320006.9.5"><span
|
|
|
|
class="cmbx-12">Method: free</span><span
|
|
|
|
class="cmbx-12">_wrk</span></a></span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--l. 4--><div class="crosslinks"><p class="noindent"><span
|
|
|
|
class="cmbx-12">[</span><a
|
|
|
|
href="userhtmlse7.html" ><span
|
|
|
|
class="cmbx-12">next</span></a><span
|
|
|
|
class="cmbx-12">] [</span><a
|
|
|
|
href="userhtmlse5.html" ><span
|
|
|
|
class="cmbx-12">prev</span></a><span
|
|
|
|
class="cmbx-12">] [</span><a
|
|
|
|
href="userhtmlse5.html#tailuserhtmlse5.html" ><span
|
|
|
|
class="cmbx-12">prev-tail</span></a><span
|
|
|
|
class="cmbx-12">] [</span><a
|
|
|
|
href="userhtmlse6.html" ><span
|
|
|
|
class="cmbx-12">front</span></a><span
|
|
|
|
class="cmbx-12">] [</span><a
|
|
|
|
href="userhtml.html#userhtmlse6.html" ><span
|
|
|
|
class="cmbx-12">up</span></a><span
|
|
|
|
class="cmbx-12">] </span></p></div>
|
|
|
|
<!--l. 4--><p class="indent" > <a
|
|
|
|
id="tailuserhtmlse6.html"></a>
|
|
|
|
</body></html>
|