documentation
Salvatore Filippone 4 years ago
parent e786f26a05
commit 7f2145a6d4

Binary file not shown.

@ -100,99 +100,80 @@ class="cmr-12">Example and test programs</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">4 </span><a
href="userhtmlse4.html#x13-120004" id="QQ2-13-13"><span
class="cmr-12">Multigrid Background</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">4.1 </span><a
href="userhtmlsu6.html#x14-130004.1" id="QQ2-14-14"><span
class="cmr-12">AMG preconditioners</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">4.2 </span><a
href="userhtmlsu7.html#x15-140004.2" id="QQ2-15-16"><span
class="cmr-12">Smoothed Aggregation</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">4.3 </span><a
href="userhtmlsu8.html#x16-150004.3" id="QQ2-16-17"><span
class="cmr-12">Smoothers and coarsest-level solvers</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">5 </span><a
href="userhtmlse5.html#x17-160005" id="QQ2-17-18"><span
class="cmr-12">Getting Started</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">5.1 </span><a
href="userhtmlsu9.html#x18-170005.1" id="QQ2-18-20"><span
class="cmr-12">4.1 </span><a
href="userhtmlsu6.html#x14-130004.1" id="QQ2-14-15"><span
class="cmr-12">Examples</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">6 </span><a
href="userhtmlse6.html#x19-180006" id="QQ2-19-25"><span
class="cmr-12">5 </span><a
href="userhtmlse5.html#x15-140005" id="QQ2-15-20"><span
class="cmr-12">User Interface</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.1 </span><a
href="userhtmlsu10.html#x20-190006.1" id="QQ2-20-26"><span
class="cmr-12">5.1 </span><a
href="userhtmlsu7.html#x16-150005.1" id="QQ2-16-21"><span
class="cmr-12">Method init</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.2 </span><a
href="userhtmlsu11.html#x21-200006.2" id="QQ2-21-27"><span
class="cmr-12">5.2 </span><a
href="userhtmlsu8.html#x17-160005.2" id="QQ2-17-22"><span
class="cmr-12">Method set</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.3 </span><a
href="userhtmlsu12.html#x22-210006.3" id="QQ2-22-35"><span
class="cmr-12">5.3 </span><a
href="userhtmlsu9.html#x18-170005.3" id="QQ2-18-30"><span
class="cmr-12">Method hierarchy</span><span
class="cmr-12">_build</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.4 </span><a
href="userhtmlsu13.html#x23-220006.4" id="QQ2-23-36"><span
class="cmr-12">5.4 </span><a
href="userhtmlsu10.html#x19-180005.4" id="QQ2-19-31"><span
class="cmr-12">Method smoothers</span><span
class="cmr-12">_build</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.5 </span><a
href="userhtmlsu14.html#x24-230006.5" id="QQ2-24-37"><span
class="cmr-12">5.5 </span><a
href="userhtmlsu11.html#x20-190005.5" id="QQ2-20-32"><span
class="cmr-12">Method build</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.6 </span><a
href="userhtmlsu15.html#x25-240006.6" id="QQ2-25-38"><span
class="cmr-12">5.6 </span><a
href="userhtmlsu12.html#x21-200005.6" id="QQ2-21-33"><span
class="cmr-12">Method apply</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.7 </span><a
href="userhtmlsu16.html#x26-250006.7" id="QQ2-26-39"><span
class="cmr-12">5.7 </span><a
href="userhtmlsu13.html#x22-210005.7" id="QQ2-22-34"><span
class="cmr-12">Method free</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.8 </span><a
href="userhtmlsu17.html#x27-260006.8" id="QQ2-27-40"><span
class="cmr-12">5.8 </span><a
href="userhtmlsu14.html#x23-220005.8" id="QQ2-23-35"><span
class="cmr-12">Method descr</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.9 </span><a
href="userhtmlsu18.html#x28-270006.9" id="QQ2-28-41"><span
class="cmr-12">5.9 </span><a
href="userhtmlsu15.html#x24-230005.9" id="QQ2-24-36"><span
class="cmr-12">Auxiliary Methods</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">7 </span><a
href="userhtmlse7.html#x29-330007" id="QQ2-29-47"><span
class="cmr-12">6 </span><a
href="userhtmlse6.html#x25-290006" id="QQ2-25-42"><span
class="cmr-12">Adding new smoother and solver objects to AMG4PSBLAS</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">8 </span><a
href="userhtmlse8.html#x30-340008" id="QQ2-30-48"><span
class="cmr-12">7 </span><a
href="userhtmlse7.html#x26-300007" id="QQ2-26-43"><span
class="cmr-12">Error Handling</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">A </span><a
href="userhtmlse9.html#x31-35000A" id="QQ2-31-49"><span
href="userhtmlse8.html#x27-31000A" id="QQ2-27-44"><span
class="cmr-12">License</span></a></span>
<br /> <span class="likesectionToc" ><a
href="userhtmlli4.html#x32-36000A" id="QQ2-32-50"><span
href="userhtmlli4.html#x28-32000A" id="QQ2-28-45"><span
class="cmr-12">References</span></a></span>
<br /> <span class="sectionToc" ><a
href="userhtmlli4.html#Q1-32-51"><span
href="userhtmlli4.html#Q1-28-46"><span
class="cmr-12">References</span></a></span>
</div>
@ -204,7 +185,6 @@ class="cmr-12">References</span></a></span>
</body></html>

@ -21,17 +21,11 @@
.cmtt-12{font-family: monospace,monospace;}
.cmcsc-10x-x-120{font-size:109%;}
.cmr-8{font-size:72%;}
.cmr-6{font-size:54%;}
.cmmi-12{font-size:109%;font-style: italic;}
.cmmi-8{font-size:72%;font-style: italic;}
.cmmi-6{font-size:54%;font-style: italic;}
.cmsy-10x-x-120{font-size:109%;}
.cmsy-8{font-size:72%;}
.cmex-10x-x-120{font-size:109%;}
.msbm-10x-x-120{font-size:109%;}
.cmmi-10x-x-109{font-style: italic;}
.cmsy-10x-x-109{}
.cmex-10x-x-109{}
.cmtt-10x-x-109{font-family: monospace,monospace;}
.cmtt-10x-x-109{font-family: monospace,monospace;}
.cmtt-10x-x-109{font-family: monospace,monospace;}

@ -100,99 +100,80 @@ class="cmr-12">Example and test programs</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">4 </span><a
href="userhtmlse4.html#x13-120004" id="QQ2-13-13"><span
class="cmr-12">Multigrid Background</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">4.1 </span><a
href="userhtmlsu6.html#x14-130004.1" id="QQ2-14-14"><span
class="cmr-12">AMG preconditioners</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">4.2 </span><a
href="userhtmlsu7.html#x15-140004.2" id="QQ2-15-16"><span
class="cmr-12">Smoothed Aggregation</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">4.3 </span><a
href="userhtmlsu8.html#x16-150004.3" id="QQ2-16-17"><span
class="cmr-12">Smoothers and coarsest-level solvers</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">5 </span><a
href="userhtmlse5.html#x17-160005" id="QQ2-17-18"><span
class="cmr-12">Getting Started</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">5.1 </span><a
href="userhtmlsu9.html#x18-170005.1" id="QQ2-18-20"><span
class="cmr-12">4.1 </span><a
href="userhtmlsu6.html#x14-130004.1" id="QQ2-14-15"><span
class="cmr-12">Examples</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">6 </span><a
href="userhtmlse6.html#x19-180006" id="QQ2-19-25"><span
class="cmr-12">5 </span><a
href="userhtmlse5.html#x15-140005" id="QQ2-15-20"><span
class="cmr-12">User Interface</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.1 </span><a
href="userhtmlsu10.html#x20-190006.1" id="QQ2-20-26"><span
class="cmr-12">5.1 </span><a
href="userhtmlsu7.html#x16-150005.1" id="QQ2-16-21"><span
class="cmr-12">Method init</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.2 </span><a
href="userhtmlsu11.html#x21-200006.2" id="QQ2-21-27"><span
class="cmr-12">5.2 </span><a
href="userhtmlsu8.html#x17-160005.2" id="QQ2-17-22"><span
class="cmr-12">Method set</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.3 </span><a
href="userhtmlsu12.html#x22-210006.3" id="QQ2-22-35"><span
class="cmr-12">5.3 </span><a
href="userhtmlsu9.html#x18-170005.3" id="QQ2-18-30"><span
class="cmr-12">Method hierarchy</span><span
class="cmr-12">_build</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.4 </span><a
href="userhtmlsu13.html#x23-220006.4" id="QQ2-23-36"><span
class="cmr-12">5.4 </span><a
href="userhtmlsu10.html#x19-180005.4" id="QQ2-19-31"><span
class="cmr-12">Method smoothers</span><span
class="cmr-12">_build</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.5 </span><a
href="userhtmlsu14.html#x24-230006.5" id="QQ2-24-37"><span
class="cmr-12">5.5 </span><a
href="userhtmlsu11.html#x20-190005.5" id="QQ2-20-32"><span
class="cmr-12">Method build</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.6 </span><a
href="userhtmlsu15.html#x25-240006.6" id="QQ2-25-38"><span
class="cmr-12">5.6 </span><a
href="userhtmlsu12.html#x21-200005.6" id="QQ2-21-33"><span
class="cmr-12">Method apply</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.7 </span><a
href="userhtmlsu16.html#x26-250006.7" id="QQ2-26-39"><span
class="cmr-12">5.7 </span><a
href="userhtmlsu13.html#x22-210005.7" id="QQ2-22-34"><span
class="cmr-12">Method free</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.8 </span><a
href="userhtmlsu17.html#x27-260006.8" id="QQ2-27-40"><span
class="cmr-12">5.8 </span><a
href="userhtmlsu14.html#x23-220005.8" id="QQ2-23-35"><span
class="cmr-12">Method descr</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.9 </span><a
href="userhtmlsu18.html#x28-270006.9" id="QQ2-28-41"><span
class="cmr-12">5.9 </span><a
href="userhtmlsu15.html#x24-230005.9" id="QQ2-24-36"><span
class="cmr-12">Auxiliary Methods</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">7 </span><a
href="userhtmlse7.html#x29-330007" id="QQ2-29-47"><span
class="cmr-12">6 </span><a
href="userhtmlse6.html#x25-290006" id="QQ2-25-42"><span
class="cmr-12">Adding new smoother and solver objects to AMG4PSBLAS</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">8 </span><a
href="userhtmlse8.html#x30-340008" id="QQ2-30-48"><span
class="cmr-12">7 </span><a
href="userhtmlse7.html#x26-300007" id="QQ2-26-43"><span
class="cmr-12">Error Handling</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">A </span><a
href="userhtmlse9.html#x31-35000A" id="QQ2-31-49"><span
href="userhtmlse8.html#x27-31000A" id="QQ2-27-44"><span
class="cmr-12">License</span></a></span>
<br /> <span class="likesectionToc" ><a
href="userhtmlli4.html#x32-36000A" id="QQ2-32-50"><span
href="userhtmlli4.html#x28-32000A" id="QQ2-28-45"><span
class="cmr-12">References</span></a></span>
<br /> <span class="sectionToc" ><a
href="userhtmlli4.html#Q1-32-51"><span
href="userhtmlli4.html#Q1-28-46"><span
class="cmr-12">References</span></a></span>
</div>
@ -204,7 +185,6 @@ class="cmr-12">References</span></a></span>
</body></html>

@ -26,9 +26,6 @@ class="cmr-12">] </span></p></div>
class="cmr-12">Abstract</span></h3>
<a
id="Q1-2-2"></a>
<!--l. 5--><p class="noindent" ><span
class="cmcsc-10x-x-120">AMG4PSBLAS (A<span
class="small-caps">l</span><span
@ -79,9 +76,12 @@ class="cmr-12">) is a package of parallel algebraic multilevel preconditioners i
<span
class="cmr-12">PSCToolkit (Parallel Sparse Computation Toolkit) software framework. It is a progress</span>
<span
class="cmr-12">of a software development project started in 2007, named MLD2P4, which</span>
class="cmr-12">of a software development project started in 2007, named MLD2P4, which originally</span>
<span
class="cmr-12">implemented a multilevel version of some domain decomposition preconditioners of</span>
<span
class="cmr-12">additive-Schwarz type and was based on a parallel decoupled version of the well known</span>
<span
@ -89,9 +89,9 @@ class="cmr-12">smoothed aggregation method to generate the multilevel hierarchy
<span
class="cmr-12">matrices. In the last years, within the context of the EU-H2020 EoCoE project</span>
<span
class="cmr-12">(Energy Oriented Center of Excellence), the package was extended including</span>
class="cmr-12">(Energy Oriented Center of Excellence), the package is being extended for</span>
<span
class="cmr-12">new algorithms and functionalities for setup and application of new AMG</span>
class="cmr-12">including new algorithms and functionalities to setup and apply new AMG</span>
<span
class="cmr-12">preconditioners with the final aims of improving efficiency and scalability when tens of</span>
<span
@ -102,25 +102,25 @@ class="cmr-12">symmetric positive definite linear systems. Due to the significan
class="cmr-12">of changes and the increase in scope, we decided to rename the package as</span>
<span
class="cmr-12">AMG4PSBLAS.</span>
<!--l. 10--><p class="indent" > <span
class="cmr-12">AMG4PSBLAS has been designed to provide scalable and easy-to-use</span>
<!--l. 14--><p class="indent" > <span
class="cmr-12">AMG4PSBLAS is designed to provide scalable and easy-to-use preconditioners in</span>
<span
class="cmr-12">preconditioners in the context of the PSBLAS (Parallel Sparse Basic Linear Algebra</span>
class="cmr-12">the context of the PSBLAS (Parallel Sparse Basic Linear Algebra Subprograms)</span>
<span
class="cmr-12">Subprograms) computational framework and can be used in conjuction with the Krylov</span>
class="cmr-12">computational framework and can be used in conjuction with the Krylov solvers</span>
<span
class="cmr-12">solvers available in this framework. Our package is based on a completely algebraic</span>
class="cmr-12">available in this framework. Our package is based on a completely algebraic approach</span>
<span
class="cmr-12">approach and users level interfaces assume that the system matrix and preconditioners</span>
class="cmr-12">and users level interfaces assume that the system matrix and preconditioners are</span>
<span
class="cmr-12">are represented as PSBLAS distributed sparse matrices. AMG4PSBLAS enables the</span>
class="cmr-12">represented as PSBLAS distributed sparse matrices. AMG4PSBLAS enables the user</span>
<span
class="cmr-12">user to easily specify different features of an algebraic multilevel preconditioner, thus</span>
class="cmr-12">to easily specify different features of an algebraic multilevel preconditioner, thus</span>
<span
class="cmr-12">allowing to experiment with different preconditioners for the problem and parallel</span>
<span
class="cmr-12">computers at hand.</span>
<!--l. 21--><p class="indent" > <span
<!--l. 25--><p class="indent" > <span
class="cmr-12">The package employs object-oriented design techniques in Fortran</span><span
class="cmr-12">&#x00A0;2003, with</span>
<span
@ -134,7 +134,7 @@ class="cmr-12">parallel implementation is based on a Single Program Multiple Dat
class="cmr-12">paradigm; the inter-process communication is based on MPI and is managed mainly</span>
<span
class="cmr-12">through PSBLAS.</span>
<!--l. 29--><p class="indent" > <span
<!--l. 33--><p class="indent" > <span
class="cmr-12">This guide provides a brief description of the functionalities and the user interface</span>
<span
class="cmr-12">of AMG4PSBLAS.</span>

@ -74,132 +74,110 @@ class="cmr-12">Example and test programs</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">4 </span><a
href="userhtmlse4.html#x13-120004"><span
class="cmr-12">Multigrid Background</span></a></span>
class="cmr-12">Getting Started</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">4.1 </span><a
href="userhtmlsu6.html#x14-130004.1"><span
class="cmr-12">AMG preconditioners</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">4.2 </span><a
href="userhtmlsu7.html#x15-140004.2"><span
class="cmr-12">Smoothed Aggregation</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">4.3 </span><a
href="userhtmlsu8.html#x16-150004.3"><span
class="cmr-12">Smoothers and coarsest-level solvers</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">5 </span><a
href="userhtmlse5.html#x17-160005"><span
class="cmr-12">Getting Started</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">5.1 </span><a
href="userhtmlsu9.html#x18-170005.1"><span
class="cmr-12">Examples</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">6 </span><a
href="userhtmlse6.html#x19-180006"><span
class="cmr-12">5 </span><a
href="userhtmlse5.html#x15-140005"><span
class="cmr-12">User Interface</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.1 </span><a
href="userhtmlsu10.html#x20-190006.1"><span
class="cmr-12">5.1 </span><a
href="userhtmlsu7.html#x16-150005.1"><span
class="cmr-12">Method init</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.2 </span><a
href="userhtmlsu11.html#x21-200006.2"><span
class="cmr-12">5.2 </span><a
href="userhtmlsu8.html#x17-160005.2"><span
class="cmr-12">Method set</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.3 </span><a
href="userhtmlsu12.html#x22-210006.3"><span
class="cmr-12">5.3 </span><a
href="userhtmlsu9.html#x18-170005.3"><span
class="cmr-12">Method hierarchy</span><span
class="cmr-12">_build</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.4 </span><a
href="userhtmlsu13.html#x23-220006.4"><span
class="cmr-12">5.4 </span><a
href="userhtmlsu10.html#x19-180005.4"><span
class="cmr-12">Method smoothers</span><span
class="cmr-12">_build</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.5 </span><a
href="userhtmlsu14.html#x24-230006.5"><span
class="cmr-12">5.5 </span><a
href="userhtmlsu11.html#x20-190005.5"><span
class="cmr-12">Method build</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.6 </span><a
href="userhtmlsu15.html#x25-240006.6"><span
class="cmr-12">5.6 </span><a
href="userhtmlsu12.html#x21-200005.6"><span
class="cmr-12">Method apply</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.7 </span><a
href="userhtmlsu16.html#x26-250006.7"><span
class="cmr-12">5.7 </span><a
href="userhtmlsu13.html#x22-210005.7"><span
class="cmr-12">Method free</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.8 </span><a
href="userhtmlsu17.html#x27-260006.8"><span
class="cmr-12">5.8 </span><a
href="userhtmlsu14.html#x23-220005.8"><span
class="cmr-12">Method descr</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.9 </span><a
href="userhtmlsu18.html#x28-270006.9"><span
class="cmr-12">5.9 </span><a
href="userhtmlsu15.html#x24-230005.9"><span
class="cmr-12">Auxiliary Methods</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span
class="cmr-12">&#x00A0;</span><span class="subsubsectionToc" ><span
class="cmr-12">6.9.1 </span><a
href="userhtmlsu18.html#x28-280006.9.1" id="QQ2-28-42"><span
class="cmr-12">5.9.1 </span><a
href="userhtmlsu15.html#x24-240005.9.1" id="QQ2-24-37"><span
class="cmr-12">Method: dump</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span
class="cmr-12">&#x00A0;</span><span class="subsubsectionToc" ><span
class="cmr-12">6.9.2 </span><a
href="userhtmlsu18.html#x28-290006.9.2" id="QQ2-28-43"><span
class="cmr-12">5.9.2 </span><a
href="userhtmlsu15.html#x24-250005.9.2" id="QQ2-24-38"><span
class="cmr-12">Method: clone</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span
class="cmr-12">&#x00A0;</span><span class="subsubsectionToc" ><span
class="cmr-12">6.9.3 </span><a
href="userhtmlsu18.html#x28-300006.9.3" id="QQ2-28-44"><span
class="cmr-12">5.9.3 </span><a
href="userhtmlsu15.html#x24-260005.9.3" id="QQ2-24-39"><span
class="cmr-12">Method: sizeof</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span
class="cmr-12">&#x00A0;</span><span class="subsubsectionToc" ><span
class="cmr-12">6.9.4 </span><a
href="userhtmlsu18.html#x28-310006.9.4" id="QQ2-28-45"><span
class="cmr-12">5.9.4 </span><a
href="userhtmlsu15.html#x24-270005.9.4" id="QQ2-24-40"><span
class="cmr-12">Method: allocate</span><span
class="cmr-12">_wrk</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span
class="cmr-12">&#x00A0;</span><span class="subsubsectionToc" ><span
class="cmr-12">6.9.5 </span><a
href="userhtmlsu18.html#x28-320006.9.5" id="QQ2-28-46"><span
class="cmr-12">5.9.5 </span><a
href="userhtmlsu15.html#x24-280005.9.5" id="QQ2-24-41"><span
class="cmr-12">Method: free</span><span
class="cmr-12">_wrk</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">7 </span><a
href="userhtmlse7.html#x29-330007"><span
class="cmr-12">6 </span><a
href="userhtmlse6.html#x25-290006"><span
class="cmr-12">Adding new smoother and solver objects to AMG4PSBLAS</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">8 </span><a
href="userhtmlse8.html#x30-340008"><span
class="cmr-12">7 </span><a
href="userhtmlse7.html#x26-300007"><span
class="cmr-12">Error Handling</span></a></span>
<br /> <span class="sectionToc" ><span
class="cmr-12">A </span><a
href="userhtmlse9.html#x31-35000A"><span
href="userhtmlse8.html#x27-31000A"><span
class="cmr-12">License</span></a></span>
<br /> <span class="sectionToc" ><a
href="userhtmlli4.html#Q1-32-51"><span
href="userhtmlli4.html#Q1-28-46"><span
class="cmr-12">References</span></a></span>
</div>
@ -210,9 +188,6 @@ class="cmr-12">References</span></a></span>
<!--l. 1--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlse1.html" ><span

@ -12,10 +12,10 @@
>
<!--l. 2--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlse9.html" ><span
href="userhtmlse8.html" ><span
class="cmr-12">prev</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse9.html#tailuserhtmlse9.html" ><span
href="userhtmlse8.html#tailuserhtmlse8.html" ><span
class="cmr-12">prev-tail</span></a><span
class="cmr-12">] [</span><a
href="#tailuserhtmlli4.html"><span
@ -25,11 +25,11 @@ href="userhtml.html#userhtmlli4.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<h3 class="likesectionHead"><a
id="x32-36000A"></a><span
id="x28-32000A"></a><span
class="cmr-12">References</span></h3>
<!--l. 2--><p class="noindent" >
<a
id="Q1-32-51"></a>
id="Q1-28-46"></a>
<div class="thebibliography">
<p class="bibitem" ><span class="biblabel">
<span
@ -661,10 +661,10 @@ class="cmr-12">Transactions on Mathematical Software, 44, (2018) 39:1&#8211;39:2
<!--l. 145--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlse9.html" ><span
href="userhtmlse8.html" ><span
class="cmr-12">prev</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse9.html#tailuserhtmlse9.html" ><span
href="userhtmlse8.html#tailuserhtmlse8.html" ><span
class="cmr-12">prev-tail</span></a><span
class="cmr-12">] [</span><a
href="userhtmlli4.html" ><span

@ -122,18 +122,18 @@ class="cmr-12">23</span></a><span
class="cmr-12">]</span></span> <span
class="cmr-12">are available, which can be</span>
<span
class="cmr-12">combined with weighted versions of Jacobi, hybrid forward/backward Gauss-Seidel,</span>
class="cmr-12">combined with Jacobi hybrid forward/backward Gauss-Seidel, block-Jacobi, and</span>
<span
class="cmr-12">block-Jacobi, and additive Schwarz smoothers. Also </span><span
class="cmr-12">additive Schwarz smoothers. Also </span><span
class="cmmi-12">&#x2113;</span><sub><span
class="cmr-8">1</span></sub> <span
class="cmr-12">versions of Jacobi, block-Jacobi</span>
class="cmr-12">versions of Jacobi, block-Jacobi and Gauss-Seidel</span>
<span
class="cmr-12">and Gauss-Seidel smoothers are available. An algebraic approach is used to generate a</span>
class="cmr-12">smoothers are available. An algebraic approach is used to generate a hierarchy of</span>
<span
class="cmr-12">hierarchy of coarse-level matrices and operators, without explicitly using any</span>
class="cmr-12">coarse-level matrices and operators, without explicitly using any information</span>
<span
class="cmr-12">information on the geometry of the original problem, e.g., the discretization of a PDE.</span>
class="cmr-12">on the geometry of the original problem, e.g., the discretization of a PDE.</span>
<span
class="cmr-12">To this end, two different coarsening strategies, based on aggregation, are</span>
<span
@ -294,8 +294,8 @@ class="cmr-12">smoothers and solvers for building new versions of the preconditi
<span
class="cmr-12">Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse7.html#x29-330007"><span
class="cmr-12">7</span><!--tex4ht:ref: sec:adding --></a><span
href="userhtmlse6.html#x25-290006"><span
class="cmr-12">6</span><!--tex4ht:ref: sec:adding --></a><span
class="cmr-12">).</span>
<!--l. 75--><p class="indent" > <span
class="cmr-12">This guide is organized as follows. General information on the distribution of the</span>
@ -317,35 +317,35 @@ class="cmr-12">preconditioners with the Krylov solvers implemented in PSBLAS are
class="cmr-12">in</span><span
class="cmr-12">&#x00A0;Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse5.html#x17-160005"><span
class="cmr-12">5</span><!--tex4ht:ref: sec:started --></a><span
href="userhtmlse4.html#x13-120004"><span
class="cmr-12">4</span><!--tex4ht:ref: sec:started --></a><span
class="cmr-12">, where the Fortran codes of a few sample programs are also shown.</span>
<span
class="cmr-12">A reference guide for the user interface routines is provided in Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse6.html#x19-180006"><span
class="cmr-12">6</span><!--tex4ht:ref: sec:userinterface --></a><span
href="userhtmlse5.html#x15-140005"><span
class="cmr-12">5</span><!--tex4ht:ref: sec:userinterface --></a><span
class="cmr-12">.</span>
<span
class="cmr-12">Information on the extension of the package through the addition of new</span>
<span
class="cmr-12">smoothers and solvers is reported in Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse7.html#x29-330007"><span
class="cmr-12">7</span><!--tex4ht:ref: sec:adding --></a><span
href="userhtmlse6.html#x25-290006"><span
class="cmr-12">6</span><!--tex4ht:ref: sec:adding --></a><span
class="cmr-12">. The error handling mechanism</span>
<span
class="cmr-12">used by the package is briefly described in Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse8.html#x30-340008"><span
class="cmr-12">8</span><!--tex4ht:ref: sec:errors --></a><span
href="userhtmlse7.html#x26-300007"><span
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a><span
class="cmr-12">. The copyright terms</span>
<span
class="cmr-12">concerning the distribution and modification of AMG4PSBLAS are reported in</span>
<span
class="cmr-12">Appendix</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse9.html#x31-35000A"><span
href="userhtmlse8.html#x27-31000A"><span
class="cmr-12">A</span><!--tex4ht:ref: sec:license --></a><span
class="cmr-12">.</span>

@ -42,7 +42,7 @@ class="cmr-12">where contact points for further information can be also found.</
<!--l. 12--><p class="indent" > <span
class="cmr-12">The software is available under a modified BSD license, as specified in Appendix</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse9.html#x31-35000A"><span
href="userhtmlse8.html#x27-31000A"><span
class="cmr-12">A</span><!--tex4ht:ref: sec:license --></a><span
class="cmr-12">;</span>
<span

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>Multigrid Background</title>
<head><title>Getting Started</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
@ -30,172 +30,378 @@ class="cmr-12">] </span></p></div>
<h3 class="sectionHead"><span class="titlemark"><span
class="cmr-12">4 </span></span> <a
id="x13-120004"></a><span
class="cmr-12">Multigrid Background</span></h3>
class="cmr-12">Getting Started</span></h3>
<!--l. 5--><p class="noindent" ><span
class="cmr-12">Multigrid preconditioners, coupled with Krylov iterative solvers, are widely used in the</span>
class="cmr-12">We describe the basics for building and applying AMG4PSBLAS one-level and</span>
<span
class="cmr-12">parallel solution of large and sparse linear systems, because of their optimality in the</span>
<span
class="cmr-12">solution of linear systems arising from the discretization of scalar elliptic Partial</span>
<span
class="cmr-12">Differential Equations (PDEs) on regular grids. Optimality, also known as algorithmic</span>
<span
class="cmr-12">scalability, is the property of having a computational cost per iteration that depends</span>
<span
class="cmr-12">linearly on the problem size, and a convergence rate that is independent of the problem</span>
<span
class="cmr-12">size.</span>
<!--l. 13--><p class="indent" > <span
class="cmr-12">Multigrid preconditioners are based on a recursive application of a two-grid process</span>
<span
class="cmr-12">consisting of smoother iterations and a coarse-space (or coarse-level) correction. The</span>
<span
class="cmr-12">smoothers may be either basic iterative methods, such as the Jacobi and Gauss-Seidel</span>
<span
class="cmr-12">ones, or more complex subspace-correction methods, such as the Schwarz ones. The</span>
<span
class="cmr-12">coarse-space correction consists of solving, in an appropriately chosen coarse space, the</span>
<span
class="cmr-12">residual equation associated with the approximate solution computed by the</span>
<span
class="cmr-12">smoother, and of using the solution of this equation to correct the previous</span>
<span
class="cmr-12">approximation. The transfer of information between the original (fine) space and</span>
<span
class="cmr-12">the coarse one is performed by using suitable restriction and prolongation</span>
<span
class="cmr-12">operators. The construction of the coarse space and the corresponding transfer</span>
<span
class="cmr-12">operators is carried out by applying a so-called coarsening algorithm to the</span>
<span
class="cmr-12">system matrix. Two main approaches can be used to perform coarsening:</span>
<span
class="cmr-12">the geometric approach, which exploits the knowledge of some physical grid</span>
<span
class="cmr-12">associated with the matrix and requires the user to define transfer operators</span>
<span
class="cmr-12">from the fine to the coarse level and vice versa, and the algebraic approach,</span>
<span
class="cmr-12">which builds the coarse-space correction and the associate transfer operators</span>
<span
class="cmr-12">using only matrix information. The first approach may be difficult when the</span>
<span
class="cmr-12">system comes from discretizations on complex geometries; furthermore, ad hoc</span>
<span
class="cmr-12">one-level smoothers may be required to get an efficient interplay between</span>
<span
class="cmr-12">fine and coarse levels, e.g., when matrices with highly varying coefficients are</span>
<span
class="cmr-12">considered. The second approach performs a fully automatic coarsening and</span>
<span
class="cmr-12">enforces the interplay between fine and coarse level by suitably choosing the</span>
<span
class="cmr-12">coarse space and the coarse-to-fine interpolation (see, e.g., </span><span class="cite"><span
class="cmr-12">multilevel (i.e., AMG) preconditioners with the Krylov solvers included in PSBLAS</span>
<span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XBriggs2000"><span
class="cmr-12">3</span></a><span
class="cmr-12">,</span><span
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">. The following steps are required:</span>
<ol class="enumerate1" >
<li
class="enumerate" id="x13-12002x1"><span
class="cmti-12">Declare the preconditioner data structure</span><span
class="cmr-12">. It is a derived data type,</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amg_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">prec_</span></span></span> <span class="obeylines-h"><span class="verb"><span
class="cmtt-12">type</span></span></span><span
class="cmr-12">, where </span><span
class="cmti-12">x </span><span
class="cmr-12">may be </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">s</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">d</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">c</span></span></span> <span
class="cmr-12">or </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">z</span></span></span><span
class="cmr-12">, according to the basic data</span>
<span
class="cmr-12">type of the sparse matrix (</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">s</span></span></span> <span
class="cmr-12">= real single precision; </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">d</span></span></span> <span
class="cmr-12">= real double precision;</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">c</span></span></span> <span
class="cmr-12">= complex single precision; </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">z</span></span></span> <span
class="cmr-12">= complex double precision). This data</span>
<span
class="cmr-12">structure is accessed by the user only through the AMG4PSBLAS routines,</span>
<span
class="cmr-12">following an object-oriented approach.</span>
</li>
<li
class="enumerate" id="x13-12004x2"><span
class="cmti-12">Allocate and initialize the preconditioner data structure, according to a</span>
<span
class="cmti-12">preconditioner type chosen by the user</span><span
class="cmr-12">. This is performed by the routine</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">init</span></span></span><span
class="cmr-12">, which also sets defaults for each preconditioner type selected by</span>
<span
class="cmr-12">the user. The preconditioner types and the defaults associated with them</span>
<span
class="cmr-12">are given in Table</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlli4.html#XStuben_01"><span
class="cmr-12">27</span></a><span
class="cmr-12">,</span><span
href="#x13-120151"><span
class="cmr-12">1</span><!--tex4ht:ref: tab:precinit --></a><span
class="cmr-12">, where the strings used by </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">init</span></span></span> <span
class="cmr-12">to identify the</span>
<span
class="cmr-12">preconditioner types are also given. Note that these strings are valid also if</span>
<span
class="cmr-12">uppercase letters are substituted by corresponding lowercase ones.</span>
</li>
<li
class="enumerate" id="x13-12006x3"><span
class="cmti-12">Modify the selected preconditioner type, by properly setting preconditioner</span>
<span
class="cmti-12">parameters. </span><span
class="cmr-12">This is performed by the routine </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">set</span></span></span><span
class="cmr-12">. This routine must be</span>
<span
class="cmr-12">called only if the user wants to modify the default values of the parameters</span>
<span
class="cmr-12">associated with the selected preconditioner type, to obtain a variant of that</span>
<span
class="cmr-12">preconditioner. Examples of use of </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">set</span></span></span> <span
class="cmr-12">are given in Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlli4.html#Xdd2_96"><span
class="cmr-12">25</span></a><span
class="cmr-12">]</span></span> <span
class="cmr-12">for</span>
<span
class="cmr-12">details.)</span>
<!--l. 37--><p class="indent" > <span
class="cmr-12">MLD2P4 uses a pure algebraic approach, based on the smoothed aggregation</span>
<span
class="cmr-12">algorithm </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XBREZINA_VANEK"><span
class="cmr-12">2</span></a><span
class="cmr-12">,</span><span
href="userhtmlsu6.html#x14-130004.1"><span
class="cmr-12">4.1</span><!--tex4ht:ref: sec:examples --></a><span
class="cmr-12">; a complete</span>
<span
class="cmr-12">list of all the preconditioner parameters and their allowed and default values</span>
<span
class="cmr-12">is provided in Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlli4.html#XVANEK_MANDEL_BREZINA"><span
class="cmr-12">29</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">, for building the sequence of coarse matrices and transfer</span>
<span
class="cmr-12">operators, starting from the original one. A decoupled version of this algorithm</span>
href="userhtmlse5.html#x15-140005"><span
class="cmr-12">5</span><!--tex4ht:ref: sec:userinterface --></a><span
class="cmr-12">, Tables</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu8.html#x17-160092"><span
class="cmr-12">2</span><!--tex4ht:ref: tab:p_cycle --></a><span
class="cmr-12">-</span><a
href="userhtmlsu8.html#x17-160158"><span
class="cmr-12">8</span><!--tex4ht:ref: tab:p_smoother_1 --></a><span
class="cmr-12">.</span>
</li>
<li
class="enumerate" id="x13-12008x4"><span
class="cmti-12">Build the preconditioner for a given matrix</span><span
class="cmr-12">. If the selected preconditioner is</span>
<span
class="cmr-12">multilevel, then two steps must be performed, as specified next.</span>
<ol class="enumerate2" >
<li
class="enumerate" id="x13-12009x0"><span
class="cmti-12">Build the AMG hierarchy for a given matrix. </span><span
class="cmr-12">This is performed by the</span>
<span
class="cmr-12">routine </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">hierarchy_build</span></span></span><span
class="cmr-12">.</span>
</li>
<li
class="enumerate" id="x13-12010x0"><span
class="cmti-12">Build the preconditioner for a given matrix. </span><span
class="cmr-12">This is performed by the</span>
<span
class="cmr-12">routine </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">smoothers_build</span></span></span><span
class="cmr-12">.</span></li></ol>
<!--l. 41--><p class="noindent" ><span
class="cmr-12">If the selected preconditioner is one-level, it is built in a single step, performed by</span>
<span
class="cmr-12">the routine </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">bld</span></span></span><span
class="cmr-12">.</span>
</li>
<li
class="enumerate" id="x13-12012x5"><span
class="cmti-12">Apply the preconditioner at each iteration of a Krylov solver. </span><span
class="cmr-12">This is performed by</span>
<span
class="cmr-12">the method </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">apply</span></span></span><span
class="cmr-12">. When using the PSBLAS Krylov solvers, this step is</span>
<span
class="cmr-12">completely transparent to the user, since </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">apply</span></span></span> <span
class="cmr-12">is called by the PSBLAS routine</span>
<span
class="cmr-12">implementing the Krylov solver (</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">psb_krylov</span></span></span><span
class="cmr-12">).</span>
</li>
<li
class="enumerate" id="x13-12014x6"><span
class="cmti-12">Free the preconditioner data structure</span><span
class="cmr-12">. This is performed by the routine </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">free</span></span></span><span
class="cmr-12">.</span>
<span
class="cmr-12">This step is complementary to step 1 and should be performed when the</span>
<span
class="cmr-12">preconditioner is no more used.</span></li></ol>
<!--l. 52--><p class="indent" > <span
class="cmr-12">All the previous routines are available as methods of the preconditioner object. A</span>
<span
class="cmr-12">detailed description of them is given in Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse5.html#x15-140005"><span
class="cmr-12">5</span><!--tex4ht:ref: sec:userinterface --></a><span
class="cmr-12">. Examples showing the basic use of</span>
<span
class="cmr-12">is implemented, where the smoothed aggregation is applied locally to each</span>
<span
class="cmr-12">submatrix </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XTUMINARO_TONG"><span
class="cmr-12">28</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">. A brief description of the AMG preconditioners implemented in</span>
<span
class="cmr-12">MLD2P4 is given in Sections</span><span
class="cmr-12">AMG4PSBLAS are reported in Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu6.html#x14-130004.1"><span
class="cmr-12">4.1</span><!--tex4ht:ref: sec:multilevel --></a><span
class="cmr-12">-</span><a
href="userhtmlsu8.html#x16-150004.3"><span
class="cmr-12">4.3</span><!--tex4ht:ref: sec:smoothers --></a><span
class="cmr-12">. For further details the reader is referred to</span>
<span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#Xpara_04"><span
class="cmr-12">4</span></a><span
class="cmr-12">,</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlli4.html#Xaaecc_07"><span
class="cmr-12">5</span></a><span
class="cmr-12">,</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlli4.html#Xapnum_07"><span
class="cmr-12">8</span></a><span
class="cmr-12">,</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlli4.html#XMLD2P4_TOMS"><span
class="cmr-12">9</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">4.1</span><!--tex4ht:ref: sec:examples --></a><span
class="cmr-12">.</span>
<!--l. 47--><p class="indent" > <span
class="cmr-12">We note that optimal multigrid preconditioners do not necessarily correspond to</span>
<div class="table">
<!--l. 56--><p class="indent" > <a
id="x13-120151"></a><hr class="float"><div class="float"
>
<div class="center"
>
<!--l. 57--><p class="noindent" >
<div class="tabular"> <table id="TBL-1" class="tabular"
cellspacing="0" cellpadding="0"
><colgroup id="TBL-1-1g"><col
id="TBL-1-1"></colgroup><colgroup id="TBL-1-2g"><col
id="TBL-1-2"></colgroup><colgroup id="TBL-1-3g"><col
id="TBL-1-3"></colgroup><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-1-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-1-1"
class="td11"><span
class="cmcsc-10x-x-109"><span
class="small-caps">t</span><span
class="small-caps">y</span><span
class="small-caps">p</span><span
class="small-caps">e</span> </span></td><td style="white-space:normal; text-align:left;" id="TBL-1-1-2"
class="td11"><!--l. 61--><p class="noindent" ><span
class="cmcsc-10x-x-109"><span
class="small-caps">s</span><span
class="small-caps">t</span><span
class="small-caps">r</span><span
class="small-caps">i</span><span
class="small-caps">n</span><span
class="small-caps">g</span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-1-3"
class="td11"><!--l. 61--><p class="noindent" ><span
class="cmcsc-10x-x-109"><span
class="small-caps">d</span><span
class="small-caps">e</span><span
class="small-caps">f</span><span
class="small-caps">a</span><span
class="small-caps">u</span><span
class="small-caps">l</span><span
class="small-caps">t</span> <span
class="small-caps">p</span><span
class="small-caps">r</span><span
class="small-caps">e</span><span
class="small-caps">c</span><span
class="small-caps">o</span><span
class="small-caps">n</span><span
class="small-caps">d</span><span
class="small-caps">i</span><span
class="small-caps">t</span><span
class="small-caps">i</span><span
class="small-caps">o</span><span
class="small-caps">n</span><span
class="small-caps">e</span><span
class="small-caps">r</span></span> </td></tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-2-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-2-1"
class="td11">No preconditioner </td><td style="white-space:normal; text-align:left;" id="TBL-1-2-2"
class="td11"><!--l. 62--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;NONE&#8217;</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-2-3"
class="td11"><!--l. 62--><p class="noindent" >Considered to use the PSBLAS Krylov solvers
with no preconditioner. </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-3-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-3-1"
class="td11">Diagonal </td><td style="white-space:normal; text-align:left;" id="TBL-1-3-2"
class="td11"><!--l. 64--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;DIAG&#8217;</span></span></span>,
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;JACOBI&#8217;</span></span></span>,
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;L1-JACOBI&#8217;</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-3-3"
class="td11"><!--l. 64--><p class="noindent" >Diagonal preconditioner. For any zero diagonal
entry of the matrix to be preconditioned, the
corresponding entry of the preconditioner is set
to&#x00A0;1. </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-4-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-4-1"
class="td11">Gauss-Seidel </td><td style="white-space:normal; text-align:left;" id="TBL-1-4-2"
class="td11"><!--l. 67--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;GS&#8217;</span></span></span>,
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;L1-GS&#8217;</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-4-3"
class="td11"><!--l. 67--><p class="noindent" >Hybrid Gauss-Seidel (forward), that is, global
block Jacobi with Gauss-Seidel as local solver. </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-5-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-5-1"
class="td11">Symmetrized Gauss-Seidel</td><td style="white-space:normal; text-align:left;" id="TBL-1-5-2"
class="td11"><!--l. 70--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;FBGS&#8217;</span></span></span>,
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;L1-FBGS&#8217;</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-5-3"
class="td11"><!--l. 70--><p class="noindent" >Symmetrized hybrid Gauss-Seidel, that is,
forward Gauss-Seidel followed by backward
Gauss-Seidel. </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-6-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-6-1"
class="td11">Block Jacobi </td><td style="white-space:normal; text-align:left;" id="TBL-1-6-2"
class="td11"><!--l. 73--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;BJAC&#8217;</span></span></span>,
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;L1-BJAC&#8217;</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-6-3"
class="td11"><!--l. 73--><p class="noindent" >Block-Jacobi with ILU(0) on the local blocks. </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-7-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-7-1"
class="td11">Additive Schwarz </td><td style="white-space:normal; text-align:left;" id="TBL-1-7-2"
class="td11"><!--l. 74--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;AS&#8217;</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-7-3"
class="td11"><!--l. 74--><p class="noindent" >Additive Schwarz (AS), with overlap&#x00A0;1 and
ILU(0) on the local blocks. </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-8-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-8-1"
class="td11">Multilevel </td><td style="white-space:normal; text-align:left;" id="TBL-1-8-2"
class="td11"><!--l. 76--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;ML&#8217;</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-8-3"
class="td11"><!--l. 76--><p class="noindent" >V-cycle with one hybrid forward Gauss-Seidel
(GS) sweep
as pre-smoother and one hybrid backward GS
sweep as post-smoother, decoupled smoothed
aggregation as coarsening algorithm, and LU
(plus triangular solve) as coarsest-level solver.
See the default values in Tables&#x00A0;<a
href="userhtmlsu8.html#x17-160092">2<!--tex4ht:ref: tab:p_cycle --></a>-<a
href="userhtmlsu8.html#x17-160158">8<!--tex4ht:ref: tab:p_smoother_1 --></a> for further
details of the preconditioner. </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-9-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-9-1"
class="td11"> </td></tr></table></div>
<br /> <div class="caption"
><span class="id">Table&#x00A0;1: </span><span
class="content">Preconditioner types, corresponding strings and default choices. </span></div><!--tex4ht:label?: x13-120151 -->
</div>
</div><hr class="endfloat" />
</div>
<!--l. 91--><p class="indent" > <span
class="cmr-12">Note that the module </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amg_prec_mod</span></span></span><span
class="cmr-12">, containing the definition of the preconditioner</span>
<span
class="cmr-12">data type and the interfaces to the routines of AMG4PSBLAS, must be used</span>
<span
class="cmr-12">in any program calling such routines. The modules </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">psb_base_mod</span></span></span><span
class="cmr-12">, for the</span>
<span
class="cmr-12">minimum execution times in a parallel setting. Indeed, to obtain effective parallel</span>
class="cmr-12">sparse matrix and communication descriptor data types, and </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">psb_krylov_mod</span></span></span><span
class="cmr-12">,</span>
<span
class="cmr-12">multigrid preconditioners, a tradeoff between the optimality and the cost of</span>
class="cmr-12">for interfacing with the Krylov solvers, must be also used (see Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu6.html#x14-130004.1"><span
class="cmr-12">4.1</span><!--tex4ht:ref: sec:examples --></a><span
class="cmr-12">).</span>
<br
class="newline" />
<!--l. 98--><p class="indent" > <span
class="cmbx-12">Remark 1. </span><span
class="cmr-12">Coarsest-level solvers based on the LU factorization, such as those</span>
<span
class="cmr-12">building and applying the smoothers and the coarse-space corrections must be</span>
class="cmr-12">implemented in UMFPACK, MUMPS, SuperLU, and SuperLU</span><span
class="cmr-12">_Dist, usually lead to</span>
<span
class="cmr-12">achieved. Effective parallel preconditioners require algorithmic scalability to</span>
class="cmr-12">smaller numbers of preconditioned Krylov iterations than inexact solvers, when the</span>
<span
class="cmr-12">be coupled with implementation scalability, i.e., a computational cost per</span>
class="cmr-12">linear system comes from a standard discretization of basic scalar elliptic PDE</span>
<span
class="cmr-12">iteration which remains (almost) constant as the number of parallel processors</span>
class="cmr-12">problems. However, this does not necessarily correspond to the shortest execution time</span>
<span
class="cmr-12">increases.</span>
<!--l. 56--><p class="noindent" >
class="cmr-12">on parallel computers.</span>
<div class="subsectionTOCS">
<span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">4.1 </span><a
href="userhtmlsu6.html#x14-130004.1"><span
class="cmr-12">AMG preconditioners</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">4.2 </span><a
href="userhtmlsu7.html#x15-140004.2"><span
class="cmr-12">Smoothed Aggregation</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">4.3 </span><a
href="userhtmlsu8.html#x16-150004.3"><span
class="cmr-12">Smoothers and coarsest-level solvers</span></a></span>
class="cmr-12">Examples</span></a></span>
</div>

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>Getting Started</title>
<head><title>User Interface</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
@ -29,385 +29,229 @@ class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<h3 class="sectionHead"><span class="titlemark"><span
class="cmr-12">5 </span></span> <a
id="x17-160005"></a><span
class="cmr-12">Getting Started</span></h3>
id="x15-140005"></a><span
class="cmr-12">User Interface</span></h3>
<!--l. 5--><p class="noindent" ><span
class="cmr-12">We describe the basics for building and applying AMG4PSBLAS one-level and</span>
<span
class="cmr-12">multilevel (i.e., AMG) preconditioners with the Krylov solvers included in PSBLAS</span>
<span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">. The following steps are required:</span>
<ol class="enumerate1" >
<li
class="enumerate" id="x17-16002x1"><span
class="cmti-12">Declare the preconditioner data structure</span><span
class="cmr-12">. It is a derived data type,</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amg_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">prec_</span></span></span> <span class="obeylines-h"><span class="verb"><span
class="cmtt-12">type</span></span></span><span
class="cmr-12">, where </span><span
class="cmti-12">x </span><span
class="cmr-12">may be </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">s</span></span></span><span
class="cmr-12">The basic user interface of AMG4PBLAS consists of eight methods. The six methods</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">init</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">d</span></span></span><span
class="cmtt-12">set</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">c</span></span></span> <span
class="cmr-12">or </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">z</span></span></span><span
class="cmr-12">, according to the basic data</span>
class="cmtt-12">build</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">hierarchy_build</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">smoothers_build</span></span></span> <span
class="cmr-12">and </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">apply</span></span></span> <span
class="cmr-12">encapsulate all the</span>
<span
class="cmr-12">functionalities for the setup and the application of any multilevel and one-level</span>
<span
class="cmr-12">preconditioner implemented in the package. The method </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">free</span></span></span> <span
class="cmr-12">deallocates the</span>
<span
class="cmr-12">preconditioner data structure, while </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">descr</span></span></span> <span
class="cmr-12">prints a description of the preconditioner</span>
<span
class="cmr-12">setup by the user. For backward compatibility, methods are also accessible as</span>
<span
class="cmr-12">stand-alone subroutines.</span>
<!--l. 16--><p class="indent" > <span
class="cmr-12">For each method, the same user interface is overloaded with respect to the real/</span>
<span
class="cmr-12">complex case and the single/double precision; arguments with appropriate data types</span>
<span
class="cmr-12">must be passed to the method, i.e.,</span>
<ul class="itemize1">
<li class="itemize"><span
class="cmr-12">the sparse matrix data structure, containing the matrix to be preconditioned,</span>
<span
class="cmr-12">type of the sparse matrix (</span><span class="obeylines-h"><span class="verb"><span
class="cmr-12">must be of type </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">spmat_type</span></span></span> <span
class="cmr-12">with </span><span
class="cmti-12">x </span><span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">s</span></span></span> <span
class="cmr-12">= real single precision; </span><span class="obeylines-h"><span class="verb"><span
class="cmr-12">for real single precision, </span><span
class="cmti-12">x</span>
<span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">d</span></span></span> <span
class="cmr-12">= real double precision;</span>
<span class="obeylines-h"><span class="verb"><span
class="cmr-12">for real double precision, </span><span
class="cmti-12">x </span><span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">c</span></span></span> <span
class="cmr-12">= complex single precision; </span><span class="obeylines-h"><span class="verb"><span
class="cmr-12">for complex single precision, </span><span
class="cmti-12">x </span><span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">z</span></span></span> <span
class="cmr-12">= complex double precision). This data</span>
<span
class="cmr-12">structure is accessed by the user only through the AMG4PSBLAS routines,</span>
class="cmr-12">for</span>
<span
class="cmr-12">following an object-oriented approach.</span>
class="cmr-12">complex double precision;</span>
</li>
<li
class="enumerate" id="x17-16004x2"><span
class="cmti-12">Allocate and initialize the preconditioner data structure, according to a</span>
<span
class="cmti-12">preconditioner type chosen by the user</span><span
class="cmr-12">. This is performed by the routine</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">init</span></span></span><span
class="cmr-12">, which also sets defaults for each preconditioner type selected by</span>
<span
class="cmr-12">the user. The preconditioner types and the defaults associated with them</span>
<span
class="cmr-12">are given in Table</span><span
class="cmr-12">&#x00A0;</span><a
href="#x17-160151"><span
class="cmr-12">1</span><!--tex4ht:ref: tab:precinit --></a><span
class="cmr-12">, where the strings used by </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">init</span></span></span> <span
class="cmr-12">to identify the</span>
<span
class="cmr-12">preconditioner types are also given. Note that these strings are valid also if</span>
<span
class="cmr-12">uppercase letters are substituted by corresponding lowercase ones.</span>
</li>
<li
class="enumerate" id="x17-16006x3"><span
class="cmti-12">Modify the selected preconditioner type, by properly setting preconditioner</span>
<span
class="cmti-12">parameters. </span><span
class="cmr-12">This is performed by the routine </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">set</span></span></span><span
class="cmr-12">. This routine must be</span>
<span
class="cmr-12">called only if the user wants to modify the default values of the parameters</span>
<span
class="cmr-12">associated with the selected preconditioner type, to obtain a variant of that</span>
<span
class="cmr-12">preconditioner. Examples of use of </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">set</span></span></span> <span
class="cmr-12">are given in Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu9.html#x18-170005.1"><span
class="cmr-12">5.1</span><!--tex4ht:ref: sec:examples --></a><span
class="cmr-12">; a complete</span>
<span
class="cmr-12">list of all the preconditioner parameters and their allowed and default values</span>
<span
class="cmr-12">is provided in Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse6.html#x19-180006"><span
class="cmr-12">6</span><!--tex4ht:ref: sec:userinterface --></a><span
class="cmr-12">, Tables</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu11.html#x21-200092"><span
class="cmr-12">2</span><!--tex4ht:ref: tab:p_cycle --></a><span
class="cmr-12">-</span><a
href="userhtmlsu11.html#x21-200158"><span
class="cmr-12">8</span><!--tex4ht:ref: tab:p_smoother_1 --></a><span
class="cmr-12">.</span>
</li>
<li
class="enumerate" id="x17-16008x4"><span
class="cmti-12">Build the preconditioner for a given matrix</span><span
class="cmr-12">. If the selected preconditioner is</span>
<span
class="cmr-12">multilevel, then two steps must be performed, as specified next.</span>
<ol class="enumerate2" >
<li
class="enumerate" id="x17-16009x0"><span
class="cmti-12">Build the AMG hierarchy for a given matrix. </span><span
class="cmr-12">This is performed by the</span>
<span
class="cmr-12">routine </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">hierarchy_build</span></span></span><span
class="cmr-12">.</span>
</li>
<li
class="enumerate" id="x17-16010x0"><span
class="cmti-12">Build the preconditioner for a given matrix. </span><span
class="cmr-12">This is performed by the</span>
<span
class="cmr-12">routine </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">smoothers_build</span></span></span><span
class="cmr-12">.</span></li></ol>
<!--l. 41--><p class="noindent" ><span
class="cmr-12">If the selected preconditioner is one-level, it is built in a single step, performed by</span>
<li class="itemize"><span
class="cmr-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="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">prec_type</span></span></span><span
class="cmr-12">, with </span><span
class="cmti-12">x</span>
<span
class="cmr-12">the routine </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">bld</span></span></span><span
class="cmr-12">.</span>
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">s</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">d</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">c</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">z</span></span></span><span
class="cmr-12">, according to the sparse matrix data structure;</span>
</li>
<li
class="enumerate" id="x17-16012x5"><span
class="cmti-12">Apply the preconditioner at each iteration of a Krylov solver. </span><span
class="cmr-12">This is performed by</span>
<span
class="cmr-12">the method </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">apply</span></span></span><span
class="cmr-12">. When using the PSBLAS Krylov solvers, this step is</span>
<li class="itemize"><span
class="cmr-12">the arrays containing the vectors </span><span
class="cmmi-12">v </span><span
class="cmr-12">and </span><span
class="cmmi-12">w </span><span
class="cmr-12">involved in the preconditioner</span>
<span
class="cmr-12">completely transparent to the user, since </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">apply</span></span></span> <span
class="cmr-12">is called by the PSBLAS routine</span>
<span
class="cmr-12">implementing the Krylov solver (</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">psb_krylov</span></span></span><span
class="cmr-12">).</span>
class="cmr-12">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="cmr-12">must be of type </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">vect_type</span></span></span> <span
class="cmr-12">with </span><span
class="cmti-12">x </span><span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">s</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">d</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">c</span></span></span><span
class="cmr-12">,</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">z</span></span></span><span
class="cmr-12">, in a manner completely analogous to the sparse matrix type;</span>
</li>
<li
class="enumerate" id="x17-16014x6"><span
class="cmti-12">Free the preconditioner data structure</span><span
class="cmr-12">. This is performed by the routine </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">free</span></span></span><span
class="cmr-12">.</span>
<li class="itemize"><span
class="cmr-12">real parameters defining the preconditioner must be declared according to</span>
<span
class="cmr-12">This step is complementary to step 1 and should be performed when the</span>
class="cmr-12">the precision of the sparse matrix and preconditioner data structures (see</span>
<span
class="cmr-12">preconditioner is no more used.</span></li></ol>
<!--l. 52--><p class="indent" > <span
class="cmr-12">All the previous routines are available as methods of the preconditioner object. A</span>
<span
class="cmr-12">detailed description of them is given in Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse6.html#x19-180006"><span
class="cmr-12">6</span><!--tex4ht:ref: sec:userinterface --></a><span
class="cmr-12">. Examples showing the basic use of</span>
<span
class="cmr-12">AMG4PSBLAS are reported in Section</span><span
class="cmr-12">Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu9.html#x18-170005.1"><span
class="cmr-12">5.1</span><!--tex4ht:ref: sec:examples --></a><span
class="cmr-12">.</span>
<div class="table">
<!--l. 56--><p class="indent" > <a
id="x17-160151"></a><hr class="float"><div class="float"
>
<div class="center"
>
<!--l. 57--><p class="noindent" >
<div class="tabular"> <table id="TBL-1" class="tabular"
cellspacing="0" cellpadding="0"
><colgroup id="TBL-1-1g"><col
id="TBL-1-1"></colgroup><colgroup id="TBL-1-2g"><col
id="TBL-1-2"></colgroup><colgroup id="TBL-1-3g"><col
id="TBL-1-3"></colgroup><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-1-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-1-1"
class="td11"><span
class="cmcsc-10x-x-109"><span
class="small-caps">t</span><span
class="small-caps">y</span><span
class="small-caps">p</span><span
class="small-caps">e</span> </span></td><td style="white-space:normal; text-align:left;" id="TBL-1-1-2"
class="td11"><!--l. 61--><p class="noindent" ><span
class="cmcsc-10x-x-109"><span
class="small-caps">s</span><span
class="small-caps">t</span><span
class="small-caps">r</span><span
class="small-caps">i</span><span
class="small-caps">n</span><span
class="small-caps">g</span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-1-3"
class="td11"><!--l. 61--><p class="noindent" ><span
class="cmcsc-10x-x-109"><span
class="small-caps">d</span><span
class="small-caps">e</span><span
class="small-caps">f</span><span
class="small-caps">a</span><span
class="small-caps">u</span><span
class="small-caps">l</span><span
class="small-caps">t</span> <span
class="small-caps">p</span><span
class="small-caps">r</span><span
class="small-caps">e</span><span
class="small-caps">c</span><span
class="small-caps">o</span><span
class="small-caps">n</span><span
class="small-caps">d</span><span
class="small-caps">i</span><span
class="small-caps">t</span><span
class="small-caps">i</span><span
class="small-caps">o</span><span
class="small-caps">n</span><span
class="small-caps">e</span><span
class="small-caps">r</span></span> </td></tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-2-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-2-1"
class="td11">No preconditioner </td><td style="white-space:normal; text-align:left;" id="TBL-1-2-2"
class="td11"><!--l. 62--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;NONE&#8217;</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-2-3"
class="td11"><!--l. 62--><p class="noindent" >Considered to use the PSBLAS Krylov solvers
with no preconditioner. </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-3-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-3-1"
class="td11">Diagonal </td><td style="white-space:normal; text-align:left;" id="TBL-1-3-2"
class="td11"><!--l. 64--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;DIAG&#8217;</span></span></span>,
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;JACOBI&#8217;</span></span></span>,
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;L1-JACOBI&#8217;</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-3-3"
class="td11"><!--l. 64--><p class="noindent" >Diagonal preconditioner. For any zero diagonal
entry of the matrix to be preconditioned, the
corresponding entry of the preconditioner is set
to&#x00A0;1. </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-4-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-4-1"
class="td11">Gauss-Seidel </td><td style="white-space:normal; text-align:left;" id="TBL-1-4-2"
class="td11"><!--l. 67--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;GS&#8217;</span></span></span>,
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;L1-GS&#8217;</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-4-3"
class="td11"><!--l. 67--><p class="noindent" >Hybrid Gauss-Seidel (forward), that is, global
block Jacobi with Gauss-Seidel as local solver. </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-5-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-5-1"
class="td11">Symmetrized Gauss-Seidel</td><td style="white-space:normal; text-align:left;" id="TBL-1-5-2"
class="td11"><!--l. 70--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;FBGS&#8217;</span></span></span>,
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;L1-FBGS&#8217;</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-5-3"
class="td11"><!--l. 70--><p class="noindent" >Symmetrized hybrid Gauss-Seidel, that is,
forward Gauss-Seidel followed by backward
Gauss-Seidel. </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-6-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-6-1"
class="td11">Block Jacobi </td><td style="white-space:normal; text-align:left;" id="TBL-1-6-2"
class="td11"><!--l. 73--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;BJAC&#8217;</span></span></span>,
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;L1-BJAC&#8217;</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-6-3"
class="td11"><!--l. 73--><p class="noindent" >Block-Jacobi with ILU(0) on the local blocks. </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-7-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-7-1"
class="td11">Additive Schwarz </td><td style="white-space:normal; text-align:left;" id="TBL-1-7-2"
class="td11"><!--l. 74--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;AS&#8217;</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-7-3"
class="td11"><!--l. 74--><p class="noindent" >Additive Schwarz (AS), with overlap&#x00A0;1 and
ILU(0) on the local blocks. </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-8-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-8-1"
class="td11">Multilevel </td><td style="white-space:normal; text-align:left;" id="TBL-1-8-2"
class="td11"><!--l. 76--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-10x-x-109">&#8217;ML&#8217;</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-1-8-3"
class="td11"><!--l. 76--><p class="noindent" >V-cycle with one hybrid forward Gauss-Seidel
(GS) sweep
as pre-smoother and one hybrid backward GS
sweep as post-smoother, decoupled smoothed
aggregation as coarsening algorithm, and LU
(plus triangular solve) as coarsest-level solver.
See the default values in Tables&#x00A0;<a
href="userhtmlsu11.html#x21-200092">2<!--tex4ht:ref: tab:p_cycle --></a>-<a
href="userhtmlsu11.html#x21-200158">8<!--tex4ht:ref: tab:p_smoother_1 --></a> for further
details of the preconditioner. </td>
</tr><tr
class="hline"><td><hr></td><td><hr></td><td><hr></td></tr><tr
style="vertical-align:baseline;" id="TBL-1-9-"><td style="white-space:nowrap; text-align:left;" id="TBL-1-9-1"
class="td11"> </td></tr></table></div>
<br /> <div class="caption"
><span class="id">Table&#x00A0;1: </span><span
class="content">Preconditioner types, corresponding strings and default choices. </span></div><!--tex4ht:label?: x17-160151 -->
</div>
href="userhtmlsu8.html#x17-160005.2"><span
class="cmr-12">5.2</span><!--tex4ht:ref: sec:precset --></a><span
class="cmr-12">).</span></li></ul>
<!--l. 39--><p class="noindent" ><span
class="cmr-12">A description of each method is given in the remainder of this section.</span>
</div><hr class="endfloat" />
</div>
<!--l. 91--><p class="indent" > <span
class="cmr-12">Note that the module </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amg_prec_mod</span></span></span><span
class="cmr-12">, containing the definition of the preconditioner</span>
<span
class="cmr-12">data type and the interfaces to the routines of AMG4PSBLAS, must be used</span>
<span
class="cmr-12">in any program calling such routines. The modules </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">psb_base_mod</span></span></span><span
class="cmr-12">, for the</span>
<span
class="cmr-12">sparse matrix and communication descriptor data types, and </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">psb_krylov_mod</span></span></span><span
class="cmr-12">,</span>
<span
class="cmr-12">for interfacing with the Krylov solvers, must be also used (see Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu9.html#x18-170005.1"><span
class="cmr-12">5.1</span><!--tex4ht:ref: sec:examples --></a><span
class="cmr-12">).</span>
<br
class="newline" />
<!--l. 98--><p class="indent" > <span
class="cmbx-12">Remark 1. </span><span
class="cmr-12">Coarsest-level solvers based on the LU factorization, such as those</span>
<span
class="cmr-12">implemented in UMFPACK, MUMPS, SuperLU, and SuperLU</span><span
class="cmr-12">_Dist, usually lead to</span>
<span
class="cmr-12">smaller numbers of preconditioned Krylov iterations than inexact solvers, when the</span>
<span
class="cmr-12">linear system comes from a standard discretization of basic scalar elliptic PDE</span>
<span
class="cmr-12">problems. However, this does not necessarily correspond to the shortest execution time</span>
<span
class="cmr-12">on parallel computers.</span>
<!--l. 107--><p class="indent" > <span
class="cmti-12">DA MODIFICARE PER INSERIRE TIPO DI AGGREGAZIONE</span>
<div class="subsectionTOCS">
<span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">5.1 </span><a
href="userhtmlsu9.html#x18-170005.1"><span
class="cmr-12">Examples</span></a></span>
href="userhtmlsu7.html#x16-150005.1"><span
class="cmr-12">Method init</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">5.2 </span><a
href="userhtmlsu8.html#x17-160005.2"><span
class="cmr-12">Method set</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">5.3 </span><a
href="userhtmlsu9.html#x18-170005.3"><span
class="cmr-12">Method hierarchy</span><span
class="cmr-12">_build</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">5.4 </span><a
href="userhtmlsu10.html#x19-180005.4"><span
class="cmr-12">Method smoothers</span><span
class="cmr-12">_build</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">5.5 </span><a
href="userhtmlsu11.html#x20-190005.5"><span
class="cmr-12">Method build</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">5.6 </span><a
href="userhtmlsu12.html#x21-200005.6"><span
class="cmr-12">Method apply</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">5.7 </span><a
href="userhtmlsu13.html#x22-210005.7"><span
class="cmr-12">Method free</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">5.8 </span><a
href="userhtmlsu14.html#x23-220005.8"><span
class="cmr-12">Method descr</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">5.9 </span><a
href="userhtmlsu15.html#x24-230005.9"><span
class="cmr-12">Auxiliary Methods</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span
class="cmr-12">&#x00A0;</span><span class="subsubsectionToc" ><span
class="cmr-12">5.9.1 </span><a
href="userhtmlsu15.html#x24-240005.9.1"><span
class="cmr-12">Method: dump</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span
class="cmr-12">&#x00A0;</span><span class="subsubsectionToc" ><span
class="cmr-12">5.9.2 </span><a
href="userhtmlsu15.html#x24-250005.9.2"><span
class="cmr-12">Method: clone</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span
class="cmr-12">&#x00A0;</span><span class="subsubsectionToc" ><span
class="cmr-12">5.9.3 </span><a
href="userhtmlsu15.html#x24-260005.9.3"><span
class="cmr-12">Method: sizeof</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span
class="cmr-12">&#x00A0;</span><span class="subsubsectionToc" ><span
class="cmr-12">5.9.4 </span><a
href="userhtmlsu15.html#x24-270005.9.4"><span
class="cmr-12">Method: allocate</span><span
class="cmr-12">_wrk</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span
class="cmr-12">&#x00A0;</span><span class="subsubsectionToc" ><span
class="cmr-12">5.9.5 </span><a
href="userhtmlsu15.html#x24-280005.9.5"><span
class="cmr-12">Method: free</span><span
class="cmr-12">_wrk</span></a></span>
</div>
<!--l. 1--><div class="crosslinks"><p class="noindent"><span
<!--l. 4--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlse6.html" ><span
class="cmr-12">next</span></a><span
@ -424,6 +268,6 @@ class="cmr-12">] [</span><a
href="userhtml.html#userhtmlse5.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<!--l. 1--><p class="indent" > <a
<!--l. 4--><p class="indent" > <a
id="tailuserhtmlse5.html"></a>
</body></html>

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>User Interface</title>
<head><title>Adding new smoother and solver objects to AMG4PSBLAS</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
@ -10,7 +10,7 @@
<link rel="stylesheet" type="text/css" href="userhtml.css">
</head><body
>
<!--l. 1--><div class="crosslinks"><p class="noindent"><span
<!--l. 4--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlse7.html" ><span
class="cmr-12">next</span></a><span
@ -29,229 +29,185 @@ class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<h3 class="sectionHead"><span class="titlemark"><span
class="cmr-12">6 </span></span> <a
id="x19-180006"></a><span
class="cmr-12">User Interface</span></h3>
<!--l. 5--><p class="noindent" ><span
class="cmr-12">The basic user interface of AMG4PBLAS consists of eight methods. The six methods</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">init</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">set</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">build</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">hierarchy_build</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">smoothers_build</span></span></span> <span
class="cmr-12">and </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">apply</span></span></span> <span
class="cmr-12">encapsulate all the</span>
id="x25-290006"></a><span
class="cmr-12">Adding new smoother and solver objects to AMG4PSBLAS</span></h3>
<!--l. 6--><p class="noindent" ><span
class="cmr-12">Developers can add completely new smoother and/or solver classes derived from the</span>
<span
class="cmr-12">base objects in the library (see Remark</span><span
class="cmr-12">&#x00A0;2 in Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu8.html#x17-160005.2"><span
class="cmr-12">5.2</span><!--tex4ht:ref: sec:precset --></a><span
class="cmr-12">), without recompiling the</span>
<span
class="cmr-12">library itself.</span>
<!--l. 10--><p class="indent" > <span
class="cmr-12">To do so, it is necessary first to select the base type to be extended. In our</span>
<span
class="cmr-12">experience, it is quite likely that the new application needs only the definition of a</span>
<span
class="cmr-12">functionalities for the setup and the application of any multilevel and one-level</span>
class="cmr-12">&#8220;solver&#8221; object, which is almost always acting only on the local part of the distributed</span>
<span
class="cmr-12">preconditioner implemented in the package. The method </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">free</span></span></span> <span
class="cmr-12">deallocates the</span>
class="cmr-12">matrix. The parallel actions required to connect the various solver objects are most</span>
<span
class="cmr-12">preconditioner data structure, while </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">descr</span></span></span> <span
class="cmr-12">prints a description of the preconditioner</span>
class="cmr-12">often already provided by the block-Jacobi or the additive Schwarz smoothers. To</span>
<span
class="cmr-12">setup by the user. For backward compatibility, methods are also accessible as</span>
class="cmr-12">define a new solver, the developer will then have to define its components and</span>
<span
class="cmr-12">stand-alone subroutines.</span>
<!--l. 16--><p class="indent" > <span
class="cmr-12">For each method, the same user interface is overloaded with respect to the real/</span>
class="cmr-12">methods, perhaps taking one of the predefined solvers as a starting point, if</span>
<span
class="cmr-12">complex case and the single/double precision; arguments with appropriate data types</span>
class="cmr-12">possible.</span>
<!--l. 20--><p class="indent" > <span
class="cmr-12">Once the new smoother/solver class has been developed, to use it in the context of</span>
<span
class="cmr-12">must be passed to the method, i.e.,</span>
class="cmr-12">the multilevel preconditioners it is necessary to:</span>
<ul class="itemize1">
<li class="itemize"><span
class="cmr-12">the sparse matrix data structure, containing the matrix to be preconditioned,</span>
<span
class="cmr-12">must be of type </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">spmat_type</span></span></span> <span
class="cmr-12">with </span><span
class="cmti-12">x </span><span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">s</span></span></span> <span
class="cmr-12">for real single precision, </span><span
class="cmti-12">x</span>
<span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">d</span></span></span> <span
class="cmr-12">for real double precision, </span><span
class="cmti-12">x </span><span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">c</span></span></span> <span
class="cmr-12">for complex single precision, </span><span
class="cmti-12">x </span><span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">z</span></span></span> <span
class="cmr-12">for</span>
<span
class="cmr-12">complex double precision;</span>
</li>
<li class="itemize"><span
class="cmr-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="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">prec_type</span></span></span><span
class="cmr-12">, with </span><span
class="cmti-12">x</span>
<span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">s</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">d</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">c</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">z</span></span></span><span
class="cmr-12">, according to the sparse matrix data structure;</span>
class="cmr-12">declare in the application program a variable of the new type;</span>
</li>
<li class="itemize"><span
class="cmr-12">the arrays containing the vectors </span><span
class="cmmi-12">v </span><span
class="cmr-12">and </span><span
class="cmmi-12">w </span><span
class="cmr-12">involved in the preconditioner</span>
<span
class="cmr-12">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="cmr-12">must be of type </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">vect_type</span></span></span> <span
class="cmr-12">with </span><span
class="cmti-12">x </span><span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">s</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">d</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">c</span></span></span><span
class="cmr-12">,</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">z</span></span></span><span
class="cmr-12">, in a manner completely analogous to the sparse matrix type;</span>
class="cmr-12">pass that variable as the argument to the </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">set</span></span></span> <span
class="cmr-12">routine as in the following:</span>
<div class="center"
>
<!--l. 26--><p class="noindent" >
<!--l. 27--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">call</span><span
class="cmtt-12">&#x00A0;p%set(smoother,info</span><span
class="cmtt-12">&#x00A0;[,ilev,ilmax,pos])</span></span></span><br />
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">call</span><span
class="cmtt-12">&#x00A0;p%set(solver,info</span><span
class="cmtt-12">&#x00A0;[,ilev,ilmax,pos])</span></span></span></div>
</li>
<li class="itemize"><span
class="cmr-12">real parameters defining the preconditioner must be declared according to</span>
<span
class="cmr-12">the precision of the sparse matrix and preconditioner data structures (see</span>
class="cmr-12">link the code implementing the various methods into the application</span>
<span
class="cmr-12">Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu11.html#x21-200006.2"><span
class="cmr-12">6.2</span><!--tex4ht:ref: sec:precset --></a><span
class="cmr-12">).</span></li></ul>
<!--l. 39--><p class="noindent" ><span
class="cmr-12">A description of each method is given in the remainder of this section.</span>
class="cmr-12">executable.</span></li></ul>
<!--l. 32--><p class="noindent" ><span
class="cmr-12">The new solver object is then dynamically included in the preconditioner structure,</span>
<span
class="cmr-12">and acts as a </span><span
class="cmti-12">mold </span><span
class="cmr-12">to which the preconditioner will conform, even though</span>
<span
class="cmr-12">the AMG4PSBLAS library has not been modified to account for this new</span>
<span
class="cmr-12">development.</span>
<div class="subsectionTOCS">
<span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.1 </span><a
href="userhtmlsu10.html#x20-190006.1"><span
class="cmr-12">Method init</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.2 </span><a
href="userhtmlsu11.html#x21-200006.2"><span
class="cmr-12">Method set</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.3 </span><a
href="userhtmlsu12.html#x22-210006.3"><span
class="cmr-12">Method hierarchy</span><span
class="cmr-12">_build</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.4 </span><a
href="userhtmlsu13.html#x23-220006.4"><span
class="cmr-12">Method smoothers</span><span
class="cmr-12">_build</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.5 </span><a
href="userhtmlsu14.html#x24-230006.5"><span
class="cmr-12">Method build</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.6 </span><a
href="userhtmlsu15.html#x25-240006.6"><span
class="cmr-12">Method apply</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.7 </span><a
href="userhtmlsu16.html#x26-250006.7"><span
class="cmr-12">Method free</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.8 </span><a
href="userhtmlsu17.html#x27-260006.8"><span
class="cmr-12">Method descr</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span class="subsectionToc" ><span
class="cmr-12">6.9 </span><a
href="userhtmlsu18.html#x28-270006.9"><span
class="cmr-12">Auxiliary Methods</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span
class="cmr-12">&#x00A0;</span><span class="subsubsectionToc" ><span
class="cmr-12">6.9.1 </span><a
href="userhtmlsu18.html#x28-280006.9.1"><span
class="cmr-12">Method: dump</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span
class="cmr-12">&#x00A0;</span><span class="subsubsectionToc" ><span
class="cmr-12">6.9.2 </span><a
href="userhtmlsu18.html#x28-290006.9.2"><span
class="cmr-12">Method: clone</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span
class="cmr-12">&#x00A0;</span><span class="subsubsectionToc" ><span
class="cmr-12">6.9.3 </span><a
href="userhtmlsu18.html#x28-300006.9.3"><span
class="cmr-12">Method: sizeof</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span
class="cmr-12">&#x00A0;</span><span class="subsubsectionToc" ><span
class="cmr-12">6.9.4 </span><a
href="userhtmlsu18.html#x28-310006.9.4"><span
class="cmr-12">Method: allocate</span><span
class="cmr-12">_wrk</span></a></span>
<br /> <span
class="cmr-12">&#x00A0;</span><span
class="cmr-12">&#x00A0;</span><span class="subsubsectionToc" ><span
class="cmr-12">6.9.5 </span><a
href="userhtmlsu18.html#x28-320006.9.5"><span
class="cmr-12">Method: free</span><span
class="cmr-12">_wrk</span></a></span>
</div>
<!--l. 37--><p class="indent" > <span
class="cmr-12">It is possible to define new values for the keyword </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">WHAT</span></span></span> <span
class="cmr-12">in the </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">set</span></span></span> <span
class="cmr-12">routine; if the</span>
<span
class="cmr-12">library code does not recognize a keyword, it passes it down the composition hierarchy</span>
<span
class="cmr-12">(levels containing smoothers containing in turn solvers), so that it can be eventually</span>
<span
class="cmr-12">caught by the new solver. By the same token, any keyword/value pair that does not</span>
<span
class="cmr-12">pertain to a given smoother should be passed down to the contained solver, and</span>
<span
class="cmr-12">any keyword/value pair that does not pertain to a given solver is by default</span>
<span
class="cmr-12">ignored.</span>
<!--l. 46--><p class="indent" > <span
class="cmr-12">An example is provided in the source code distribution under the folder</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">tests/newslv</span></span></span><span
class="cmr-12">. In this example we are implementing a new incomplete factorization</span>
<span
class="cmr-12">variant (which is simply the ILU(0) factorization under a new name). Because of the</span>
<span
class="cmr-12">specifics of this case, it is possible to reuse the basic structure of the ILU solver, with</span>
<span
class="cmr-12">its L/D/U components and the methods needed to apply the solver; only a few</span>
<span
class="cmr-12">methods, such as the description and most importantly the build, need to be</span>
<span
class="cmr-12">ovverridden (rewritten).</span>
<!--l. 55--><p class="indent" > <span
class="cmr-12">The interfaces for the calls shown above are defined using</span>
<div class="center"
>
<!--l. 56--><p class="noindent" >
<div class="tabular"> <table id="TBL-21" class="tabular"
cellspacing="0" cellpadding="0"
><colgroup id="TBL-21-1g"><col
id="TBL-21-1"><col
id="TBL-21-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-21-1-"><td style="white-space:normal; text-align:left;" id="TBL-21-1-1"
class="td11"><!--l. 58--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">smoother</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-21-1-2"
class="td11"><!--l. 58--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">class(amg_x_base_smoother_type)</span></span></span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-21-2-"><td style="white-space:normal; text-align:left;" id="TBL-21-2-1"
class="td11"><!--l. 59--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-21-2-2"
class="td11"><!--l. 59--><p class="noindent" ><span
class="cmr-12">The user-defined new smoother to be employed in the</span>
<span
class="cmr-12">preconditioner.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-21-3-"><td style="white-space:normal; text-align:left;" id="TBL-21-3-1"
class="td11"><!--l. 61--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">solver</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-21-3-2"
class="td11"><!--l. 61--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">class(amg_x_base_solver_type)</span></span></span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-21-4-"><td style="white-space:normal; text-align:left;" id="TBL-21-4-1"
class="td11"><!--l. 62--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-21-4-2"
class="td11"><!--l. 62--><p class="noindent" ><span
class="cmr-12">The user-defined new solver to be employed in the preconditioner.</span></td></tr></table></div></div>
<!--l. 66--><p class="noindent" ><span
class="cmr-12">The other arguments are defined in the way described in Sec.</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu8.html#x17-160005.2"><span
class="cmr-12">5.2</span><!--tex4ht:ref: sec:precset --></a><span
class="cmr-12">. As an example, in the</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">tests/newslv</span></span></span> <span
class="cmr-12">code we define a new object of type </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amg_d_tlu_solver_type</span></span></span><span
class="cmr-12">, and we</span>
<span
class="cmr-12">pass it as follows:</span>
<pre class="verbatim" id="verbatim-10">
&#x00A0;&#x00A0;!&#x00A0;sparse&#x00A0;matrix&#x00A0;and&#x00A0;preconditioner
&#x00A0;&#x00A0;type(psb_dspmat_type)&#x00A0;::&#x00A0;a
&#x00A0;&#x00A0;type(amg_dprec_type)&#x00A0;&#x00A0;::&#x00A0;prec
&#x00A0;&#x00A0;type(amg_d_tlu_solver_type)&#x00A0;::&#x00A0;tlusv
......
&#x00A0;&#x00A0;!
&#x00A0;&#x00A0;!&#x00A0;&#x00A0;prepare&#x00A0;the&#x00A0;preconditioner:&#x00A0;an&#x00A0;ML&#x00A0;with&#x00A0;defaults,&#x00A0;but&#x00A0;with&#x00A0;TLU&#x00A0;solver&#x00A0;at
&#x00A0;&#x00A0;!&#x00A0;&#x00A0;intermediate&#x00A0;levels.&#x00A0;All&#x00A0;other&#x00A0;parameters&#x00A0;are&#x00A0;at&#x00A0;default&#x00A0;values.
&#x00A0;&#x00A0;!
&#x00A0;&#x00A0;call&#x00A0;prec%init(&#8217;ML&#8217;,&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;info)
&#x00A0;&#x00A0;call&#x00A0;prec%hierarchy_build(a,desc_a,info)
&#x00A0;&#x00A0;nlv&#x00A0;=&#x00A0;prec%get_nlevs()
&#x00A0;&#x00A0;call&#x00A0;prec%set(tlusv,&#x00A0;&#x00A0;&#x00A0;info,ilev=1,ilmax=max(1,nlv-1))
&#x00A0;&#x00A0;call&#x00A0;prec%smoothers_build(a,desc_a,info)
</pre>
<!--l. 88--><p class="nopar" >
<!--l. 4--><div class="crosslinks"><p class="noindent"><span
<!--l. 1--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlse7.html" ><span
class="cmr-12">next</span></a><span
@ -268,6 +224,6 @@ class="cmr-12">] [</span><a
href="userhtml.html#userhtmlse6.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<!--l. 4--><p class="indent" > <a
<!--l. 1--><p class="indent" > <a
id="tailuserhtmlse6.html"></a>
</body></html>

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>Adding new smoother and solver objects to AMG4PSBLAS</title>
<head><title>Error Handling</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
@ -10,7 +10,7 @@
<link rel="stylesheet" type="text/css" href="userhtml.css">
</head><body
>
<!--l. 4--><div class="crosslinks"><p class="noindent"><span
<!--l. 1--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlse8.html" ><span
class="cmr-12">next</span></a><span
@ -29,175 +29,39 @@ class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<h3 class="sectionHead"><span class="titlemark"><span
class="cmr-12">7 </span></span> <a
id="x29-330007"></a><span
class="cmr-12">Adding new smoother and solver objects to AMG4PSBLAS</span></h3>
<!--l. 6--><p class="noindent" ><span
class="cmr-12">Developers can add completely new smoother and/or solver classes derived from the</span>
<span
class="cmr-12">base objects in the library (see Remark</span><span
class="cmr-12">&#x00A0;2 in Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu11.html#x21-200006.2"><span
class="cmr-12">6.2</span><!--tex4ht:ref: sec:precset --></a><span
class="cmr-12">), without recompiling the</span>
<span
class="cmr-12">library itself.</span>
<!--l. 10--><p class="indent" > <span
class="cmr-12">To do so, it is necessary first to select the base type to be extended. In our</span>
<span
class="cmr-12">experience, it is quite likely that the new application needs only the definition of a</span>
<span
class="cmr-12">&#8220;solver&#8221; object, which is almost always acting only on the local part of the distributed</span>
<span
class="cmr-12">matrix. The parallel actions required to connect the various solver objects are most</span>
id="x26-300007"></a><span
class="cmr-12">Error Handling</span></h3>
<!--l. 5--><p class="noindent" ><span
class="cmr-12">The error handling in AMG4PSBLAS is based on the PSBLAS error handling. Error</span>
<span
class="cmr-12">often already provided by the block-Jacobi or the additive Schwarz smoothers. To</span>
class="cmr-12">conditions are signaled via an integer argument </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span><span
class="cmr-12">; whenever an error condition is</span>
<span
class="cmr-12">define a new solver, the developer will then have to define its components and</span>
class="cmr-12">detected, an error trace stack is built by the library up to the top-level, user-callable</span>
<span
class="cmr-12">methods, perhaps taking one of the predefined solvers as a starting point, if</span>
class="cmr-12">routine. This routine will then decide, according to the user preferences, whether</span>
<span
class="cmr-12">possible.</span>
<!--l. 20--><p class="indent" > <span
class="cmr-12">Once the new smoother/solver class has been developed, to use it in the context of</span>
class="cmr-12">the error should be handled by terminating the program or by returning the</span>
<span
class="cmr-12">the multilevel preconditioners it is necessary to:</span>
<ul class="itemize1">
<li class="itemize"><span
class="cmr-12">declare in the application program a variable of the new type;</span>
</li>
<li class="itemize"><span
class="cmr-12">pass that variable as the argument to the </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">set</span></span></span> <span
class="cmr-12">routine as in the following:</span>
<div class="center"
>
<!--l. 26--><p class="noindent" >
<!--l. 27--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">call</span><span
class="cmtt-12">&#x00A0;p%set(smoother,info</span><span
class="cmtt-12">&#x00A0;[,ilev,ilmax,pos])</span></span></span><br />
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">call</span><span
class="cmtt-12">&#x00A0;p%set(solver,info</span><span
class="cmtt-12">&#x00A0;[,ilev,ilmax,pos])</span></span></span></div>
</li>
<li class="itemize"><span
class="cmr-12">link the code implementing the various methods into the application</span>
<span
class="cmr-12">executable.</span></li></ul>
<!--l. 32--><p class="noindent" ><span
class="cmr-12">The new solver object is then dynamically included in the preconditioner structure,</span>
<span
class="cmr-12">and acts as a </span><span
class="cmti-12">mold </span><span
class="cmr-12">to which the preconditioner will conform, even though</span>
class="cmr-12">error condition to the user code, which will then take action, and whether</span>
<span
class="cmr-12">the AMG4PSBLAS library has not been modified to account for this new</span>
class="cmr-12">an error message should be printed. These options may be set by using the</span>
<span
class="cmr-12">development.</span>
class="cmr-12">PSBLAS error handling routines; for further details see the PSBLAS User&#8217;s Guide</span>
<span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span>
<!--l. 37--><p class="indent" > <span
class="cmr-12">It is possible to define new values for the keyword </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">WHAT</span></span></span> <span
class="cmr-12">in the </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">set</span></span></span> <span
class="cmr-12">routine; if the</span>
<span
class="cmr-12">library code does not recognize a keyword, it passes it down the composition hierarchy</span>
<span
class="cmr-12">(levels containing smoothers containing in turn solvers), so that it can be eventually</span>
<span
class="cmr-12">caught by the new solver. By the same token, any keyword/value pair that does not</span>
<span
class="cmr-12">pertain to a given smoother should be passed down to the contained solver, and</span>
<span
class="cmr-12">any keyword/value pair that does not pertain to a given solver is by default</span>
<span
class="cmr-12">ignored.</span>
<!--l. 46--><p class="indent" > <span
class="cmr-12">An example is provided in the source code distribution under the folder</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">tests/newslv</span></span></span><span
class="cmr-12">. In this example we are implementing a new incomplete factorization</span>
<span
class="cmr-12">variant (which is simply the ILU(0) factorization under a new name). Because of the</span>
<span
class="cmr-12">specifics of this case, it is possible to reuse the basic structure of the ILU solver, with</span>
<span
class="cmr-12">its L/D/U components and the methods needed to apply the solver; only a few</span>
<span
class="cmr-12">methods, such as the description and most importantly the build, need to be</span>
<span
class="cmr-12">ovverridden (rewritten).</span>
<!--l. 55--><p class="indent" > <span
class="cmr-12">The interfaces for the calls shown above are defined using</span>
<div class="center"
>
<!--l. 56--><p class="noindent" >
<div class="tabular"> <table id="TBL-21" class="tabular"
cellspacing="0" cellpadding="0"
><colgroup id="TBL-21-1g"><col
id="TBL-21-1"><col
id="TBL-21-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-21-1-"><td style="white-space:normal; text-align:left;" id="TBL-21-1-1"
class="td11"><!--l. 58--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">smoother</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-21-1-2"
class="td11"><!--l. 58--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">class(amg_x_base_smoother_type)</span></span></span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-21-2-"><td style="white-space:normal; text-align:left;" id="TBL-21-2-1"
class="td11"><!--l. 59--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-21-2-2"
class="td11"><!--l. 59--><p class="noindent" ><span
class="cmr-12">The user-defined new smoother to be employed in the</span>
<span
class="cmr-12">preconditioner.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-21-3-"><td style="white-space:normal; text-align:left;" id="TBL-21-3-1"
class="td11"><!--l. 61--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">solver</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-21-3-2"
class="td11"><!--l. 61--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">class(amg_x_base_solver_type)</span></span></span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-21-4-"><td style="white-space:normal; text-align:left;" id="TBL-21-4-1"
class="td11"><!--l. 62--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-21-4-2"
class="td11"><!--l. 62--><p class="noindent" ><span
class="cmr-12">The user-defined new solver to be employed in the preconditioner.</span></td></tr></table></div></div>
<!--l. 66--><p class="noindent" ><span
class="cmr-12">The other arguments are defined in the way described in Sec.</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu11.html#x21-200006.2"><span
class="cmr-12">6.2</span><!--tex4ht:ref: sec:precset --></a><span
class="cmr-12">. As an example, in the</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">tests/newslv</span></span></span> <span
class="cmr-12">code we define a new object of type </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amg_d_tlu_solver_type</span></span></span><span
class="cmr-12">, and we</span>
<span
class="cmr-12">pass it as follows:</span>
<pre class="verbatim" id="verbatim-10">
&#x00A0;&#x00A0;!&#x00A0;sparse&#x00A0;matrix&#x00A0;and&#x00A0;preconditioner
&#x00A0;&#x00A0;type(psb_dspmat_type)&#x00A0;::&#x00A0;a
&#x00A0;&#x00A0;type(amg_dprec_type)&#x00A0;&#x00A0;::&#x00A0;prec
&#x00A0;&#x00A0;type(amg_d_tlu_solver_type)&#x00A0;::&#x00A0;tlusv
......
&#x00A0;&#x00A0;!
&#x00A0;&#x00A0;!&#x00A0;&#x00A0;prepare&#x00A0;the&#x00A0;preconditioner:&#x00A0;an&#x00A0;ML&#x00A0;with&#x00A0;defaults,&#x00A0;but&#x00A0;with&#x00A0;TLU&#x00A0;solver&#x00A0;at
&#x00A0;&#x00A0;!&#x00A0;&#x00A0;intermediate&#x00A0;levels.&#x00A0;All&#x00A0;other&#x00A0;parameters&#x00A0;are&#x00A0;at&#x00A0;default&#x00A0;values.
&#x00A0;&#x00A0;!
&#x00A0;&#x00A0;call&#x00A0;prec%init(&#8217;ML&#8217;,&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;info)
&#x00A0;&#x00A0;call&#x00A0;prec%hierarchy_build(a,desc_a,info)
&#x00A0;&#x00A0;nlv&#x00A0;=&#x00A0;prec%get_nlevs()
&#x00A0;&#x00A0;call&#x00A0;prec%set(tlusv,&#x00A0;&#x00A0;&#x00A0;info,ilev=1,ilmax=max(1,nlv-1))
&#x00A0;&#x00A0;call&#x00A0;prec%smoothers_build(a,desc_a,info)
</pre>
<!--l. 88--><p class="nopar" >
<!--l. 138--><p class="indent" >

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>Error Handling</title>
<head><title>License</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
@ -12,7 +12,7 @@
>
<!--l. 1--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlse9.html" ><span
href="userhtmlli4.html" ><span
class="cmr-12">next</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse7.html" ><span
@ -28,48 +28,107 @@ href="userhtml.html#userhtmlse8.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<h3 class="sectionHead"><span class="titlemark"><span
class="cmr-12">8 </span></span> <a
id="x30-340008"></a><span
class="cmr-12">Error Handling</span></h3>
<!--l. 5--><p class="noindent" ><span
class="cmr-12">The error handling in AMG4PSBLAS is based on the PSBLAS error handling. Error</span>
<span
class="cmr-12">conditions are signaled via an integer argument </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span><span
class="cmr-12">; whenever an error condition is</span>
<span
class="cmr-12">detected, an error trace stack is built by the library up to the top-level, user-callable</span>
<span
class="cmr-12">routine. This routine will then decide, according to the user preferences, whether</span>
<span
class="cmr-12">the error should be handled by terminating the program or by returning the</span>
<span
class="cmr-12">error condition to the user code, which will then take action, and whether</span>
<span
class="cmr-12">an error message should be printed. These options may be set by using the</span>
class="cmr-12">A </span></span> <a
id="x27-31000A"></a><span
class="cmr-12">License</span></h3>
<!--l. 6--><p class="noindent" ><span
class="cmr-12">AMG4PSBLAS is freely distributable under the following copyright terms:</span>
<pre class="verbatim" id="verbatim-11">
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;AMG4PSBLAS&#x00A0;&#x00A0;version&#x00A0;1.0
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;Algebraic&#x00A0;MultiGrid&#x00A0;Preconditioners&#x00A0;Package
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;based&#x00A0;on&#x00A0;PSBLAS&#x00A0;(Parallel&#x00A0;Sparse&#x00A0;BLAS&#x00A0;version&#x00A0;3.7)
&#x00A0;&#x00A0;(C)&#x00A0;Copyright&#x00A0;2021
&#x00A0;&#x00A0;Pasqua&#x00A0;D&#8217;Ambra&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;IAC-CNR,&#x00A0;IT
&#x00A0;&#x00A0;Fabio&#x00A0;Durastante&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;University&#x00A0;of&#x00A0;Pisa&#x00A0;and&#x00A0;IAC-CNR,&#x00A0;IT
&#x00A0;&#x00A0;Salvatore&#x00A0;Filippone&#x00A0;&#x00A0;&#x00A0;&#x00A0;University&#x00A0;of&#x00A0;Rome&#x00A0;Tor-Vergata&#x00A0;and&#x00A0;IAC-CNR,&#x00A0;IT
&#x00A0;&#x00A0;Redistribution&#x00A0;and&#x00A0;use&#x00A0;in&#x00A0;source&#x00A0;and&#x00A0;binary&#x00A0;forms,&#x00A0;with&#x00A0;or&#x00A0;without
&#x00A0;&#x00A0;modification,&#x00A0;are&#x00A0;permitted&#x00A0;provided&#x00A0;that&#x00A0;the&#x00A0;following&#x00A0;conditions
&#x00A0;&#x00A0;are&#x00A0;met:
&#x00A0;&#x00A0;&#x00A0;&#x00A0;1.&#x00A0;Redistributions&#x00A0;of&#x00A0;source&#x00A0;code&#x00A0;must&#x00A0;retain&#x00A0;the&#x00A0;above&#x00A0;copyright
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;notice,&#x00A0;this&#x00A0;list&#x00A0;of&#x00A0;conditions&#x00A0;and&#x00A0;the&#x00A0;following&#x00A0;disclaimer.
&#x00A0;&#x00A0;&#x00A0;&#x00A0;2.&#x00A0;Redistributions&#x00A0;in&#x00A0;binary&#x00A0;form&#x00A0;must&#x00A0;reproduce&#x00A0;the&#x00A0;above&#x00A0;copyright
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;notice,&#x00A0;this&#x00A0;list&#x00A0;of&#x00A0;conditions,&#x00A0;and&#x00A0;the&#x00A0;following&#x00A0;disclaimer&#x00A0;in&#x00A0;the
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;documentation&#x00A0;and/or&#x00A0;other&#x00A0;materials&#x00A0;provided&#x00A0;with&#x00A0;the&#x00A0;distribution.
&#x00A0;&#x00A0;&#x00A0;&#x00A0;3.&#x00A0;The&#x00A0;name&#x00A0;of&#x00A0;the&#x00A0;MLD2P4&#x00A0;group&#x00A0;or&#x00A0;the&#x00A0;names&#x00A0;of&#x00A0;its&#x00A0;contributors&#x00A0;may
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;not&#x00A0;be&#x00A0;used&#x00A0;to&#x00A0;endorse&#x00A0;or&#x00A0;promote&#x00A0;products&#x00A0;derived&#x00A0;from&#x00A0;this
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;software&#x00A0;without&#x00A0;specific&#x00A0;written&#x00A0;permission.
&#x00A0;&#x00A0;THIS&#x00A0;SOFTWARE&#x00A0;IS&#x00A0;PROVIDED&#x00A0;BY&#x00A0;THE&#x00A0;COPYRIGHT&#x00A0;HOLDERS&#x00A0;AND&#x00A0;CONTRIBUTORS
&#x00A0;&#x00A0;&#8216;&#8216;AS&#x00A0;IS&#8217;&#8217;&#x00A0;AND&#x00A0;ANY&#x00A0;EXPRESS&#x00A0;OR&#x00A0;IMPLIED&#x00A0;WARRANTIES,&#x00A0;INCLUDING,&#x00A0;BUT&#x00A0;NOT&#x00A0;LIMITED
&#x00A0;&#x00A0;TO,&#x00A0;THE&#x00A0;IMPLIED&#x00A0;WARRANTIES&#x00A0;OF&#x00A0;MERCHANTABILITY&#x00A0;AND&#x00A0;FITNESS&#x00A0;FOR&#x00A0;A&#x00A0;PARTICULAR
&#x00A0;&#x00A0;PURPOSE&#x00A0;ARE&#x00A0;DISCLAIMED.&#x00A0;IN&#x00A0;NO&#x00A0;EVENT&#x00A0;SHALL&#x00A0;THE&#x00A0;MLD2P4&#x00A0;GROUP&#x00A0;OR&#x00A0;ITS&#x00A0;CONTRIBUTORS
&#x00A0;&#x00A0;BE&#x00A0;LIABLE&#x00A0;FOR&#x00A0;ANY&#x00A0;DIRECT,&#x00A0;INDIRECT,&#x00A0;INCIDENTAL,&#x00A0;SPECIAL,&#x00A0;EXEMPLARY,&#x00A0;OR
&#x00A0;&#x00A0;CONSEQUENTIAL&#x00A0;DAMAGES&#x00A0;(INCLUDING,&#x00A0;BUT&#x00A0;NOT&#x00A0;LIMITED&#x00A0;TO,&#x00A0;PROCUREMENT&#x00A0;OF
&#x00A0;&#x00A0;SUBSTITUTE&#x00A0;GOODS&#x00A0;OR&#x00A0;SERVICES;&#x00A0;LOSS&#x00A0;OF&#x00A0;USE,&#x00A0;DATA,&#x00A0;OR&#x00A0;PROFITS;&#x00A0;OR&#x00A0;BUSINESS
&#x00A0;&#x00A0;INTERRUPTION)&#x00A0;HOWEVER&#x00A0;CAUSED&#x00A0;AND&#x00A0;ON&#x00A0;ANY&#x00A0;THEORY&#x00A0;OF&#x00A0;LIABILITY,&#x00A0;WHETHER&#x00A0;IN
&#x00A0;&#x00A0;CONTRACT,&#x00A0;STRICT&#x00A0;LIABILITY,&#x00A0;OR&#x00A0;TORT&#x00A0;(INCLUDING&#x00A0;NEGLIGENCE&#x00A0;OR&#x00A0;OTHERWISE)
&#x00A0;&#x00A0;ARISING&#x00A0;IN&#x00A0;ANY&#x00A0;WAY&#x00A0;OUT&#x00A0;OF&#x00A0;THE&#x00A0;USE&#x00A0;OF&#x00A0;THIS&#x00A0;SOFTWARE,&#x00A0;EVEN&#x00A0;IF&#x00A0;ADVISED&#x00A0;OF&#x00A0;THE
&#x00A0;&#x00A0;POSSIBILITY&#x00A0;OF&#x00A0;SUCH&#x00A0;DAMAGE.
</pre>
<!--l. 44--><p class="nopar" >
<!--l. 47--><p class="indent" > <span
class="cmr-12">AMG4PSBLAS is an evolution of MLD2P4, whose license we reproduce here to</span>
<span
class="cmr-12">PSBLAS error handling routines; for further details see the PSBLAS User&#8217;s Guide</span>
<span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span>
class="cmr-12">abide by its terms:</span>
<pre class="verbatim" id="verbatim-12">
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;MLD2P4&#x00A0;&#x00A0;version&#x00A0;2.2
&#x00A0;&#x00A0;MultiLevel&#x00A0;Domain&#x00A0;Decomposition&#x00A0;Parallel&#x00A0;Preconditioners&#x00A0;Package
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;based&#x00A0;on&#x00A0;PSBLAS&#x00A0;(Parallel&#x00A0;Sparse&#x00A0;BLAS&#x00A0;version&#x00A0;3.5)
&#x00A0;&#x00A0;(C)&#x00A0;Copyright&#x00A0;2008-2018
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;Salvatore&#x00A0;Filippone
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;Pasqua&#x00A0;D&#8217;Ambra
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;Daniela&#x00A0;di&#x00A0;Serafino
&#x00A0;&#x00A0;Redistribution&#x00A0;and&#x00A0;use&#x00A0;in&#x00A0;source&#x00A0;and&#x00A0;binary&#x00A0;forms,&#x00A0;with&#x00A0;or&#x00A0;without
&#x00A0;&#x00A0;modification,&#x00A0;are&#x00A0;permitted&#x00A0;provided&#x00A0;that&#x00A0;the&#x00A0;following&#x00A0;conditions
&#x00A0;&#x00A0;are&#x00A0;met:
&#x00A0;&#x00A0;&#x00A0;&#x00A0;1.&#x00A0;Redistributions&#x00A0;of&#x00A0;source&#x00A0;code&#x00A0;must&#x00A0;retain&#x00A0;the&#x00A0;above&#x00A0;copyright
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;notice,&#x00A0;this&#x00A0;list&#x00A0;of&#x00A0;conditions&#x00A0;and&#x00A0;the&#x00A0;following&#x00A0;disclaimer.
&#x00A0;&#x00A0;&#x00A0;&#x00A0;2.&#x00A0;Redistributions&#x00A0;in&#x00A0;binary&#x00A0;form&#x00A0;must&#x00A0;reproduce&#x00A0;the&#x00A0;above&#x00A0;copyright
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;notice,&#x00A0;this&#x00A0;list&#x00A0;of&#x00A0;conditions,&#x00A0;and&#x00A0;the&#x00A0;following&#x00A0;disclaimer&#x00A0;in&#x00A0;the
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;documentation&#x00A0;and/or&#x00A0;other&#x00A0;materials&#x00A0;provided&#x00A0;with&#x00A0;the&#x00A0;distribution.
&#x00A0;&#x00A0;&#x00A0;&#x00A0;3.&#x00A0;The&#x00A0;name&#x00A0;of&#x00A0;the&#x00A0;MLD2P4&#x00A0;group&#x00A0;or&#x00A0;the&#x00A0;names&#x00A0;of&#x00A0;its&#x00A0;contributors&#x00A0;may
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;not&#x00A0;be&#x00A0;used&#x00A0;to&#x00A0;endorse&#x00A0;or&#x00A0;promote&#x00A0;products&#x00A0;derived&#x00A0;from&#x00A0;this
&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;software&#x00A0;without&#x00A0;specific&#x00A0;written&#x00A0;permission.
&#x00A0;&#x00A0;THIS&#x00A0;SOFTWARE&#x00A0;IS&#x00A0;PROVIDED&#x00A0;BY&#x00A0;THE&#x00A0;COPYRIGHT&#x00A0;HOLDERS&#x00A0;AND&#x00A0;CONTRIBUTORS
&#x00A0;&#x00A0;&#8216;&#8216;AS&#x00A0;IS&#8217;&#8217;&#x00A0;AND&#x00A0;ANY&#x00A0;EXPRESS&#x00A0;OR&#x00A0;IMPLIED&#x00A0;WARRANTIES,&#x00A0;INCLUDING,&#x00A0;BUT&#x00A0;NOT&#x00A0;LIMITED
&#x00A0;&#x00A0;TO,&#x00A0;THE&#x00A0;IMPLIED&#x00A0;WARRANTIES&#x00A0;OF&#x00A0;MERCHANTABILITY&#x00A0;AND&#x00A0;FITNESS&#x00A0;FOR&#x00A0;A&#x00A0;PARTICULAR
&#x00A0;&#x00A0;PURPOSE&#x00A0;ARE&#x00A0;DISCLAIMED.&#x00A0;IN&#x00A0;NO&#x00A0;EVENT&#x00A0;SHALL&#x00A0;THE&#x00A0;MLD2P4&#x00A0;GROUP&#x00A0;OR&#x00A0;ITS&#x00A0;CONTRIBUTORS
&#x00A0;&#x00A0;BE&#x00A0;LIABLE&#x00A0;FOR&#x00A0;ANY&#x00A0;DIRECT,&#x00A0;INDIRECT,&#x00A0;INCIDENTAL,&#x00A0;SPECIAL,&#x00A0;EXEMPLARY,&#x00A0;OR
&#x00A0;&#x00A0;CONSEQUENTIAL&#x00A0;DAMAGES&#x00A0;(INCLUDING,&#x00A0;BUT&#x00A0;NOT&#x00A0;LIMITED&#x00A0;TO,&#x00A0;PROCUREMENT&#x00A0;OF
&#x00A0;&#x00A0;SUBSTITUTE&#x00A0;GOODS&#x00A0;OR&#x00A0;SERVICES;&#x00A0;LOSS&#x00A0;OF&#x00A0;USE,&#x00A0;DATA,&#x00A0;OR&#x00A0;PROFITS;&#x00A0;OR&#x00A0;BUSINESS
&#x00A0;&#x00A0;INTERRUPTION)&#x00A0;HOWEVER&#x00A0;CAUSED&#x00A0;AND&#x00A0;ON&#x00A0;ANY&#x00A0;THEORY&#x00A0;OF&#x00A0;LIABILITY,&#x00A0;WHETHER&#x00A0;IN
&#x00A0;&#x00A0;CONTRACT,&#x00A0;STRICT&#x00A0;LIABILITY,&#x00A0;OR&#x00A0;TORT&#x00A0;(INCLUDING&#x00A0;NEGLIGENCE&#x00A0;OR&#x00A0;OTHERWISE)
&#x00A0;&#x00A0;ARISING&#x00A0;IN&#x00A0;ANY&#x00A0;WAY&#x00A0;OUT&#x00A0;OF&#x00A0;THE&#x00A0;USE&#x00A0;OF&#x00A0;THIS&#x00A0;SOFTWARE,&#x00A0;EVEN&#x00A0;IF&#x00A0;ADVISED&#x00A0;OF&#x00A0;THE
&#x00A0;&#x00A0;POSSIBILITY&#x00A0;OF&#x00A0;SUCH&#x00A0;DAMAGE.
</pre>
<!--l. 87--><p class="nopar" >
<!--l. 141--><p class="indent" >
<!--l. 1--><div class="crosslinks"><p class="noindent"><span
<!--l. 2--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlse9.html" ><span
href="userhtmlli4.html" ><span
class="cmr-12">next</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse7.html" ><span
@ -84,6 +143,6 @@ class="cmr-12">] [</span><a
href="userhtml.html#userhtmlse8.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<!--l. 1--><p class="indent" > <a
<!--l. 2--><p class="indent" > <a
id="tailuserhtmlse8.html"></a>
</body></html>

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>Method init</title>
<head><title>Method smoothers_build</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
@ -10,92 +10,187 @@
<link rel="stylesheet" type="text/css" href="userhtml.css">
</head><body
>
<!--l. 43--><div class="crosslinks"><p class="noindent"><span
<!--l. 603--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu11.html" ><span
class="cmr-12">next</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu9.html" ><span
class="cmr-12">prev</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu9.html#tailuserhtmlsu9.html" ><span
class="cmr-12">prev-tail</span></a><span
class="cmr-12">] [</span><a
href="#tailuserhtmlsu10.html"><span
class="cmr-12">tail</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse6.html#userhtmlsu10.html" ><span
href="userhtmlse5.html#userhtmlsu10.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<h4 class="subsectionHead"><span class="titlemark"><span
class="cmr-12">6.1 </span></span> <a
id="x20-190006.1"></a><span
class="cmr-12">Method init</span></h4>
class="cmr-12">5.4 </span></span> <a
id="x19-180005.4"></a><span
class="cmr-12">Method smoothers</span><span
class="cmr-12">_build</span></h4>
<div class="center"
>
<!--l. 45--><p class="noindent" >
<!--l. 46--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
<!--l. 606--><p class="noindent" >
<!--l. 607--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">call</span><span
class="cmtt-12">&#x00A0;p%init(icontx,ptype,info)</span></span></span></div>
<!--l. 49--><p class="noindent" ><span
class="cmr-12">This method allocates and initializes the preconditioner </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">p</span></span></span><span
class="cmr-12">, according to the</span>
class="cmtt-12">&#x00A0;p%smoothers_build(a,desc_a,p,info[,amold,vmold,imold])</span></span></span><br />
</div>
<!--l. 610--><p class="noindent" ><span
class="cmr-12">This method builds the smoothers and the coarsest-level solvers for the multilevel</span>
<span
class="cmr-12">preconditioner type chosen by the user.</span>
<!--l. 53--><p class="noindent" ><span
class="cmr-12">preconditioner </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">p</span></span></span><span
class="cmr-12">, according to the requirements made by the user through the methods</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">init</span></span></span> <span
class="cmr-12">and </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">set</span></span></span><span
class="cmr-12">, and based on the aggregation hierarchy produced by a previous call to</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">hierarchy_build</span></span></span> <span
class="cmr-12">(see Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu9.html#x18-170005.3"><span
class="cmr-12">5.3</span><!--tex4ht:ref: sec:hier_bld --></a><span
class="cmr-12">).</span>
<!--l. 617--><p class="noindent" ><span
class="cmbx-12">Arguments</span>
<div class="tabular"> <table id="TBL-2" class="tabular"
<div class="tabular"> <table id="TBL-12" class="tabular"
cellspacing="0" cellpadding="0"
><colgroup id="TBL-2-1g"><col
id="TBL-2-1"><col
id="TBL-2-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-2-1-"><td style="white-space:normal; text-align:left;" id="TBL-2-1-1"
class="td11"><!--l. 57--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">icontxt</span></span></span> </td> <td style="white-space:normal; text-align:left;" id="TBL-2-1-2"
class="td11"><!--l. 57--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">integer,</span><span
><colgroup id="TBL-12-1g"><col
id="TBL-12-1"><col
id="TBL-12-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-12-1-"><td style="white-space:normal; text-align:left;" id="TBL-12-1-1"
class="td11"><!--l. 620--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">a</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-12-1-2"
class="td11"><!--l. 620--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">type(psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">spmat_type),</span><span
class="cmtt-12">&#x00A0;intent(in)</span></span></span><span
class="cmr-12">.</span> </td>
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-2-"><td style="white-space:normal; text-align:left;" id="TBL-2-2-1"
class="td11"><!--l. 58--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-2-2-2"
class="td11"><!--l. 58--><p class="noindent" ><span
class="cmr-12">The communication context.</span> </td></tr><tr
style="vertical-align:baseline;" id="TBL-2-3-"><td style="white-space:normal; text-align:left;" id="TBL-2-3-1"
class="td11"><!--l. 59--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">ptype</span></span></span> </td> <td style="white-space:normal; text-align:left;" id="TBL-2-3-2"
class="td11"><!--l. 59--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">character(len=*),</span><span
class="cmtt-12">&#x00A0;intent(in)</span></span></span><span
class="cmr-12">.</span></td>
style="vertical-align:baseline;" id="TBL-12-2-"><td style="white-space:normal; text-align:left;" id="TBL-12-2-1"
class="td11"><!--l. 621--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-2-2"
class="td11"><!--l. 621--><p class="noindent" ><span
class="cmr-12">The sparse matrix structure containing the local part of the matrix</span>
<span
class="cmr-12">to be preconditioned. Note that </span><span
class="cmti-12">x </span><span
class="cmr-12">must be chosen according to the</span>
<span
class="cmr-12">real/complex, single/double precision version of AMG4PSBLAS</span>
<span
class="cmr-12">under use. See the PSBLAS User&#8217;s Guide for details </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-4-"><td style="white-space:normal; text-align:left;" id="TBL-2-4-1"
class="td11"><!--l. 60--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-2-4-2"
class="td11"><!--l. 60--><p class="noindent" ><span
class="cmr-12">The type of preconditioner. Its values are specified in Table</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse5.html#x17-160151"><span
class="cmr-12">1</span><!--tex4ht:ref: tab:precinit --></a><span
class="cmr-12">.</span> </td>
style="vertical-align:baseline;" id="TBL-12-3-"><td style="white-space:normal; text-align:left;" id="TBL-12-3-1"
class="td11"><!--l. 625--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">desc_a</span></span></span></td><td style="white-space:normal; text-align:left;" id="TBL-12-3-2"
class="td11"><!--l. 625--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">type(psb_desc_type),</span><span
class="cmtt-12">&#x00A0;intent(in)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-5-"><td style="white-space:normal; text-align:left;" id="TBL-2-5-1"
class="td11"><!--l. 62--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-2-5-2"
class="td11"><!--l. 62--><p class="noindent" ><span
class="cmr-12">Note that the strings are case insensitive.</span> </td>
style="vertical-align:baseline;" id="TBL-12-4-"><td style="white-space:normal; text-align:left;" id="TBL-12-4-1"
class="td11"><!--l. 626--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-4-2"
class="td11"><!--l. 626--><p class="noindent" ><span
class="cmr-12">The communication descriptor of </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">a</span></span></span><span
class="cmr-12">. See the PSBLAS User&#8217;s Guide</span>
<span
class="cmr-12">for details </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-6-"><td style="white-space:normal; text-align:left;" id="TBL-2-6-1"
class="td11"><!--l. 63--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-2-6-2"
class="td11"><!--l. 63--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
style="vertical-align:baseline;" id="TBL-12-5-"><td style="white-space:normal; text-align:left;" id="TBL-12-5-1"
class="td11"><!--l. 628--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-12-5-2"
class="td11"><!--l. 628--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">integer,</span><span
class="cmtt-12">&#x00A0;intent(out)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-7-"><td style="white-space:normal; text-align:left;" id="TBL-2-7-1"
class="td11"><!--l. 64--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-2-7-2"
class="td11"><!--l. 64--><p class="noindent" ><span
style="vertical-align:baseline;" id="TBL-12-6-"><td style="white-space:normal; text-align:left;" id="TBL-12-6-1"
class="td11"><!--l. 629--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-6-2"
class="td11"><!--l. 629--><p class="noindent" ><span
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse8.html#x30-340008"><span
class="cmr-12">8</span><!--tex4ht:ref: sec:errors --></a> <span
href="userhtmlse7.html#x26-300007"><span
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
class="cmr-12">for details.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-8-"><td style="white-space:normal; text-align:left;" id="TBL-2-8-1"
style="vertical-align:baseline;" id="TBL-12-7-"><td style="white-space:normal; text-align:left;" id="TBL-12-7-1"
class="td11"><!--l. 630--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amold</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-12-7-2"
class="td11"><!--l. 630--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">class(psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">_base_sparse_mat),</span><span
class="cmtt-12">&#x00A0;intent(in),</span><span
class="cmtt-12">&#x00A0;optional</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-8-"><td style="white-space:normal; text-align:left;" id="TBL-12-8-1"
class="td11"><!--l. 631--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-8-2"
class="td11"><!--l. 631--><p class="noindent" ><span
class="cmr-12">The desired dynamic type for internal matrix components; this</span>
<span
class="cmr-12">allows e.g. running on GPUs; it needs not be the same on all</span>
<span
class="cmr-12">processes. See the PSBLAS User&#8217;s Guide for details </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-9-"><td style="white-space:normal; text-align:left;" id="TBL-12-9-1"
class="td11"><!--l. 635--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">vmold</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-12-9-2"
class="td11"><!--l. 635--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">class(psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">_base_vect_type),</span><span
class="cmtt-12">&#x00A0;intent(in),</span><span
class="cmtt-12">&#x00A0;optional</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-10-"><td style="white-space:normal; text-align:left;" id="TBL-12-10-1"
class="td11"><!--l. 636--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-10-2"
class="td11"><!--l. 636--><p class="noindent" ><span
class="cmr-12">The desired dynamic type for internal vector components; this</span>
<span
class="cmr-12">allows e.g. running on GPUs.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-11-"><td style="white-space:normal; text-align:left;" id="TBL-12-11-1"
class="td11"><!--l. 638--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">imold</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-12-11-2"
class="td11"><!--l. 638--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">class(psb_i_base_vect_type),</span><span
class="cmtt-12">&#x00A0;intent(in),</span><span
class="cmtt-12">&#x00A0;optional</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-12-"><td style="white-space:normal; text-align:left;" id="TBL-12-12-1"
class="td11"><!--l. 639--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-12-2"
class="td11"><!--l. 639--><p class="noindent" ><span
class="cmr-12">The desired dynamic type for internal integer vector components;</span>
<span
class="cmr-12">this allows e.g. running on GPUs.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-13-"><td style="white-space:normal; text-align:left;" id="TBL-12-13-1"
class="td11"> </td> </tr></table></div>
@ -103,17 +198,23 @@ class="td11"> </td> </tr></table></div>
<!--l. 73--><div class="crosslinks"><p class="noindent"><span
<!--l. 645--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu11.html" ><span
class="cmr-12">next</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu9.html" ><span
class="cmr-12">prev</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu9.html#tailuserhtmlsu9.html" ><span
class="cmr-12">prev-tail</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu10.html" ><span
class="cmr-12">front</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse6.html#userhtmlsu10.html" ><span
href="userhtmlse5.html#userhtmlsu10.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<!--l. 73--><p class="indent" > <a
<!--l. 645--><p class="indent" > <a
id="tailuserhtmlsu10.html"></a>
</body></html>

File diff suppressed because it is too large Load Diff

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>Method hierarchy_build</title>
<head><title>Method apply</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
@ -10,7 +10,7 @@
<link rel="stylesheet" type="text/css" href="userhtml.css">
</head><body
>
<!--l. 572--><div class="crosslinks"><p class="noindent"><span
<!--l. 693--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu13.html" ><span
class="cmr-12">next</span></a><span
@ -24,108 +24,247 @@ class="cmr-12">] [</span><a
href="#tailuserhtmlsu12.html"><span
class="cmr-12">tail</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse6.html#userhtmlsu12.html" ><span
href="userhtmlse5.html#userhtmlsu12.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<h4 class="subsectionHead"><span class="titlemark"><span
class="cmr-12">6.3 </span></span> <a
id="x22-210006.3"></a><span
class="cmr-12">Method hierarchy</span><span
class="cmr-12">_build</span></h4>
class="cmr-12">5.6 </span></span> <a
id="x21-200005.6"></a><span
class="cmr-12">Method apply</span></h4>
<div class="center"
>
<!--l. 574--><p class="noindent" >
<!--l. 575--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
<!--l. 695--><p class="noindent" >
<!--l. 696--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">call</span><span
class="cmtt-12">&#x00A0;p%hierarchy_build(a,desc_a,info)</span></span></span><br />
class="cmtt-12">&#x00A0;p%apply(x,y,desc_a,info</span><span
class="cmtt-12">&#x00A0;[,trans,work])</span></span></span><br />
</div>
<!--l. 578--><p class="noindent" ><span
class="cmr-12">This method builds the hierarchy of matrices and restriction/prolongation operators for</span>
<!--l. 699--><p class="noindent" ><span
class="cmr-12">This method computes </span><span
class="cmmi-12">y </span><span
class="cmr-12">= </span><span
class="cmmi-12">op</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="cmr-12">) </span><span
class="cmmi-12">x</span><span
class="cmr-12">, where </span><span
class="cmmi-12">B </span><span
class="cmr-12">is a previously built preconditioner,</span>
<span
class="cmr-12">the multilevel preconditioner </span><span class="obeylines-h"><span class="verb"><span
class="cmr-12">stored into </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">p</span></span></span><span
class="cmr-12">, according to the requirements made by the user</span>
class="cmr-12">, and </span><span
class="cmmi-12">op </span><span
class="cmr-12">denotes the preconditioner itself or its transpose, according to the</span>
<span
class="cmr-12">through the methods </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">init</span></span></span> <span
class="cmr-12">and </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">set</span></span></span><span
class="cmr-12">.</span>
<!--l. 583--><p class="noindent" ><span
class="cmr-12">value of </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">trans</span></span></span><span
class="cmr-12">. Note that, when AMG4PSBLAS is used with a Krylov solver from</span>
<span
class="cmr-12">PSBLAS, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">p%apply</span></span></span> <span
class="cmr-12">is called within the PSBLAS method </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">psb_krylov</span></span></span> <span
class="cmr-12">and hence it is</span>
<span
class="cmr-12">completely transparent to the user.</span>
<!--l. 708--><p class="noindent" ><span
class="cmbx-12">Arguments</span>
<div class="tabular"> <table id="TBL-11" class="tabular"
<div class="tabular"> <table id="TBL-14" class="tabular"
cellspacing="0" cellpadding="0"
><colgroup id="TBL-11-1g"><col
id="TBL-11-1"><col
id="TBL-11-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-11-1-"><td style="white-space:normal; text-align:left;" id="TBL-11-1-1"
class="td11"><!--l. 586--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">a</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-11-1-2"
class="td11"><!--l. 586--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">type(psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">spmat_type),</span><span
><colgroup id="TBL-14-1g"><col
id="TBL-14-1"><col
id="TBL-14-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-14-1-"><td style="white-space:normal; text-align:left;" id="TBL-14-1-1"
class="td11"><!--l. 711--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">x</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-14-1-2"
class="td11"><!--l. 711--><p class="noindent" ><span
class="cmti-12">type</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">(</span></span></span><span
class="cmti-12">kind</span><span
class="cmti-12">_parameter</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">),</span><span
class="cmtt-12">&#x00A0;dimension(:),</span><span
class="cmtt-12">&#x00A0;intent(in)</span></span></span><span
class="cmr-12">.</span> </td>
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-11-2-"><td style="white-space:normal; text-align:left;" id="TBL-11-2-1"
class="td11"><!--l. 587--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-11-2-2"
class="td11"><!--l. 587--><p class="noindent" ><span
class="cmr-12">The sparse matrix structure containing the local part of the matrix</span>
style="vertical-align:baseline;" id="TBL-14-2-"><td style="white-space:normal; text-align:left;" id="TBL-14-2-1"
class="td11"><!--l. 712--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-2-2"
class="td11"><!--l. 712--><p class="noindent" ><span
class="cmr-12">The local part of the vector </span><span
class="cmmi-12">x</span><span
class="cmr-12">. Note that </span><span
class="cmti-12">type </span><span
class="cmr-12">and </span><span
class="cmti-12">kind</span><span
class="cmti-12">_parameter</span>
<span
class="cmr-12">to be preconditioned. Note that </span><span
class="cmti-12">x </span><span
class="cmr-12">must be chosen according to the</span>
class="cmr-12">must be chosen according to the real/complex, single/double</span>
<span
class="cmr-12">precision version of AMG4PSBLAS under use.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-3-"><td style="white-space:normal; text-align:left;" id="TBL-14-3-1"
class="td11"><!--l. 715--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">y</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-14-3-2"
class="td11"><!--l. 715--><p class="noindent" ><span
class="cmti-12">type</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">(</span></span></span><span
class="cmti-12">kind</span><span
class="cmti-12">_parameter</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">),</span><span
class="cmtt-12">&#x00A0;dimension(:),</span><span
class="cmtt-12">&#x00A0;intent(out)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-4-"><td style="white-space:normal; text-align:left;" id="TBL-14-4-1"
class="td11"><!--l. 716--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-4-2"
class="td11"><!--l. 716--><p class="noindent" ><span
class="cmr-12">The local part of the vector </span><span
class="cmmi-12">y</span><span
class="cmr-12">. Note that </span><span
class="cmti-12">type </span><span
class="cmr-12">and </span><span
class="cmti-12">kind</span><span
class="cmti-12">_parameter</span>
<span
class="cmr-12">real/complex, single/double precision version of AMG4PSBLAS</span>
class="cmr-12">must be chosen according to the real/complex, single/double</span>
<span
class="cmr-12">under use. See the PSBLAS User&#8217;s Guide for details </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span> </td>
class="cmr-12">precision version of AMG4PSBLAS under use.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-11-3-"><td style="white-space:normal; text-align:left;" id="TBL-11-3-1"
class="td11"><!--l. 592--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">desc_a</span></span></span></td><td style="white-space:normal; text-align:left;" id="TBL-11-3-2"
class="td11"><!--l. 592--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
style="vertical-align:baseline;" id="TBL-14-5-"><td style="white-space:normal; text-align:left;" id="TBL-14-5-1"
class="td11"><!--l. 719--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">desc_a</span></span></span></td><td style="white-space:normal; text-align:left;" id="TBL-14-5-2"
class="td11"><!--l. 719--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">type(psb_desc_type),</span><span
class="cmtt-12">&#x00A0;intent(in)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-11-4-"><td style="white-space:normal; text-align:left;" id="TBL-11-4-1"
class="td11"><!--l. 593--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-11-4-2"
class="td11"><!--l. 593--><p class="noindent" ><span
class="cmr-12">The communication descriptor of </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">a</span></span></span><span
class="cmr-12">. See the PSBLAS User&#8217;s Guide</span>
style="vertical-align:baseline;" id="TBL-14-6-"><td style="white-space:normal; text-align:left;" id="TBL-14-6-1"
class="td11"><!--l. 720--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-6-2"
class="td11"><!--l. 720--><p class="noindent" ><span
class="cmr-12">The communication descriptor associated to the matrix to be</span>
<span
class="cmr-12">for details </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span> </td>
class="cmr-12">preconditioned.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-11-5-"><td style="white-space:normal; text-align:left;" id="TBL-11-5-1"
class="td11"><!--l. 596--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-11-5-2"
class="td11"><!--l. 596--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
style="vertical-align:baseline;" id="TBL-14-7-"><td style="white-space:normal; text-align:left;" id="TBL-14-7-1"
class="td11"><!--l. 722--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-14-7-2"
class="td11"><!--l. 722--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">integer,</span><span
class="cmtt-12">&#x00A0;intent(out)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-11-6-"><td style="white-space:normal; text-align:left;" id="TBL-11-6-1"
class="td11"><!--l. 597--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-11-6-2"
class="td11"><!--l. 597--><p class="noindent" ><span
style="vertical-align:baseline;" id="TBL-14-8-"><td style="white-space:normal; text-align:left;" id="TBL-14-8-1"
class="td11"><!--l. 723--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-8-2"
class="td11"><!--l. 723--><p class="noindent" ><span
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse8.html#x30-340008"><span
class="cmr-12">8</span><!--tex4ht:ref: sec:errors --></a> <span
href="userhtmlse7.html#x26-300007"><span
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
class="cmr-12">for details.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-11-7-"><td style="white-space:normal; text-align:left;" id="TBL-11-7-1"
style="vertical-align:baseline;" id="TBL-14-9-"><td style="white-space:normal; text-align:left;" id="TBL-14-9-1"
class="td11"><!--l. 724--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">trans</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-14-9-2"
class="td11"><!--l. 724--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">character(len=1),</span><span
class="cmtt-12">&#x00A0;optional,</span><span
class="cmtt-12">&#x00A0;intent(in).</span></span></span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-10-"><td style="white-space:normal; text-align:left;" id="TBL-14-10-1"
class="td11"><!--l. 725--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-10-2"
class="td11"><!--l. 725--><p class="noindent" ><span
class="cmr-12">If </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">trans</span></span></span> <span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">&#8217;N&#8217;,&#8217;n&#8217;</span></span></span> <span
class="cmr-12">then </span><span
class="cmmi-12">op</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="cmr-12">) = </span><span
class="cmmi-12">B</span><sup><span
class="cmsy-8">-</span><span
class="cmr-8">1</span></sup><span
class="cmr-12">; if </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">trans</span></span></span> <span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">&#8217;T&#8217;,&#8217;t&#8217;</span></span></span>
<span
class="cmr-12">then </span><span
class="cmmi-12">op</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="cmr-12">) = </span><span
class="cmmi-12">B</span><sup><span
class="cmsy-8">-</span><span
class="cmmi-8">T</span> </sup> <span
class="cmr-12">(transpose of </span><span
class="cmmi-12">B</span><sup><span
class="cmsy-8">-</span><span
class="cmr-8">1</span></sup><span
class="cmr-12">); if </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">trans</span></span></span> <span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">&#8217;C&#8217;,&#8217;c&#8217;</span></span></span> <span
class="cmr-12">then</span>
<span
class="cmmi-12">op</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="cmr-12">) = </span><span
class="cmmi-12">B</span><sup><span
class="cmsy-8">-</span><span
class="cmmi-8">C</span></sup> <span
class="cmr-12">(conjugate transpose of </span><span
class="cmmi-12">B</span><sup><span
class="cmsy-8">-</span><span
class="cmr-8">1</span></sup><span
class="cmr-12">).</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-11-"><td style="white-space:normal; text-align:left;" id="TBL-14-11-1"
class="td11"><!--l. 729--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">work</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-14-11-2"
class="td11"><!--l. 729--><p class="noindent" ><span
class="cmti-12">type</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">(</span></span></span><span
class="cmti-12">kind</span><span
class="cmti-12">_parameter</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">),</span><span
class="cmtt-12">&#x00A0;dimension(:),</span><span
class="cmtt-12">&#x00A0;optional,</span><span
class="cmtt-12">&#x00A0;target</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-12-"><td style="white-space:normal; text-align:left;" id="TBL-14-12-1"
class="td11"><!--l. 730--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-12-2"
class="td11"><!--l. 730--><p class="noindent" ><span
class="cmr-12">Workspace. Its size should be at least </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">4</span><span
class="cmtt-12">&#x00A0;*</span><span
class="cmtt-12">&#x00A0;psb_cd_get_local_</span></span></span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">cols(desc_a)</span></span></span> <span
class="cmr-12">(see the PSBLAS User&#8217;s Guide). Note that </span><span
class="cmti-12">type</span>
<span
class="cmr-12">and </span><span
class="cmti-12">kind</span><span
class="cmti-12">_parameter </span><span
class="cmr-12">must be chosen according to the real/complex,</span>
<span
class="cmr-12">single/double precision version of AMG4PSBLAS under use.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-13-"><td style="white-space:normal; text-align:left;" id="TBL-14-13-1"
class="td11"> </td> </tr></table></div>
@ -133,7 +272,7 @@ class="td11"> </td> </tr></table></div>
<!--l. 603--><div class="crosslinks"><p class="noindent"><span
<!--l. 739--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu13.html" ><span
class="cmr-12">next</span></a><span
@ -147,9 +286,9 @@ class="cmr-12">] [</span><a
href="userhtmlsu12.html" ><span
class="cmr-12">front</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse6.html#userhtmlsu12.html" ><span
href="userhtmlse5.html#userhtmlsu12.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<!--l. 603--><p class="indent" > <a
<!--l. 739--><p class="indent" > <a
id="tailuserhtmlsu12.html"></a>
</body></html>

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>Method smoothers_build</title>
<head><title>Method free</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
@ -10,7 +10,7 @@
<link rel="stylesheet" type="text/css" href="userhtml.css">
</head><body
>
<!--l. 603--><div class="crosslinks"><p class="noindent"><span
<!--l. 739--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu14.html" ><span
class="cmr-12">next</span></a><span
@ -24,173 +24,51 @@ class="cmr-12">] [</span><a
href="#tailuserhtmlsu13.html"><span
class="cmr-12">tail</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse6.html#userhtmlsu13.html" ><span
href="userhtmlse5.html#userhtmlsu13.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<h4 class="subsectionHead"><span class="titlemark"><span
class="cmr-12">6.4 </span></span> <a
id="x23-220006.4"></a><span
class="cmr-12">Method smoothers</span><span
class="cmr-12">_build</span></h4>
class="cmr-12">5.7 </span></span> <a
id="x22-210005.7"></a><span
class="cmr-12">Method free</span></h4>
<div class="center"
>
<!--l. 606--><p class="noindent" >
<!--l. 607--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
<!--l. 741--><p class="noindent" >
<!--l. 742--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">call</span><span
class="cmtt-12">&#x00A0;p%smoothers_build(a,desc_a,p,info[,amold,vmold,imold])</span></span></span><br />
class="cmtt-12">&#x00A0;p%free(p,info)</span></span></span><br />
</div>
<!--l. 610--><p class="noindent" ><span
class="cmr-12">This method builds the smoothers and the coarsest-level solvers for the multilevel</span>
<span
class="cmr-12">preconditioner </span><span class="obeylines-h"><span class="verb"><span
<!--l. 745--><p class="noindent" ><span
class="cmr-12">This method deallocates the preconditioner data structure </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">p</span></span></span><span
class="cmr-12">, according to the requirements made by the user through the methods</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">init</span></span></span> <span
class="cmr-12">and </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">set</span></span></span><span
class="cmr-12">, and based on the aggregation hierarchy produced by a previous call to</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">hierarchy_build</span></span></span> <span
class="cmr-12">(see Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu12.html#x22-210006.3"><span
class="cmr-12">6.3</span><!--tex4ht:ref: sec:hier_bld --></a><span
class="cmr-12">).</span>
<!--l. 617--><p class="noindent" ><span
class="cmr-12">.</span>
<!--l. 748--><p class="noindent" ><span
class="cmbx-12">Arguments</span>
<div class="tabular"> <table id="TBL-12" class="tabular"
<div class="tabular"> <table id="TBL-15" class="tabular"
cellspacing="0" cellpadding="0"
><colgroup id="TBL-12-1g"><col
id="TBL-12-1"><col
id="TBL-12-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-12-1-"><td style="white-space:normal; text-align:left;" id="TBL-12-1-1"
class="td11"><!--l. 620--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">a</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-12-1-2"
class="td11"><!--l. 620--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">type(psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">spmat_type),</span><span
class="cmtt-12">&#x00A0;intent(in)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-2-"><td style="white-space:normal; text-align:left;" id="TBL-12-2-1"
class="td11"><!--l. 621--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-2-2"
class="td11"><!--l. 621--><p class="noindent" ><span
class="cmr-12">The sparse matrix structure containing the local part of the matrix</span>
<span
class="cmr-12">to be preconditioned. Note that </span><span
class="cmti-12">x </span><span
class="cmr-12">must be chosen according to the</span>
<span
class="cmr-12">real/complex, single/double precision version of AMG4PSBLAS</span>
<span
class="cmr-12">under use. See the PSBLAS User&#8217;s Guide for details </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-3-"><td style="white-space:normal; text-align:left;" id="TBL-12-3-1"
class="td11"><!--l. 625--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">desc_a</span></span></span></td><td style="white-space:normal; text-align:left;" id="TBL-12-3-2"
class="td11"><!--l. 625--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">type(psb_desc_type),</span><span
class="cmtt-12">&#x00A0;intent(in)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-4-"><td style="white-space:normal; text-align:left;" id="TBL-12-4-1"
class="td11"><!--l. 626--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-4-2"
class="td11"><!--l. 626--><p class="noindent" ><span
class="cmr-12">The communication descriptor of </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">a</span></span></span><span
class="cmr-12">. See the PSBLAS User&#8217;s Guide</span>
<span
class="cmr-12">for details </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-5-"><td style="white-space:normal; text-align:left;" id="TBL-12-5-1"
class="td11"><!--l. 628--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-12-5-2"
class="td11"><!--l. 628--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
><colgroup id="TBL-15-1g"><col
id="TBL-15-1"><col
id="TBL-15-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-15-1-"><td style="white-space:normal; text-align:left;" id="TBL-15-1-1"
class="td11"><!--l. 751--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-15-1-2"
class="td11"><!--l. 751--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">integer,</span><span
class="cmtt-12">&#x00A0;intent(out)</span></span></span><span
class="cmr-12">.</span> </td>
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-6-"><td style="white-space:normal; text-align:left;" id="TBL-12-6-1"
class="td11"><!--l. 629--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-6-2"
class="td11"><!--l. 629--><p class="noindent" ><span
style="vertical-align:baseline;" id="TBL-15-2-"><td style="white-space:normal; text-align:left;" id="TBL-15-2-1"
class="td11"><!--l. 752--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-15-2-2"
class="td11"><!--l. 752--><p class="noindent" ><span
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse8.html#x30-340008"><span
class="cmr-12">8</span><!--tex4ht:ref: sec:errors --></a> <span
class="cmr-12">for details.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-7-"><td style="white-space:normal; text-align:left;" id="TBL-12-7-1"
class="td11"><!--l. 630--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amold</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-12-7-2"
class="td11"><!--l. 630--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">class(psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">_base_sparse_mat),</span><span
class="cmtt-12">&#x00A0;intent(in),</span><span
class="cmtt-12">&#x00A0;optional</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-8-"><td style="white-space:normal; text-align:left;" id="TBL-12-8-1"
class="td11"><!--l. 631--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-8-2"
class="td11"><!--l. 631--><p class="noindent" ><span
class="cmr-12">The desired dynamic type for internal matrix components; this</span>
<span
class="cmr-12">allows e.g. running on GPUs; it needs not be the same on all</span>
<span
class="cmr-12">processes. See the PSBLAS User&#8217;s Guide for details </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-9-"><td style="white-space:normal; text-align:left;" id="TBL-12-9-1"
class="td11"><!--l. 635--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">vmold</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-12-9-2"
class="td11"><!--l. 635--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">class(psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">_base_vect_type),</span><span
class="cmtt-12">&#x00A0;intent(in),</span><span
class="cmtt-12">&#x00A0;optional</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-10-"><td style="white-space:normal; text-align:left;" id="TBL-12-10-1"
class="td11"><!--l. 636--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-10-2"
class="td11"><!--l. 636--><p class="noindent" ><span
class="cmr-12">The desired dynamic type for internal vector components; this</span>
<span
class="cmr-12">allows e.g. running on GPUs.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-11-"><td style="white-space:normal; text-align:left;" id="TBL-12-11-1"
class="td11"><!--l. 638--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">imold</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-12-11-2"
class="td11"><!--l. 638--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">class(psb_i_base_vect_type),</span><span
class="cmtt-12">&#x00A0;intent(in),</span><span
class="cmtt-12">&#x00A0;optional</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-12-"><td style="white-space:normal; text-align:left;" id="TBL-12-12-1"
class="td11"><!--l. 639--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-12-12-2"
class="td11"><!--l. 639--><p class="noindent" ><span
class="cmr-12">The desired dynamic type for internal integer vector components;</span>
href="userhtmlse7.html#x26-300007"><span
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
class="cmr-12">for</span>
<span
class="cmr-12">this allows e.g. running on GPUs.</span> </td>
class="cmr-12">details.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-12-13-"><td style="white-space:normal; text-align:left;" id="TBL-12-13-1"
style="vertical-align:baseline;" id="TBL-15-3-"><td style="white-space:normal; text-align:left;" id="TBL-15-3-1"
class="td11"> </td> </tr></table></div>
@ -198,7 +76,7 @@ class="td11"> </td> </tr></table></div>
<!--l. 645--><div class="crosslinks"><p class="noindent"><span
<!--l. 758--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu14.html" ><span
class="cmr-12">next</span></a><span
@ -212,9 +90,9 @@ class="cmr-12">] [</span><a
href="userhtmlsu13.html" ><span
class="cmr-12">front</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse6.html#userhtmlsu13.html" ><span
href="userhtmlse5.html#userhtmlsu13.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<!--l. 645--><p class="indent" > <a
<!--l. 758--><p class="indent" > <a
id="tailuserhtmlsu13.html"></a>
</body></html>

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>Method build</title>
<head><title>Method descr</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
@ -10,7 +10,7 @@
<link rel="stylesheet" type="text/css" href="userhtml.css">
</head><body
>
<!--l. 645--><div class="crosslinks"><p class="noindent"><span
<!--l. 758--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu15.html" ><span
class="cmr-12">next</span></a><span
@ -24,193 +24,81 @@ class="cmr-12">] [</span><a
href="#tailuserhtmlsu14.html"><span
class="cmr-12">tail</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse6.html#userhtmlsu14.html" ><span
href="userhtmlse5.html#userhtmlsu14.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<h4 class="subsectionHead"><span class="titlemark"><span
class="cmr-12">6.5 </span></span> <a
id="x24-230006.5"></a><span
class="cmr-12">Method build</span></h4>
class="cmr-12">5.8 </span></span> <a
id="x23-220005.8"></a><span
class="cmr-12">Method descr</span></h4>
<div class="center"
>
<!--l. 647--><p class="noindent" >
<!--l. 648--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
<!--l. 760--><p class="noindent" >
<!--l. 761--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">call</span><span
class="cmtt-12">&#x00A0;p%build(a,desc_a,info[,amold,vmold,imold])</span></span></span><br />
class="cmtt-12">&#x00A0;p%descr(info,</span><span
class="cmtt-12">&#x00A0;[iout])</span></span></span><br />
</div>
<!--l. 651--><p class="noindent" ><span
class="cmr-12">This method builds the preconditioner </span><span class="obeylines-h"><span class="verb"><span
<!--l. 764--><p class="noindent" ><span
class="cmr-12">This method prints a description of the preconditioner </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">p</span></span></span> <span
class="cmr-12">according to the requirements made by the</span>
class="cmr-12">to the standard output or to a</span>
<span
class="cmr-12">user through the methods </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">init</span></span></span> <span
class="cmr-12">file. It must be called after </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">hierachy_build</span></span></span> <span
class="cmr-12">and </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">set</span></span></span> <span
class="cmr-12">(see Sections</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu12.html#x22-210006.3"><span
class="cmr-12">6.3</span><!--tex4ht:ref: sec:hier_bld --></a> <span
class="cmr-12">and</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu13.html#x23-220006.4"><span
class="cmr-12">6.4</span><!--tex4ht:ref: sec:smooth_bld --></a> <span
class="cmr-12">for multilevel</span>
<span
class="cmr-12">preconditioners). It is mostly provided for backward compatibility; indeed, it is</span>
<span
class="cmr-12">internally implemented by invoking the two previous methods </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">hierarchy_build</span></span></span> <span
class="cmr-12">and</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">smoothers_build</span></span></span><span
class="cmr-12">, whose nomenclature would however be somewhat unnatural when</span>
class="cmr-12">, or </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">build</span></span></span><span
class="cmr-12">, have</span>
<span
class="cmr-12">dealing with simple one-level preconditioners.</span>
<!--l. 661--><p class="noindent" ><span
class="cmr-12">been called.</span>
<!--l. 769--><p class="noindent" ><span
class="cmbx-12">Arguments</span>
<div class="tabular"> <table id="TBL-13" class="tabular"
<div class="tabular"> <table id="TBL-16" class="tabular"
cellspacing="0" cellpadding="0"
><colgroup id="TBL-13-1g"><col
id="TBL-13-1"><col
id="TBL-13-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-13-1-"><td style="white-space:normal; text-align:left;" id="TBL-13-1-1"
class="td11"><!--l. 664--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">a</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-13-1-2"
class="td11"><!--l. 664--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">type(psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">spmat_type),</span><span
class="cmtt-12">&#x00A0;intent(in)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-13-2-"><td style="white-space:normal; text-align:left;" id="TBL-13-2-1"
class="td11"><!--l. 665--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-13-2-2"
class="td11"><!--l. 665--><p class="noindent" ><span
class="cmr-12">The sparse matrix structure containing the local part of the matrix</span>
<span
class="cmr-12">to be preconditioned. Note that </span><span
class="cmti-12">x </span><span
class="cmr-12">must be chosen according to the</span>
<span
class="cmr-12">real/complex, single/double precision version of AMG4PSBLAS</span>
<span
class="cmr-12">under use. See the PSBLAS User&#8217;s Guide for details </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-13-3-"><td style="white-space:normal; text-align:left;" id="TBL-13-3-1"
class="td11"><!--l. 669--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">desc_a</span></span></span></td><td style="white-space:normal; text-align:left;" id="TBL-13-3-2"
class="td11"><!--l. 669--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">type(psb_desc_type),</span><span
class="cmtt-12">&#x00A0;intent(in)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-13-4-"><td style="white-space:normal; text-align:left;" id="TBL-13-4-1"
class="td11"><!--l. 670--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-13-4-2"
class="td11"><!--l. 670--><p class="noindent" ><span
class="cmr-12">The communication descriptor of </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">a</span></span></span><span
class="cmr-12">. See the PSBLAS User&#8217;s Guide</span>
<span
class="cmr-12">for details </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-13-5-"><td style="white-space:normal; text-align:left;" id="TBL-13-5-1"
class="td11"><!--l. 672--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-13-5-2"
class="td11"><!--l. 672--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
><colgroup id="TBL-16-1g"><col
id="TBL-16-1"><col
id="TBL-16-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-16-1-"><td style="white-space:normal; text-align:left;" id="TBL-16-1-1"
class="td11"><!--l. 772--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-16-1-2"
class="td11"><!--l. 772--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">integer,</span><span
class="cmtt-12">&#x00A0;intent(out)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-13-6-"><td style="white-space:normal; text-align:left;" id="TBL-13-6-1"
class="td11"><!--l. 673--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-13-6-2"
class="td11"><!--l. 673--><p class="noindent" ><span
style="vertical-align:baseline;" id="TBL-16-2-"><td style="white-space:normal; text-align:left;" id="TBL-16-2-1"
class="td11"><!--l. 773--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-16-2-2"
class="td11"><!--l. 773--><p class="noindent" ><span
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse8.html#x30-340008"><span
class="cmr-12">8</span><!--tex4ht:ref: sec:errors --></a> <span
href="userhtmlse7.html#x26-300007"><span
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
class="cmr-12">for details.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-13-7-"><td style="white-space:normal; text-align:left;" id="TBL-13-7-1"
class="td11"><!--l. 674--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amold</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-13-7-2"
class="td11"><!--l. 674--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">class(psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">_base_sparse_mat),</span><span
class="cmtt-12">&#x00A0;intent(in),</span><span
class="cmtt-12">&#x00A0;optional</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-13-8-"><td style="white-space:normal; text-align:left;" id="TBL-13-8-1"
class="td11"><!--l. 675--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-13-8-2"
class="td11"><!--l. 675--><p class="noindent" ><span
class="cmr-12">The desired dynamic type for internal matrix components; this</span>
<span
class="cmr-12">allows e.g. running on GPUs; it needs not be the same on all</span>
<span
class="cmr-12">processes. See the PSBLAS User&#8217;s Guide for details </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-13-9-"><td style="white-space:normal; text-align:left;" id="TBL-13-9-1"
class="td11"><!--l. 679--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">vmold</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-13-9-2"
class="td11"><!--l. 679--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">class(psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">_base_vect_type),</span><span
class="cmtt-12">&#x00A0;intent(in),</span><span
class="cmtt-12">&#x00A0;optional</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-13-10-"><td style="white-space:normal; text-align:left;" id="TBL-13-10-1"
class="td11"><!--l. 680--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-13-10-2"
class="td11"><!--l. 680--><p class="noindent" ><span
class="cmr-12">The desired dynamic type for internal vector components; this</span>
<span
class="cmr-12">allows e.g. running on GPUs.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-13-11-"><td style="white-space:normal; text-align:left;" id="TBL-13-11-1"
class="td11"><!--l. 682--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">imold</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-13-11-2"
class="td11"><!--l. 682--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">class(psb_i_base_vect_type),</span><span
style="vertical-align:baseline;" id="TBL-16-3-"><td style="white-space:normal; text-align:left;" id="TBL-16-3-1"
class="td11"><!--l. 774--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">iout</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-16-3-2"
class="td11"><!--l. 774--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">integer,</span><span
class="cmtt-12">&#x00A0;intent(in),</span><span
class="cmtt-12">&#x00A0;optional</span></span></span><span
class="cmr-12">.</span> </td>
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-13-12-"><td style="white-space:normal; text-align:left;" id="TBL-13-12-1"
class="td11"><!--l. 683--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-13-12-2"
class="td11"><!--l. 683--><p class="noindent" ><span
class="cmr-12">The desired dynamic type for internal integer vector components;</span>
style="vertical-align:baseline;" id="TBL-16-4-"><td style="white-space:normal; text-align:left;" id="TBL-16-4-1"
class="td11"><!--l. 775--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-16-4-2"
class="td11"><!--l. 775--><p class="noindent" ><span
class="cmr-12">The id of the file where the preconditioner description will be</span>
<span
class="cmr-12">this allows e.g. running on GPUs.</span> </td>
class="cmr-12">printed; the default is the standard output.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-13-13-"><td style="white-space:normal; text-align:left;" id="TBL-13-13-1"
style="vertical-align:baseline;" id="TBL-16-5-"><td style="white-space:normal; text-align:left;" id="TBL-16-5-1"
class="td11"> </td> </tr></table></div>
<!--l. 688--><p class="noindent" ><span
class="cmr-12">The method can be used to build multilevel preconditioners too.</span>
<!--l. 693--><div class="crosslinks"><p class="noindent"><span
<!--l. 780--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu15.html" ><span
class="cmr-12">next</span></a><span
@ -224,9 +112,9 @@ class="cmr-12">] [</span><a
href="userhtmlsu14.html" ><span
class="cmr-12">front</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse6.html#userhtmlsu14.html" ><span
href="userhtmlse5.html#userhtmlsu14.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<!--l. 693--><p class="indent" > <a
<!--l. 780--><p class="indent" > <a
id="tailuserhtmlsu14.html"></a>
</body></html>

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>Method apply</title>
<head><title>Auxiliary Methods</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
@ -10,11 +10,8 @@
<link rel="stylesheet" type="text/css" href="userhtml.css">
</head><body
>
<!--l. 693--><div class="crosslinks"><p class="noindent"><span
<!--l. 780--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu16.html" ><span
class="cmr-12">next</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu14.html" ><span
class="cmr-12">prev</span></a><span
class="cmr-12">] [</span><a
@ -24,247 +21,292 @@ class="cmr-12">] [</span><a
href="#tailuserhtmlsu15.html"><span
class="cmr-12">tail</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse6.html#userhtmlsu15.html" ><span
href="userhtmlse5.html#userhtmlsu15.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<h4 class="subsectionHead"><span class="titlemark"><span
class="cmr-12">6.6 </span></span> <a
id="x25-240006.6"></a><span
class="cmr-12">Method apply</span></h4>
class="cmr-12">5.9 </span></span> <a
id="x24-230005.9"></a><span
class="cmr-12">Auxiliary Methods</span></h4>
<!--l. 781--><p class="noindent" ><span
class="cmr-12">Various functionalities are implemented as additional methods of the preconditioner</span>
<span
class="cmr-12">object.</span>
<!--l. 784--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark"><span
class="cmr-12">5.9.1 </span></span> <a
id="x24-240005.9.1"></a><span
class="cmr-12">Method: dump</span></h5>
<div class="center"
>
<!--l. 695--><p class="noindent" >
<!--l. 696--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
<!--l. 786--><p class="noindent" >
<!--l. 787--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">call</span><span
class="cmtt-12">&#x00A0;p%apply(x,y,desc_a,info</span><span
class="cmtt-12">&#x00A0;[,trans,work])</span></span></span><br />
class="cmtt-12">&#x00A0;p%dump(info[,istart,iend,prefix,head,ac,rp,smoother,solver,global_num])</span></span></span><br />
</div>
<!--l. 699--><p class="noindent" ><span
class="cmr-12">This method computes </span><span
class="cmmi-12">y </span><span
class="cmr-12">= </span><span
class="cmmi-12">op</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="cmr-12">) </span><span
class="cmmi-12">x</span><span
class="cmr-12">, where </span><span
class="cmmi-12">B </span><span
class="cmr-12">is a previously built preconditioner,</span>
<span
class="cmr-12">stored into </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">p</span></span></span><span
class="cmr-12">, and </span><span
class="cmmi-12">op </span><span
class="cmr-12">denotes the preconditioner itself or its transpose, according to the</span>
<span
class="cmr-12">value of </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">trans</span></span></span><span
class="cmr-12">. Note that, when AMG4PSBLAS is used with a Krylov solver from</span>
<span
class="cmr-12">PSBLAS, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">p%apply</span></span></span> <span
class="cmr-12">is called within the PSBLAS method </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">psb_krylov</span></span></span> <span
class="cmr-12">and hence it is</span>
<span
class="cmr-12">completely transparent to the user.</span>
<!--l. 708--><p class="noindent" ><span
<!--l. 790--><p class="noindent" ><span
class="cmr-12">Dump on file.</span>
<!--l. 793--><p class="noindent" ><span
class="cmbx-12">Arguments</span>
<div class="tabular"> <table id="TBL-14" class="tabular"
<div class="tabular"> <table id="TBL-17" class="tabular"
cellspacing="0" cellpadding="0"
><colgroup id="TBL-14-1g"><col
id="TBL-14-1"><col
id="TBL-14-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-14-1-"><td style="white-space:normal; text-align:left;" id="TBL-14-1-1"
class="td11"><!--l. 711--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">x</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-14-1-2"
class="td11"><!--l. 711--><p class="noindent" ><span
class="cmti-12">type</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">(</span></span></span><span
class="cmti-12">kind</span><span
class="cmti-12">_parameter</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">),</span><span
class="cmtt-12">&#x00A0;dimension(:),</span><span
class="cmtt-12">&#x00A0;intent(in)</span></span></span><span
class="cmr-12">.</span> </td>
><colgroup id="TBL-17-1g"><col
id="TBL-17-1"><col
id="TBL-17-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-17-1-"><td style="white-space:normal; text-align:left;" id="TBL-17-1-1"
class="td11"><!--l. 796--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-17-1-2"
class="td11"><!--l. 796--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">integer,</span><span
class="cmtt-12">&#x00A0;intent(out)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-17-2-"><td style="white-space:normal; text-align:left;" id="TBL-17-2-1"
class="td11"><!--l. 797--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-17-2-2"
class="td11"><!--l. 797--><p class="noindent" ><span
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse7.html#x26-300007"><span
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
class="cmr-12">for details.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-17-3-"><td style="white-space:normal; text-align:left;" id="TBL-17-3-1"
class="td11"><!--l. 798--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amold</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-17-3-2"
class="td11"><!--l. 798--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">class(psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">_base_sparse_mat),</span><span
class="cmtt-12">&#x00A0;intent(in),</span><span
class="cmtt-12">&#x00A0;optional</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-2-"><td style="white-space:normal; text-align:left;" id="TBL-14-2-1"
class="td11"><!--l. 712--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-2-2"
class="td11"><!--l. 712--><p class="noindent" ><span
class="cmr-12">The local part of the vector </span><span
class="cmmi-12">x</span><span
class="cmr-12">. Note that </span><span
class="cmti-12">type </span><span
class="cmr-12">and </span><span
class="cmti-12">kind</span><span
class="cmti-12">_parameter</span>
style="vertical-align:baseline;" id="TBL-17-4-"><td style="white-space:normal; text-align:left;" id="TBL-17-4-1"
class="td11"><!--l. 799--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-17-4-2"
class="td11"><!--l. 799--><p class="noindent" ><span
class="cmr-12">The desired dynamic type for internal matrix components; this</span>
<span
class="cmr-12">must be chosen according to the real/complex, single/double</span>
class="cmr-12">allows e.g. running on GPUs; it needs not be the same on all</span>
<span
class="cmr-12">precision version of AMG4PSBLAS under use.</span> </td>
class="cmr-12">processes. See the PSBLAS User&#8217;s Guide for details </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-3-"><td style="white-space:normal; text-align:left;" id="TBL-14-3-1"
class="td11"><!--l. 715--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">y</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-14-3-2"
class="td11"><!--l. 715--><p class="noindent" ><span
class="cmti-12">type</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">(</span></span></span><span
class="cmti-12">kind</span><span
class="cmti-12">_parameter</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">),</span><span
class="cmtt-12">&#x00A0;dimension(:),</span><span
style="vertical-align:baseline;" id="TBL-17-5-"><td style="white-space:normal; text-align:left;" id="TBL-17-5-1"
class="td11"> </td> </tr></table></div>
<!--l. 806--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark"><span
class="cmr-12">5.9.2 </span></span> <a
id="x24-250005.9.2"></a><span
class="cmr-12">Method: clone</span></h5>
<div class="center"
>
<!--l. 808--><p class="noindent" >
<!--l. 809--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">call</span><span
class="cmtt-12">&#x00A0;p%clone(pout,info)</span></span></span><br />
</div>
<!--l. 812--><p class="noindent" ><span
class="cmr-12">Create a (deep) copy of the preconditioner object.</span>
<!--l. 815--><p class="noindent" ><span
class="cmbx-12">Arguments</span>
<div class="tabular"> <table id="TBL-18" class="tabular"
cellspacing="0" cellpadding="0"
><colgroup id="TBL-18-1g"><col
id="TBL-18-1"><col
id="TBL-18-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-18-1-"><td style="white-space:normal; text-align:left;" id="TBL-18-1-1"
class="td11"><!--l. 818--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">pout</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-18-1-2"
class="td11"><!--l. 818--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">type(amg_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">prec_type),</span><span
class="cmtt-12">&#x00A0;intent(out)</span></span></span><span
class="cmr-12">.</span> </td>
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-4-"><td style="white-space:normal; text-align:left;" id="TBL-14-4-1"
class="td11"><!--l. 716--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-4-2"
class="td11"><!--l. 716--><p class="noindent" ><span
class="cmr-12">The local part of the vector </span><span
class="cmmi-12">y</span><span
class="cmr-12">. Note that </span><span
class="cmti-12">type </span><span
class="cmr-12">and </span><span
class="cmti-12">kind</span><span
class="cmti-12">_parameter</span>
style="vertical-align:baseline;" id="TBL-18-2-"><td style="white-space:normal; text-align:left;" id="TBL-18-2-1"
class="td11"><!--l. 819--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-18-2-2"
class="td11"><!--l. 819--><p class="noindent" ><span
class="cmr-12">The copy of the preconditioner data structure. Note that </span><span
class="cmti-12">x </span><span
class="cmr-12">must</span>
<span
class="cmr-12">must be chosen according to the real/complex, single/double</span>
class="cmr-12">be chosen according to the real/complex, single/double precision</span>
<span
class="cmr-12">precision version of AMG4PSBLAS under use.</span> </td>
class="cmr-12">version of AMG4PSBLAS under use.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-5-"><td style="white-space:normal; text-align:left;" id="TBL-14-5-1"
class="td11"><!--l. 719--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">desc_a</span></span></span></td><td style="white-space:normal; text-align:left;" id="TBL-14-5-2"
class="td11"><!--l. 719--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">type(psb_desc_type),</span><span
class="cmtt-12">&#x00A0;intent(in)</span></span></span><span
class="cmr-12">.</span> </td>
style="vertical-align:baseline;" id="TBL-18-3-"><td style="white-space:normal; text-align:left;" id="TBL-18-3-1"
class="td11"><!--l. 822--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-18-3-2"
class="td11"><!--l. 822--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">integer,</span><span
class="cmtt-12">&#x00A0;intent(out)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-6-"><td style="white-space:normal; text-align:left;" id="TBL-14-6-1"
class="td11"><!--l. 720--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-6-2"
class="td11"><!--l. 720--><p class="noindent" ><span
class="cmr-12">The communication descriptor associated to the matrix to be</span>
<span
class="cmr-12">preconditioned.</span> </td>
style="vertical-align:baseline;" id="TBL-18-4-"><td style="white-space:normal; text-align:left;" id="TBL-18-4-1"
class="td11"><!--l. 823--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-18-4-2"
class="td11"><!--l. 823--><p class="noindent" ><span
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse7.html#x26-300007"><span
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
class="cmr-12">for details.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-7-"><td style="white-space:normal; text-align:left;" id="TBL-14-7-1"
class="td11"><!--l. 722--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-14-7-2"
class="td11"><!--l. 722--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
style="vertical-align:baseline;" id="TBL-18-5-"><td style="white-space:normal; text-align:left;" id="TBL-18-5-1"
class="td11"> </td> </tr></table></div>
<!--l. 828--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark"><span
class="cmr-12">5.9.3 </span></span> <a
id="x24-260005.9.3"></a><span
class="cmr-12">Method: sizeof</span></h5>
<div class="center"
>
<!--l. 830--><p class="noindent" >
<!--l. 831--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">sz</span><span
class="cmtt-12">&#x00A0;=</span><span
class="cmtt-12">&#x00A0;</span><span
class="cmtt-12">&#x00A0;p%sizeof()</span></span></span><br />
</div>
<!--l. 834--><p class="noindent" ><span
class="cmr-12">Return memory footprint in bytes.</span>
<!--l. 837--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark"><span
class="cmr-12">5.9.4 </span></span> <a
id="x24-270005.9.4"></a><span
class="cmr-12">Method: allocate</span><span
class="cmr-12">_wrk</span></h5>
<div class="center"
>
<!--l. 839--><p class="noindent" >
<!--l. 840--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">call</span><span
class="cmtt-12">&#x00A0;p%allocate_wrk(info[,</span><span
class="cmtt-12">&#x00A0;vmold])</span></span></span><br />
</div>
<!--l. 843--><p class="noindent" ><span
class="cmr-12">Allocate internal work vectors. Each application of the preconditioner uses a number of</span>
<span
class="cmr-12">work vectors which are allocated internally as necessary; therefore allocation and</span>
<span
class="cmr-12">deallocation of memory occurs multiple times during the execution of a Krylov method.</span>
<span
class="cmr-12">In most cases this strategy is perfectly acceptable, but on some platforms, most</span>
<span
class="cmr-12">notably GPUs, memory allocation is a slow operation, and the default behaviour would</span>
<span
class="cmr-12">lead to a slowdown. This method allows to trade space for time by preallocating</span>
<span
class="cmr-12">the internal workspace outside of the invocation of a Krylov method. When</span>
<span
class="cmr-12">using GPUs or other specialized devices, the </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">vmold</span></span></span> <span
class="cmr-12">argument is also necessary</span>
<span
class="cmr-12">to ensure the internal work vectors are of the appropriate dynamic type to</span>
<span
class="cmr-12">exploit the accelerator hardware; when allocation occurs internally this is</span>
<span
class="cmr-12">taken care of based on the dynamic type of the </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">x</span></span></span> <span
class="cmr-12">argument to the </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">apply</span></span></span>
<span
class="cmr-12">method.</span>
<!--l. 859--><p class="noindent" ><span
class="cmbx-12">Arguments</span>
<div class="tabular"> <table id="TBL-19" class="tabular"
cellspacing="0" cellpadding="0"
><colgroup id="TBL-19-1g"><col
id="TBL-19-1"><col
id="TBL-19-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-19-1-"><td style="white-space:normal; text-align:left;" id="TBL-19-1-1"
class="td11"><!--l. 862--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-19-1-2"
class="td11"><!--l. 862--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">integer,</span><span
class="cmtt-12">&#x00A0;intent(out)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-8-"><td style="white-space:normal; text-align:left;" id="TBL-14-8-1"
class="td11"><!--l. 723--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-8-2"
class="td11"><!--l. 723--><p class="noindent" ><span
style="vertical-align:baseline;" id="TBL-19-2-"><td style="white-space:normal; text-align:left;" id="TBL-19-2-1"
class="td11"><!--l. 863--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-19-2-2"
class="td11"><!--l. 863--><p class="noindent" ><span
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse8.html#x30-340008"><span
class="cmr-12">8</span><!--tex4ht:ref: sec:errors --></a> <span
href="userhtmlse7.html#x26-300007"><span
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
class="cmr-12">for details.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-9-"><td style="white-space:normal; text-align:left;" id="TBL-14-9-1"
class="td11"><!--l. 724--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">trans</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-14-9-2"
class="td11"><!--l. 724--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">character(len=1),</span><span
class="cmtt-12">&#x00A0;optional,</span><span
class="cmtt-12">&#x00A0;intent(in).</span></span></span> </td>
style="vertical-align:baseline;" id="TBL-19-3-"><td style="white-space:normal; text-align:left;" id="TBL-19-3-1"
class="td11"><!--l. 864--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">vmold</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-19-3-2"
class="td11"><!--l. 864--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">class(psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">_base_vect_type),</span><span
class="cmtt-12">&#x00A0;intent(in),</span><span
class="cmtt-12">&#x00A0;optional</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-10-"><td style="white-space:normal; text-align:left;" id="TBL-14-10-1"
class="td11"><!--l. 725--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-10-2"
class="td11"><!--l. 725--><p class="noindent" ><span
class="cmr-12">If </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">trans</span></span></span> <span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">&#8217;N&#8217;,&#8217;n&#8217;</span></span></span> <span
class="cmr-12">then </span><span
class="cmmi-12">op</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="cmr-12">) = </span><span
class="cmmi-12">B</span><sup><span
class="cmsy-8">-</span><span
class="cmr-8">1</span></sup><span
class="cmr-12">; if </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">trans</span></span></span> <span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">&#8217;T&#8217;,&#8217;t&#8217;</span></span></span>
style="vertical-align:baseline;" id="TBL-19-4-"><td style="white-space:normal; text-align:left;" id="TBL-19-4-1"
class="td11"><!--l. 865--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-19-4-2"
class="td11"><!--l. 865--><p class="noindent" ><span
class="cmr-12">The desired dynamic type for internal vector components; this</span>
<span
class="cmr-12">then </span><span
class="cmmi-12">op</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="cmr-12">) = </span><span
class="cmmi-12">B</span><sup><span
class="cmsy-8">-</span><span
class="cmmi-8">T</span> </sup> <span
class="cmr-12">(transpose of </span><span
class="cmmi-12">B</span><sup><span
class="cmsy-8">-</span><span
class="cmr-8">1</span></sup><span
class="cmr-12">); if </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">trans</span></span></span> <span
class="cmr-12">= </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">&#8217;C&#8217;,&#8217;c&#8217;</span></span></span> <span
class="cmr-12">then</span>
<span
class="cmmi-12">op</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="cmr-12">) = </span><span
class="cmmi-12">B</span><sup><span
class="cmsy-8">-</span><span
class="cmmi-8">C</span></sup> <span
class="cmr-12">(conjugate transpose of </span><span
class="cmmi-12">B</span><sup><span
class="cmsy-8">-</span><span
class="cmr-8">1</span></sup><span
class="cmr-12">).</span> </td>
class="cmr-12">allows e.g. running on GPUs.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-11-"><td style="white-space:normal; text-align:left;" id="TBL-14-11-1"
class="td11"><!--l. 729--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">work</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-14-11-2"
class="td11"><!--l. 729--><p class="noindent" ><span
class="cmti-12">type</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">(</span></span></span><span
class="cmti-12">kind</span><span
class="cmti-12">_parameter</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">),</span><span
class="cmtt-12">&#x00A0;dimension(:),</span><span
class="cmtt-12">&#x00A0;optional,</span><span
class="cmtt-12">&#x00A0;target</span></span></span><span
class="cmr-12">.</span> </td>
style="vertical-align:baseline;" id="TBL-19-5-"><td style="white-space:normal; text-align:left;" id="TBL-19-5-1"
class="td11"> </td> </tr></table></div>
<!--l. 871--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark"><span
class="cmr-12">5.9.5 </span></span> <a
id="x24-280005.9.5"></a><span
class="cmr-12">Method: free</span><span
class="cmr-12">_wrk</span></h5>
<div class="center"
>
<!--l. 873--><p class="noindent" >
<!--l. 874--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">call</span><span
class="cmtt-12">&#x00A0;p%free_wrk(info)</span></span></span><br />
</div>
<!--l. 877--><p class="noindent" ><span
class="cmr-12">Deallocate internal work vectors.</span>
<!--l. 880--><p class="noindent" ><span
class="cmbx-12">Arguments</span>
<div class="tabular"> <table id="TBL-20" class="tabular"
cellspacing="0" cellpadding="0"
><colgroup id="TBL-20-1g"><col
id="TBL-20-1"><col
id="TBL-20-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-20-1-"><td style="white-space:normal; text-align:left;" id="TBL-20-1-1"
class="td11"><!--l. 883--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-20-1-2"
class="td11"><!--l. 883--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">integer,</span><span
class="cmtt-12">&#x00A0;intent(out)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-12-"><td style="white-space:normal; text-align:left;" id="TBL-14-12-1"
class="td11"><!--l. 730--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-14-12-2"
class="td11"><!--l. 730--><p class="noindent" ><span
class="cmr-12">Workspace. Its size should be at least </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">4</span><span
class="cmtt-12">&#x00A0;*</span><span
class="cmtt-12">&#x00A0;psb_cd_get_local_</span></span></span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">cols(desc_a)</span></span></span> <span
class="cmr-12">(see the PSBLAS User&#8217;s Guide). Note that </span><span
class="cmti-12">type</span>
<span
class="cmr-12">and </span><span
class="cmti-12">kind</span><span
class="cmti-12">_parameter </span><span
class="cmr-12">must be chosen according to the real/complex,</span>
<span
class="cmr-12">single/double precision version of AMG4PSBLAS under use.</span> </td>
style="vertical-align:baseline;" id="TBL-20-2-"><td style="white-space:normal; text-align:left;" id="TBL-20-2-1"
class="td11"><!--l. 884--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-20-2-2"
class="td11"><!--l. 884--><p class="noindent" ><span
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse7.html#x26-300007"><span
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
class="cmr-12">for details.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-14-13-"><td style="white-space:normal; text-align:left;" id="TBL-14-13-1"
style="vertical-align:baseline;" id="TBL-20-3-"><td style="white-space:normal; text-align:left;" id="TBL-20-3-1"
class="td11"> </td> </tr></table></div>
@ -272,11 +314,11 @@ class="td11"> </td> </tr></table></div>
<!--l. 739--><div class="crosslinks"><p class="noindent"><span
<!--l. 4--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu16.html" ><span
class="cmr-12">next</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu14.html" ><span
class="cmr-12">prev</span></a><span
class="cmr-12">] [</span><a
@ -286,9 +328,9 @@ class="cmr-12">] [</span><a
href="userhtmlsu15.html" ><span
class="cmr-12">front</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse6.html#userhtmlsu15.html" ><span
href="userhtmlse5.html#userhtmlsu15.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<!--l. 739--><p class="indent" > <a
id="tailuserhtmlsu15.html"></a>
<!--l. 4--><p class="indent" > <a
id="tailuserhtmlsu15.html"></a>
</body></html>

@ -81,6 +81,12 @@ class="cmr-12">partial differential equation.</span>
<!--l. 1--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu4.html" ><span

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>AMG preconditioners</title>
<head><title>Examples</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
@ -10,11 +10,8 @@
<link rel="stylesheet" type="text/css" href="userhtml.css">
</head><body
>
<!--l. 56--><div class="crosslinks"><p class="noindent"><span
<!--l. 107--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu7.html" ><span
class="cmr-12">next</span></a><span
class="cmr-12">] [</span><a
href="#tailuserhtmlsu6.html"><span
class="cmr-12">tail</span></a><span
class="cmr-12">] [</span><a
@ -24,376 +21,370 @@ class="cmr-12">] </span></p></div>
<h4 class="subsectionHead"><span class="titlemark"><span
class="cmr-12">4.1 </span></span> <a
id="x14-130004.1"></a><span
class="cmr-12">AMG preconditioners</span></h4>
<!--l. 58--><p class="noindent" ><span
class="cmr-12">In order to describe the AMG preconditioners available in MLD2P4, we consider a</span>
<span
class="cmr-12">linear system</span>
<table
class="equation"><tr><td>
<center class="math-display" >
<img
src="userhtml2x.png" alt="Ax = b,
" class="math-display" ><a
id="x14-13001r2"></a></center></td><td class="equation-label"><span
class="cmr-12">(2)</span></td></tr></table>
<!--l. 62--><p class="nopar" >
<span
class="cmr-12">where </span><span
class="cmmi-12">A </span><span
class="cmr-12">= (</span><span
class="cmmi-12">a</span><sub><span
class="cmmi-8">ij</span></sub><span
class="cmr-12">) </span><span
class="cmsy-10x-x-120">&#x2208; </span><span
class="msbm-10x-x-120">&#x211D;</span><sup><span
class="cmmi-8">n</span><span
class="cmsy-8">&#x00D7;</span><span
class="cmmi-8">n</span></sup> <span
class="cmr-12">is a nonsingular sparse matrix; for ease of presentation we</span>
<span
class="cmr-12">assume </span><span
class="cmmi-12">A </span><span
class="cmr-12">has a symmetric sparsity pattern.</span>
class="cmr-12">Examples</span></h4>
<!--l. 109--><p class="noindent" ><span
class="cmr-12">The code reported in Figure</span><span
class="cmr-12">&#x00A0;</span><a
href="#x14-130011"><span
class="cmr-12">1</span><!--tex4ht:ref: fig:ex1 --></a> <span
class="cmr-12">shows how to set and apply the default multilevel</span>
<span
class="cmr-12">preconditioner available in the real double precision version of AMG4PSBLAS</span>
<span
class="cmr-12">(see Table</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse4.html#x13-120151"><span
class="cmr-12">1</span><!--tex4ht:ref: tab:precinit --></a><span
class="cmr-12">). This preconditioner is chosen by simply specifying </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">&#8217;ML&#8217;</span></span></span> <span
class="cmr-12">as the</span>
<span
class="cmr-12">second argument of </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">P%init</span></span></span> <span
class="cmr-12">(a call to </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">P%set</span></span></span> <span
class="cmr-12">is not needed) and is applied</span>
<span
class="cmr-12">with the CG solver provided by PSBLAS (the matrix of the system to be</span>
<span
class="cmr-12">solved is assumed to be positive definite). As previously observed, the modules</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">psb_base_mod</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amg_prec_mod</span></span></span> <span
class="cmr-12">and </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">psb_krylov_mod</span></span></span> <span
class="cmr-12">must be used by the example</span>
<span
class="cmr-12">program.</span>
<!--l. 119--><p class="indent" > <span
class="cmr-12">The part of the code concerning the reading and assembling of the sparse matrix</span>
<span
class="cmr-12">and the right-hand side vector, performed through the PSBLAS routines for sparse</span>
<span
class="cmr-12">matrix and vector management, is not reported here for brevity; the statements</span>
<span
class="cmr-12">concerning the deallocation of the PSBLAS data structure are neglected too. The</span>
<span
class="cmr-12">complete code can be found in the example program file </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amg_dexample_ml.f90</span></span></span><span
class="cmr-12">, in the</span>
<span
class="cmr-12">directory </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">examples/fileread</span></span></span> <span
class="cmr-12">of the AMG4PSBLAS implementation (see</span>
<span
class="cmr-12">Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu5.html#x12-110003.5"><span
class="cmr-12">3.5</span><!--tex4ht:ref: sec:ex_and_test --></a><span
class="cmr-12">). A sample test problem along with the relevant input data is available in</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">examples/fileread/runs</span></span></span><span
class="cmr-12">. For details on the use of the PSBLAS routines, see the</span>
<span
class="cmr-12">PSBLAS User&#8217;s Guide</span><span
class="cmr-12">&#x00A0;</span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span>
<!--l. 131--><p class="indent" > <span
class="cmr-12">The setup and application of the default multilevel preconditioner for the real single</span>
<!--l. 67--><p class="indent" > <span
class="cmr-12">Let us consider as finest index space the set of row (column) indices of </span><span
class="cmmi-12">A</span><span
class="cmr-12">,</span>
<span
class="cmr-12">i.e., &#x03A9; = </span><span
class="cmsy-10x-x-120">{</span><span
class="cmr-12">1</span><span
class="cmmi-12">, </span><span
class="cmr-12">2</span><span
class="cmmi-12">,</span><span
class="cmmi-12">&#x2026;</span><span
class="cmmi-12">,n</span><span
class="cmsy-10x-x-120">}</span><span
class="cmr-12">. Any algebraic multilevel preconditioners implemented in</span>
<span
class="cmr-12">MLD2P4 generates a hierarchy of index spaces and a corresponding hierarchy of</span>
<span
class="cmr-12">matrices,</span>
<center class="math-display" >
<img
src="userhtml3x.png" alt=" 1 2 nlev 1 2 nlev
&#x03A9; &#x2261; &#x03A9; &#x2283; &#x03A9; &#x2283; ...&#x2283; &#x03A9; , A &#x2261; A, A ,...,A ,
" class="math-display" ></center>
<!--l. 72--><p class="nopar" > <span
class="cmr-12">by using the information contained in </span><span
class="cmmi-12">A</span><span
class="cmr-12">, without assuming any knowledge of</span>
<span
class="cmr-12">the geometry of the problem from which </span><span
class="cmmi-12">A </span><span
class="cmr-12">originates. A vector space </span><span
class="msbm-10x-x-120">&#x211D;</span><sup><span
class="cmmi-8">n</span><sub><span
class="cmmi-6">k</span></sub></sup> <span
class="cmr-12">is</span>
<span
class="cmr-12">associated with &#x03A9;</span><sup><span
class="cmmi-8">k</span></sup><span
class="cmr-12">, where </span><span
class="cmmi-12">n</span><sub>
<span
class="cmmi-8">k</span></sub> <span
class="cmr-12">is the size of &#x03A9;</span><sup><span
class="cmmi-8">k</span></sup><span
class="cmr-12">. For all </span><span
class="cmmi-12">k &#x003C; nlev</span><span
class="cmr-12">, a restriction</span>
<span
class="cmr-12">operator and a prolongation one are built, which connect two levels </span><span
class="cmmi-12">k </span><span
class="cmr-12">and</span>
<span
class="cmmi-12">k </span><span
class="cmr-12">+ 1:</span>
<center class="math-display" >
<img
src="userhtml4x.png" alt="P k &#x2208; &#x211D;nk&#x00D7;nk+1, Rk &#x2208; &#x211D;nk+1&#x00D7;nk ;
" class="math-display" ></center>
<!--l. 82--><p class="nopar" > <span
class="cmr-12">the matrix </span><span
class="cmmi-12">A</span><sup><span
class="cmmi-8">k</span><span
class="cmr-8">+1</span></sup> <span
class="cmr-12">is computed by using the previous operators according to the</span>
<span
class="cmr-12">Galerkin approach, i.e.,</span>
<center class="math-display" >
<img
src="userhtml5x.png" alt=" k+1 k k k
A = R A P .
" class="math-display" ></center>
<!--l. 87--><p class="nopar" > <span
class="cmr-12">In the current implementation of MLD2P4 we have </span><span
class="cmmi-12">R</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">= (</span><span
class="cmmi-12">P</span><sup><span
class="cmmi-8">k</span></sup><span
class="cmr-12">)</span><sup><span
class="cmmi-8">T</span> </sup> <span
class="cmr-12">A smoother with</span>
<span
class="cmr-12">iteration matrix </span><span
class="cmmi-12">M</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">is set up at each level </span><span
class="cmmi-12">k &#x003C; nlev</span><span
class="cmr-12">, and a solver is set up at the</span>
<span
class="cmr-12">coarsest level, so that they are ready for application (for example, setting up a solver</span>
<span
class="cmr-12">based on the </span><span
class="cmmi-12">LU </span><span
class="cmr-12">factorization means computing and storing the </span><span
class="cmmi-12">L </span><span
class="cmr-12">and </span><span
class="cmmi-12">U </span><span
class="cmr-12">factors). The</span>
<span
class="cmr-12">construction of the hierarchy of AMG components described so far corresponds to the</span>
<span
class="cmr-12">so-called build phase of the preconditioner.</span>
<!--l. 95--><p class="indent" > <hr class="figure"><div class="figure"
<span
class="cmr-12">precision and the complex, single and double precision, versions are obtained</span>
<span
class="cmr-12">with straightforward modifications of the previous example (see Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse5.html#x15-140005"><span
class="cmr-12">5</span><!--tex4ht:ref: sec:userinterface --></a> <span
class="cmr-12">for</span>
<span
class="cmr-12">details). If these versions are installed, the corresponding codes are available in</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">examples/fileread/</span></span></span><span
class="cmr-12">.</span>
<!--l. 137--><p class="indent" > <hr class="figure"><div class="figure"
>
<a
id="x14-130021"></a>
id="x14-130011"></a>
<div class="center"
>
<!--l. 96--><p class="noindent" >
<div class="fbox"> <div class="minipage"><table
cellpadding="0" border="0" cellspacing="0"
class="tabbing"><tr
style="vertical-align:baseline;" class="tabbing"><td style="width:16;"
class="tabbing"> </td><td style="width:16;"
class="tabbing"> </td><td style="width:16;"
class="tabbing"> </td><td
class="tabbing"></td></tr></table>
<!--l. 115--><p class="noindent" ><table
cellpadding="0" border="0" cellspacing="0"
class="tabbing"><tr
style="vertical-align:baseline;" class="tabbing"><td
class="tabbing">procedure V-cycle<img
src="userhtml6x.png" alt="( k k k)
k,A ,b ,u" class="left" align="middle">
</td></tr></table>
<!--l. 115--><p class="noindent" >
<table
cellpadding="0" border="0" cellspacing="0"
class="tabbing"><tr
style="vertical-align:baseline;" class="tabbing"><td style="width:16;"
class="tabbing"> </td><td
class="tabbing">if <img
src="userhtml7x.png" alt="(k &#x2044;= nlev)" class="left" align="middle"> then</td></tr></table>
<!--l. 115--><p class="noindent" >
<table
cellpadding="0" border="0" cellspacing="0"
class="tabbing"><tr
style="vertical-align:baseline;" class="tabbing"><td style="width:16;"
class="tabbing"> </td><td style="width:16;"
class="tabbing"> </td><td
class="tabbing"><span
class="cmmi-10x-x-109">u</span><sup><span
class="cmmi-8">k</span></sup> = <span
class="cmmi-10x-x-109">u</span><sup><span
class="cmmi-8">k</span></sup> + <span
class="cmmi-10x-x-109">M</span><sup><span
class="cmmi-8">k</span></sup><img
src="userhtml8x.png" alt="( )
bk - Akuk" class="left" align="middle"></td></tr></table>
<!--l. 115--><p class="noindent" >
<table
cellpadding="0" border="0" cellspacing="0"
class="tabbing"><tr
style="vertical-align:baseline;" class="tabbing"><td style="width:16;"
class="tabbing"> </td><td style="width:16;"
class="tabbing"> </td><td
class="tabbing"><span
class="cmmi-10x-x-109">b</span><sup><span
class="cmmi-8">k</span><span
class="cmr-8">+1</span></sup> = <span
class="cmmi-10x-x-109">R</span><sup><span
class="cmmi-8">k</span><span
class="cmr-8">+1</span></sup><img
src="userhtml9x.png" alt="(bk - Akuk )" class="left" align="middle"></td></tr></table>
<!--l. 115--><p class="noindent" >
<table
cellpadding="0" border="0" cellspacing="0"
class="tabbing"><tr
style="vertical-align:baseline;" class="tabbing"><td style="width:16;"
class="tabbing"> </td><td style="width:16;"
class="tabbing"> </td><td
class="tabbing"><span
class="cmmi-10x-x-109">u</span><sup><span
class="cmmi-8">k</span><span
class="cmr-8">+1</span></sup> = V-cycle<img
src="userhtml10x.png" alt="( )
k + 1,Ak+1,bk+1,0" class="left" align="middle"></td></tr></table>
<!--l. 115--><p class="noindent" >
<table
cellpadding="0" border="0" cellspacing="0"
class="tabbing"><tr
style="vertical-align:baseline;" class="tabbing"><td style="width:16;"
class="tabbing"> </td><td style="width:16;"
class="tabbing"> </td><td
class="tabbing"><span
class="cmmi-10x-x-109">u</span><sup><span
class="cmmi-8">k</span></sup> = <span
class="cmmi-10x-x-109">u</span><sup><span
class="cmmi-8">k</span></sup> + <span
class="cmmi-10x-x-109">P</span><sup><span
class="cmmi-8">k</span><span
class="cmr-8">+1</span></sup><span
class="cmmi-10x-x-109">u</span><sup><span
class="cmmi-8">k</span><span
class="cmr-8">+1</span></sup></td></tr></table>
<!--l. 115--><p class="noindent" >
<table
cellpadding="0" border="0" cellspacing="0"
class="tabbing"><tr
style="vertical-align:baseline;" class="tabbing"><td style="width:16;"
class="tabbing"> </td><td style="width:16;"
class="tabbing"> </td><td
class="tabbing"><span
class="cmmi-10x-x-109">u</span><sup><span
class="cmmi-8">k</span></sup> = <span
class="cmmi-10x-x-109">u</span><sup><span
class="cmmi-8">k</span></sup> + <span
class="cmmi-10x-x-109">M</span><sup><span
class="cmmi-8">k</span></sup><img
src="userhtml11x.png" alt="( )
bk - Akuk" class="left" align="middle"></td></tr></table>
<!--l. 115--><p class="noindent" >
<table
cellpadding="0" border="0" cellspacing="0"
class="tabbing"><tr
style="vertical-align:baseline;" class="tabbing"><td style="width:16;"
class="tabbing"> </td><td
class="tabbing">else</td></tr></table>
<!--l. 115--><p class="noindent" >
<table
cellpadding="0" border="0" cellspacing="0"
class="tabbing"><tr
style="vertical-align:baseline;" class="tabbing"><td style="width:16;"
class="tabbing"> </td><td style="width:16;"
class="tabbing"> </td><td
class="tabbing"><span
class="cmmi-10x-x-109">u</span><sup><span
class="cmmi-8">k</span></sup> = <img
src="userhtml12x.png" alt="( )
Ak" class="left" align="middle"><sup><span
class="cmsy-8">-</span><span
class="cmr-8">1</span></sup><span
class="cmmi-10x-x-109">b</span><sup><span
class="cmmi-8">k</span></sup></td></tr></table>
<!--l. 115--><p class="noindent" >
<table
cellpadding="0" border="0" cellspacing="0"
class="tabbing"><tr
style="vertical-align:baseline;" class="tabbing"><td style="width:16;"
class="tabbing"> </td><td
class="tabbing">endif</td></tr></table>
<!--l. 115--><p class="noindent" >
<table
cellpadding="0" border="0" cellspacing="0"
class="tabbing"><tr
style="vertical-align:baseline;" class="tabbing"><td style="width:16;"
class="tabbing"> </td><td
class="tabbing">return <span
class="cmmi-10x-x-109">u</span><sup><span
class="cmmi-8">k</span></sup></td></tr></table>
<!--l. 115--><p class="noindent" >
<table
cellpadding="0" border="0" cellspacing="0"
class="tabbing"><tr
style="vertical-align:baseline;" class="tabbing"><td
class="tabbing">end</td></tr></table>
<!--l. 115--><p class="noindent" > </div> </div>
<!--l. 138--><p class="noindent" >
<div class="minipage"><pre class="verbatim" id="verbatim-6">
&#x00A0;&#x00A0;use&#x00A0;psb_base_mod
&#x00A0;&#x00A0;use&#x00A0;amg_prec_mod
&#x00A0;&#x00A0;use&#x00A0;psb_krylov_mod
...&#x00A0;...
!
!&#x00A0;sparse&#x00A0;matrix
&#x00A0;&#x00A0;type(psb_dspmat_type)&#x00A0;::&#x00A0;A
!&#x00A0;sparse&#x00A0;matrix&#x00A0;descriptor
&#x00A0;&#x00A0;type(psb_desc_type)&#x00A0;&#x00A0;&#x00A0;::&#x00A0;desc_A
!&#x00A0;preconditioner
&#x00A0;&#x00A0;type(amg_dprec_type)&#x00A0;&#x00A0;::&#x00A0;P
!&#x00A0;right-hand&#x00A0;side&#x00A0;and&#x00A0;solution&#x00A0;vectors
&#x00A0;&#x00A0;type(psb_d_vect_type)&#x00A0;::&#x00A0;b,&#x00A0;x
...&#x00A0;...
!
!&#x00A0;initialize&#x00A0;the&#x00A0;parallel&#x00A0;environment
&#x00A0;&#x00A0;call&#x00A0;psb_init(ictxt)
&#x00A0;&#x00A0;call&#x00A0;psb_info(ictxt,iam,np)
...&#x00A0;...
!
!&#x00A0;read&#x00A0;and&#x00A0;assemble&#x00A0;the&#x00A0;spd&#x00A0;matrix&#x00A0;A&#x00A0;and&#x00A0;the&#x00A0;right-hand&#x00A0;side&#x00A0;b
!&#x00A0;using&#x00A0;PSBLAS&#x00A0;routines&#x00A0;for&#x00A0;sparse&#x00A0;matrix&#x00A0;/&#x00A0;vector&#x00A0;management
...&#x00A0;...
!
!&#x00A0;initialize&#x00A0;the&#x00A0;default&#x00A0;multilevel&#x00A0;preconditioner,&#x00A0;i.e.&#x00A0;V-cycle
!&#x00A0;with&#x00A0;basic&#x00A0;smoothed&#x00A0;aggregation,&#x00A0;1&#x00A0;hybrid&#x00A0;forward/backward
!&#x00A0;GS&#x00A0;sweep&#x00A0;as&#x00A0;pre/post-smoother&#x00A0;and&#x00A0;UMFPACK&#x00A0;as&#x00A0;coarsest-level
!&#x00A0;solver
&#x00A0;&#x00A0;call&#x00A0;P%init(&#8217;ML&#8217;,info)
!
!&#x00A0;build&#x00A0;the&#x00A0;preconditioner
&#x00A0;&#x00A0;call&#x00A0;P%hierarchy_build(A,desc_A,info)
&#x00A0;&#x00A0;call&#x00A0;P%smoothers_build(A,desc_A,info)
!
!&#x00A0;set&#x00A0;the&#x00A0;solver&#x00A0;parameters&#x00A0;and&#x00A0;the&#x00A0;initial&#x00A0;guess
&#x00A0;&#x00A0;...&#x00A0;...
!
!&#x00A0;solve&#x00A0;Ax=b&#x00A0;with&#x00A0;preconditioned&#x00A0;CG
&#x00A0;&#x00A0;call&#x00A0;psb_krylov(&#8217;CG&#8217;,A,P,b,x,tol,desc_A,info)
&#x00A0;&#x00A0;...&#x00A0;...
!
!&#x00A0;deallocate&#x00A0;the&#x00A0;preconditioner
&#x00A0;&#x00A0;call&#x00A0;P%free(info)
!
!&#x00A0;deallocate&#x00A0;other&#x00A0;data&#x00A0;structures
&#x00A0;&#x00A0;...&#x00A0;...
!
!&#x00A0;exit&#x00A0;the&#x00A0;parallel&#x00A0;environment
&#x00A0;&#x00A0;call&#x00A0;psb_exit(ictxt)
&#x00A0;&#x00A0;stop
</pre>
<!--l. 193--><p class="nopar" >
</div>
<br /> <div class="caption"
><span class="id">Figure&#x00A0;1: </span><span
class="content">Application phase of a V-cycle preconditioner.</span></div><!--tex4ht:label?: x14-130021 -->
class="content">setup and application of the default multilevel preconditioner (example 1). </span></div><!--tex4ht:label?: x14-130011 -->
</div>
<!--l. 118--><p class="indent" > </div><hr class="endfigure">
<!--l. 120--><p class="indent" > <span
class="cmr-12">The components produced in the build phase may be combined in several ways to</span>
<!--l. 199--><p class="indent" > </div><hr class="endfigure">
<!--l. 201--><p class="indent" > <span
class="cmr-12">Different versions of the multilevel preconditioner can be obtained by changing the</span>
<span
class="cmr-12">obtain different multilevel preconditioners; this is done in the application phase, i.e., in</span>
class="cmr-12">default values of the preconditioner parameters. The code reported in Figure</span><span
class="cmr-12">&#x00A0;</span><a
href="#x14-130022"><span
class="cmr-12">2</span><!--tex4ht:ref: fig:ex2 --></a> <span
class="cmr-12">shows</span>
<span
class="cmr-12">the computation of a vector of type </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="cmr-12">, where </span><span
class="cmmi-12">B </span><span
class="cmr-12">denotes the preconditioner,</span>
class="cmr-12">how to set a V-cycle preconditioner which applies 1 block-Jacobi sweep as pre- and</span>
<span
class="cmr-12">usually within an iteration of a Krylov solver </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XSaad_book"><span
class="cmr-12">24</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">. An example of such a combination,</span>
class="cmr-12">post-smoother, and solves the coarsest-level system with 8 block-Jacobi sweeps. Note</span>
<span
class="cmr-12">that the ILU(0) factorization (plus triangular solve) is used as local solver for the</span>
<span
class="cmr-12">block-Jacobi sweeps, since this is the default associated with block-Jacobi</span>
<span
class="cmr-12">and set by</span><span
class="cmr-12">&#x00A0;</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">P%init</span></span></span><span
class="cmr-12">. Furthermore, specifying block-Jacobi as coarsest-level</span>
<span
class="cmr-12">solver implies that the coarsest-level matrix is distributed among the processes.</span>
<span
class="cmr-12">known as V-cycle, is given in Figure</span><span
class="cmr-12">Figure</span><span
class="cmr-12">&#x00A0;</span><a
href="#x14-130021"><span
class="cmr-12">1</span><!--tex4ht:ref: fig:application_alg --></a><span
class="cmr-12">. In this case, a single iteration of the same</span>
href="#x14-130033"><span
class="cmr-12">3</span><!--tex4ht:ref: fig:ex3 --></a> <span
class="cmr-12">shows how to set a W-cycle preconditioner using the Coarsening</span>
<span
class="cmr-12">smoother is used before and after the the recursive call to the V-cycle (i.e., in the</span>
class="cmr-12">based on Compatible Weighted Matching. It applies 2 hybrid Gauss-Seidel</span>
<span
class="cmr-12">pre-smoothing and post-smoothing phases); however, different choices can be</span>
class="cmr-12">sweeps as pre- and post-smoother, and solves the coarsest-level system with the</span>
<span
class="cmr-12">performed. Other cycles can be defined; in MLD2P4, we implemented the</span>
class="cmr-12">multifrontal LU factorization implemented in MUMPS. It is specified that the</span>
<span
class="cmr-12">standard V-cycle and W-cycle</span><span
class="cmr-12">&#x00A0;</span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XBriggs2000"><span
class="cmr-12">3</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">, and a version of the K-cycle described</span>
class="cmr-12">coarsest-level matrix is distributed, since MUMPS can be used on both replicated and</span>
<span
class="cmr-12">in</span><span
class="cmr-12">&#x00A0;</span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XNotay2008"><span
class="cmr-12">23</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">distributed matrices, and by default it is used on replicated ones. The code</span>
<span
class="cmr-12">fragments shown in Figures</span><span
class="cmr-12">&#x00A0;</span><a
href="#x14-130022"><span
class="cmr-12">2</span><!--tex4ht:ref: fig:ex2 --></a> <span
class="cmr-12">and </span><a
href="#x14-130033"><span
class="cmr-12">3</span><!--tex4ht:ref: fig:ex3 --></a> <span
class="cmr-12">are included in the example program file</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amg_dexample_ml.f90</span></span></span> <span
class="cmr-12">too. </span><span
class="cmbx-12">DA CORREGGERE NEL CODICE ESEMPIO</span>
<span
class="cmbx-12">3</span>
<!--l. 225--><p class="indent" > <span
class="cmr-12">Finally, Figure</span><span
class="cmr-12">&#x00A0;</span><a
href="#x14-130044"><span
class="cmr-12">4</span><!--tex4ht:ref: fig:ex4 --></a> <span
class="cmr-12">shows the setup of a one-level additive Schwarz preconditioner,</span>
<span
class="cmr-12">i.e., RAS with overlap 2. Note also that a Krylov method different from CG</span>
<span
class="cmr-12">must be used to solve the preconditioned system, since the preconditione in</span>
<span
class="cmr-12">nonsymmetric. The corresponding example program is available in the file</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amg_dexample_1lev.f90</span></span></span><span
class="cmr-12">.</span>
<!--l. 232--><p class="indent" > <span
class="cmr-12">For all the previous preconditioners, example programs where the sparse matrix and</span>
<span
class="cmr-12">the right-hand side are generated by discretizing a PDE with Dirichlet boundary</span>
<span
class="cmr-12">conditions are also available in the directory </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">examples/pdegen</span></span></span><span
class="cmr-12">.</span>
<!--l. 236--><p class="indent" > <hr class="figure"><div class="figure"
>
<a
id="x14-130022"></a>
<div class="center"
>
<!--l. 237--><p class="noindent" >
<div class="minipage"><pre class="verbatim" id="verbatim-7">
...&#x00A0;...
!&#x00A0;build&#x00A0;a&#x00A0;V-cycle&#x00A0;preconditioner&#x00A0;with&#x00A0;1&#x00A0;block-Jacobi&#x00A0;sweep&#x00A0;(with
!&#x00A0;ILU(0)&#x00A0;on&#x00A0;the&#x00A0;blocks)&#x00A0;as&#x00A0;pre-&#x00A0;and&#x00A0;post-smoother,&#x00A0;and&#x00A0;8&#x00A0;&#x00A0;block-Jacobi
!&#x00A0;sweeps&#x00A0;(with&#x00A0;ILU(0)&#x00A0;on&#x00A0;the&#x00A0;blocks)&#x00A0;as&#x00A0;coarsest-level&#x00A0;solver
&#x00A0;&#x00A0;call&#x00A0;P%init(&#8217;ML&#8217;,info)
&#x00A0;&#x00A0;call_P%set(&#8217;SMOOTHER_TYPE&#8217;,&#8217;BJAC&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;COARSE_SOLVE&#8217;,&#8217;BJAC&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;COARSE_SWEEPS&#8217;,8,info)
&#x00A0;&#x00A0;call&#x00A0;P%hierarchy_build(A,desc_A,info)
&#x00A0;&#x00A0;call&#x00A0;P%smoothers_build(A,desc_A,info)
...&#x00A0;...
</pre>
<!--l. 252--><p class="nopar" ></div>
<br /><div class="caption"
><span class="id">Figure&#x00A0;2: </span><span
class="content">setup of a multilevel preconditioner based on the default decoupled coarsening</span></div><!--tex4ht:label?: x14-130022 -->
</div>
<!--l. 133--><div class="crosslinks"><p class="noindent"><span
<!--l. 258--><p class="indent" > </div><hr class="endfigure">
<!--l. 260--><p class="indent" > <hr class="figure"><div class="figure"
>
<a
id="x14-130033"></a>
<div class="center"
>
<!--l. 261--><p class="noindent" >
<div class="minipage"><pre class="verbatim" id="verbatim-8">
...&#x00A0;...
!&#x00A0;build&#x00A0;a&#x00A0;W-cycle&#x00A0;preconditioner&#x00A0;with&#x00A0;2&#x00A0;hybrid&#x00A0;Gauss-Seidel&#x00A0;sweeps
!&#x00A0;as&#x00A0;pre-&#x00A0;and&#x00A0;post-smoother,&#x00A0;a&#x00A0;distributed&#x00A0;coarsest
!&#x00A0;matrix,&#x00A0;and&#x00A0;MUMPS&#x00A0;as&#x00A0;coarsest-level&#x00A0;solver
&#x00A0;&#x00A0;call&#x00A0;P%init(&#8217;ML&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;PAR_AGGR_ALG&#8217;,&#8217;COUPLED&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;ML_CYCLE&#8217;,&#8217;WCYCLE&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;SMOOTHER_TYPE&#8217;,&#8217;FBGS&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;SMOOTHER_SWEEPS&#8217;,2,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;COARSE_SOLVE&#8217;,&#8217;MUMPS&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;COARSE_MAT&#8217;,&#8217;DIST&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%hierarchy_build(A,desc_A,info)
&#x00A0;&#x00A0;call&#x00A0;P%smoothers_build(A,desc_A,info)
...&#x00A0;...
</pre>
<!--l. 279--><p class="nopar" ></div>
<br /> <div class="caption"
><span class="id">Figure&#x00A0;3: </span><span
class="content">setup of a multilevel preconditioner based on the coupled coarsening based
on weighted matching</span></div><!--tex4ht:label?: x14-130033 -->
</div>
<!--l. 284--><p class="indent" > </div><hr class="endfigure">
<!--l. 286--><p class="indent" > <hr class="figure"><div class="figure"
>
<a
id="x14-130044"></a>
<div class="center"
>
<!--l. 287--><p class="noindent" >
<div class="minipage"><pre class="verbatim" id="verbatim-9">
...&#x00A0;...
!&#x00A0;set&#x00A0;RAS&#x00A0;with&#x00A0;overlap&#x00A0;2&#x00A0;and&#x00A0;ILU(0)&#x00A0;on&#x00A0;the&#x00A0;local&#x00A0;blocks
&#x00A0;&#x00A0;call&#x00A0;P%init(&#8217;AS&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;SUB_OVR&#8217;,2,info)
&#x00A0;&#x00A0;call&#x00A0;P%bld(A,desc_A,info)
...&#x00A0;...
!&#x00A0;solve&#x00A0;Ax=b&#x00A0;with&#x00A0;preconditioned&#x00A0;BiCGSTAB
&#x00A0;&#x00A0;call&#x00A0;psb_krylov(&#8217;BICGSTAB&#8217;,A,P,b,x,tol,desc_A,info)
</pre>
<!--l. 299--><p class="nopar" ></div>
<br /> <div class="caption"
><span class="id">Figure&#x00A0;4: </span><span
class="content">setup of a one-level Schwarz preconditioner.</span></div><!--tex4ht:label?: x14-130044 -->
</div>
<!--l. 304--><p class="indent" > </div><hr class="endfigure">
<!--l. 1--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu7.html" ><span
class="cmr-12">next</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu6.html" ><span
class="cmr-12">front</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse4.html#userhtmlsu6.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<!--l. 133--><p class="indent" > <a
<!--l. 1--><p class="indent" > <a
id="tailuserhtmlsu6.html"></a>
</body></html>

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>Smoothed Aggregation</title>
<head><title>Method init</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
@ -10,386 +10,110 @@
<link rel="stylesheet" type="text/css" href="userhtml.css">
</head><body
>
<!--l. 133--><div class="crosslinks"><p class="noindent"><span
<!--l. 43--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu8.html" ><span
class="cmr-12">next</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu6.html" ><span
class="cmr-12">prev</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu6.html#tailuserhtmlsu6.html" ><span
class="cmr-12">prev-tail</span></a><span
class="cmr-12">] [</span><a
href="#tailuserhtmlsu7.html"><span
class="cmr-12">tail</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse4.html#userhtmlsu7.html" ><span
href="userhtmlse5.html#userhtmlsu7.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<h4 class="subsectionHead"><span class="titlemark"><span
class="cmr-12">4.2 </span></span> <a
id="x15-140004.2"></a><span
class="cmr-12">Smoothed Aggregation</span></h4>
<!--l. 135--><p class="noindent" ><span
class="cmr-12">In order to define the prolongator </span><span
class="cmmi-12">P</span><sup><span
class="cmmi-8">k</span></sup><span
class="cmr-12">, used to compute the coarse-level matrix </span><span
class="cmmi-12">A</span><sup><span
class="cmmi-8">k</span><span
class="cmr-8">+1</span></sup><span
class="cmr-12">,</span>
<span
class="cmr-12">MLD2P4 uses the smoothed aggregation algorithm described in </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XBREZINA_VANEK"><span
class="cmr-12">2</span></a><span
class="cmr-12">,</span><span
class="cmr-12">5.1 </span></span> <a
id="x16-150005.1"></a><span
class="cmr-12">Method init</span></h4>
<div class="center"
>
<!--l. 45--><p class="noindent" >
<!--l. 46--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">call</span><span
class="cmtt-12">&#x00A0;p%init(icontx,ptype,info)</span></span></span></div>
<!--l. 49--><p class="noindent" ><span
class="cmr-12">This method allocates and initializes the preconditioner </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">p</span></span></span><span
class="cmr-12">, according to the</span>
<span
class="cmr-12">preconditioner type chosen by the user.</span>
<!--l. 53--><p class="noindent" ><span
class="cmbx-12">Arguments</span>
<div class="tabular"> <table id="TBL-2" class="tabular"
cellspacing="0" cellpadding="0"
><colgroup id="TBL-2-1g"><col
id="TBL-2-1"><col
id="TBL-2-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-2-1-"><td style="white-space:normal; text-align:left;" id="TBL-2-1-1"
class="td11"><!--l. 57--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">icontxt</span></span></span> </td> <td style="white-space:normal; text-align:left;" id="TBL-2-1-2"
class="td11"><!--l. 57--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">integer,</span><span
class="cmtt-12">&#x00A0;intent(in)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-2-"><td style="white-space:normal; text-align:left;" id="TBL-2-2-1"
class="td11"><!--l. 58--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-2-2-2"
class="td11"><!--l. 58--><p class="noindent" ><span
class="cmr-12">The communication context.</span> </td></tr><tr
style="vertical-align:baseline;" id="TBL-2-3-"><td style="white-space:normal; text-align:left;" id="TBL-2-3-1"
class="td11"><!--l. 59--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">ptype</span></span></span> </td> <td style="white-space:normal; text-align:left;" id="TBL-2-3-2"
class="td11"><!--l. 59--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">character(len=*),</span><span
class="cmtt-12">&#x00A0;intent(in)</span></span></span><span
class="cmr-12">.</span></td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-4-"><td style="white-space:normal; text-align:left;" id="TBL-2-4-1"
class="td11"><!--l. 60--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-2-4-2"
class="td11"><!--l. 60--><p class="noindent" ><span
class="cmr-12">The type of preconditioner. Its values are specified in Table</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlli4.html#XVANEK_MANDEL_BREZINA"><span
class="cmr-12">29</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">. The basic idea</span>
<span
class="cmr-12">of this algorithm is to build a coarse set of indices &#x03A9;</span><sup><span
class="cmmi-8">k</span><span
class="cmr-8">+1</span></sup> <span
class="cmr-12">by suitably grouping the</span>
<span
class="cmr-12">indices of &#x03A9;</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">into disjoint subsets (aggregates), and to define the coarse-to-fine space</span>
<span
class="cmr-12">transfer operator </span><span
class="cmmi-12">P</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">by applying a suitable smoother to a simple piecewise constant</span>
<span
class="cmr-12">prolongation operator, with the aim of improving the quality of the coarse-space</span>
<span
class="cmr-12">correction.</span>
<!--l. 144--><p class="indent" > <span
class="cmr-12">Three main steps can be identified in the smoothed aggregation procedure:</span>
<ol class="enumerate1" >
<li
class="enumerate" id="x15-14002x1"><span
class="cmr-12">aggregation of the indices of &#x03A9;</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">to obtain &#x03A9;</span><sup><span
class="cmmi-8">k</span><span
class="cmr-8">+1</span></sup><span
class="cmr-12">;</span>
</li>
<li
class="enumerate" id="x15-14004x2"><span
class="cmr-12">construction of the prolongator </span><span
class="cmmi-12">P</span><sup><span
class="cmmi-8">k</span></sup><span
class="cmr-12">;</span>
</li>
<li
class="enumerate" id="x15-14006x3"><span
class="cmr-12">application of </span><span
class="cmmi-12">P</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">and </span><span
class="cmmi-12">R</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">= (</span><span
class="cmmi-12">P</span><sup><span
class="cmmi-8">k</span></sup><span
class="cmr-12">)</span><sup><span
class="cmmi-8">T</span> </sup> <span
class="cmr-12">to build </span><span
class="cmmi-12">A</span><sup><span
class="cmmi-8">k</span><span
class="cmr-8">+1</span></sup><span
class="cmr-12">.</span></li></ol>
<!--l. 151--><p class="indent" > <span
class="cmr-12">In order to perform the coarsening step, the smoothed aggregation algorithm</span>
<span
class="cmr-12">described in</span><span
class="cmr-12">&#x00A0;</span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XVANEK_MANDEL_BREZINA"><span
class="cmr-12">29</span></a><span
class="cmr-12">]</span></span> <span
class="cmr-12">is used. In this algorithm, each index </span><span
class="cmmi-12">j </span><span
class="cmsy-10x-x-120">&#x2208; </span><span
class="cmr-12">&#x03A9;</span><sup><span
class="cmmi-8">k</span><span
class="cmr-8">+1</span></sup> <span
class="cmr-12">corresponds</span>
<span
class="cmr-12">to an aggregate &#x03A9;</span><sub><span
class="cmmi-8">j</span></sub><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">of &#x03A9;</span><sup><span
class="cmmi-8">k</span></sup><span
class="cmr-12">, consisting of a suitably chosen index </span><span
class="cmmi-12">i </span><span
class="cmsy-10x-x-120">&#x2208; </span><span
class="cmr-12">&#x03A9;</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">and</span>
<span
class="cmr-12">indices that are (usually) contained in a strongly-coupled neighborood of </span><span
class="cmmi-12">i</span><span
class="cmr-12">,</span>
<span
class="cmr-12">i.e.,</span>
<table
class="equation"><tr><td>
<center class="math-display" >
<img
src="userhtml13x.png" alt=" { &#x2218; -------}
&#x03A9;kj &#x2282; N ki (&#x03B8;) = r &#x2208; &#x03A9;k : |akir| &#x003E; &#x03B8; |akiiakrr| &#x222A; {i} ,
" class="math-display" ><a
id="x15-14007r3"></a></center></td><td class="equation-label"><span
class="cmr-12">(3)</span></td></tr></table>
href="userhtmlse4.html#x13-120151"><span
class="cmr-12">1</span><!--tex4ht:ref: tab:precinit --></a><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-5-"><td style="white-space:normal; text-align:left;" id="TBL-2-5-1"
class="td11"><!--l. 62--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-2-5-2"
class="td11"><!--l. 62--><p class="noindent" ><span
class="cmr-12">Note that the strings are case insensitive.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-6-"><td style="white-space:normal; text-align:left;" id="TBL-2-6-1"
class="td11"><!--l. 63--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-2-6-2"
class="td11"><!--l. 63--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">integer,</span><span
class="cmtt-12">&#x00A0;intent(out)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-7-"><td style="white-space:normal; text-align:left;" id="TBL-2-7-1"
class="td11"><!--l. 64--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-2-7-2"
class="td11"><!--l. 64--><p class="noindent" ><span
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse7.html#x26-300007"><span
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
class="cmr-12">for details.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-2-8-"><td style="white-space:normal; text-align:left;" id="TBL-2-8-1"
class="td11"> </td> </tr></table></div>
<!--l. 160--><p class="nopar" >
<span
class="cmr-12">for a given threshold </span><span
class="cmmi-12">&#x03B8; </span><span
class="cmsy-10x-x-120">&#x2208; </span><span
class="cmr-12">[0</span><span
class="cmmi-12">, </span><span
class="cmr-12">1] (see</span><span
class="cmr-12">&#x00A0;</span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XVANEK_MANDEL_BREZINA"><span
class="cmr-12">29</span></a><span
class="cmr-12">]</span></span> <span
class="cmr-12">for the details). Since this algorithm has a</span>
<span
class="cmr-12">sequential nature, a decoupled version of it is applied, where each processor</span>
<span
class="cmr-12">independently executes the algorithm on the set of indices assigned to it in the initial</span>
<span
class="cmr-12">data distribution. This version is embarrassingly parallel, since it does not require any</span>
<span
class="cmr-12">data communication. On the other hand, it may produce some nonuniform aggregates</span>
<span
class="cmr-12">and is strongly dependent on the number of processors and on the initial</span>
<span
class="cmr-12">partitioning of the matrix </span><span
class="cmmi-12">A</span><span
class="cmr-12">. Nevertheless, this parallel algorithm has been chosen</span>
<span
class="cmr-12">for MLD2P4, since it has been shown to produce good results in practice</span>
<span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#Xaaecc_07"><span
class="cmr-12">5</span></a><span
class="cmr-12">,</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlli4.html#Xapnum_07"><span
class="cmr-12">8</span></a><span
class="cmr-12">,</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlli4.html#XTUMINARO_TONG"><span
class="cmr-12">28</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span>
<!--l. 172--><p class="indent" > <span
class="cmr-12">The prolongator </span><span
class="cmmi-12">P</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">is built starting from a tentative prolongator</span> <span class="bar-css"><span
class="cmmi-12">P</span></span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmsy-10x-x-120">&#x2208; </span><span
class="msbm-10x-x-120">&#x211D;</span><sup><span
class="cmmi-8">n</span><sub><span
class="cmmi-6">k</span></sub><span
class="cmsy-8">&#x00D7;</span><span
class="cmmi-8">n</span><sub><span
class="cmmi-6">k</span><span
class="cmr-6">+1</span></sub></sup><span
class="cmr-12">,</span>
<span
class="cmr-12">defined as</span>
<table
class="equation"><tr><td>
<center class="math-display" >
<img
src="userhtml14x.png" alt=" { k
P¯k = (¯pkij), p¯kij = 1 if i &#x2208; &#x03A9; j,
0 otherwise,
" class="math-display" ><a
id="x15-14008r4"></a></center></td><td class="equation-label"><span
class="cmr-12">(4)</span></td></tr></table>
<!--l. 181--><p class="nopar" >
<span
class="cmr-12">where &#x03A9;</span><sub><span
class="cmmi-8">j</span></sub><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">is the aggregate of &#x03A9;</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">corresponding to the index </span><span
class="cmmi-12">j </span><span
class="cmsy-10x-x-120">&#x2208; </span><span
class="cmr-12">&#x03A9;</span><sup><span
class="cmmi-8">k</span><span
class="cmr-8">+1</span></sup><span
class="cmr-12">. </span><span
class="cmmi-12">P</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">is obtained</span>
<span
class="cmr-12">by applying to</span> <span class="bar-css"><span
class="cmmi-12">P</span></span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">a smoother </span><span
class="cmmi-12">S</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmsy-10x-x-120">&#x2208; </span><span
class="msbm-10x-x-120">&#x211D;</span><sup><span
class="cmmi-8">n</span><sub><span
class="cmmi-6">k</span></sub><span
class="cmsy-8">&#x00D7;</span><span
class="cmmi-8">n</span><sub><span
class="cmmi-6">k</span></sub></sup><span
class="cmr-12">:</span>
<center class="math-display" >
<img
src="userhtml15x.png" alt="Pk = Sk ¯Pk, " class="math-display" ></center> <span
class="cmr-12">in</span>
<span
class="cmr-12">order to remove nonsmooth components from the range of the prolongator, and hence</span>
<span
class="cmr-12">to improve the convergence properties of the multilevel method</span><span
class="cmr-12">&#x00A0;</span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XBREZINA_VANEK"><span
class="cmr-12">2</span></a><span
class="cmr-12">,</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlli4.html#XStuben_01"><span
class="cmr-12">27</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">. A simple</span>
<span
class="cmr-12">choice for </span><span
class="cmmi-12">S</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">is the damped Jacobi smoother:</span>
<center class="math-display" >
<img
src="userhtml16x.png" alt=" k k k -1 k
S = I - &#x03C9; (D ) A F,
" class="math-display" ></center>
<!--l. 195--><p class="nopar" > <span
class="cmr-12">where </span><span
class="cmmi-12">D</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">is the diagonal matrix with the same diagonal entries as </span><span
class="cmmi-12">A</span><sup><span
class="cmmi-8">k</span></sup><span
class="cmr-12">, </span><span
class="cmmi-12">A</span><sub>
<span
class="cmmi-8">F</span> </sub><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">= (</span><span class="bar-css"><span
class="cmmi-12">a</span></span><sub>
<span
class="cmmi-8">ij</span></sub><sup><span
class="cmmi-8">k</span></sup><span
class="cmr-12">) is</span>
<span
class="cmr-12">the filtered matrix defined as</span>
<table
class="equation"><tr><td>
<center class="math-display" >
<img
src="userhtml17x.png" alt=" { k k &#x2211;
a¯kij = aij if j &#x2208; N i (&#x03B8;), (j &#x2044;= i), ¯akii = akii - (akij - ¯akij),
0 otherwise, j&#x2044;=i
" class="math-display" ><a
id="x15-14009r5"></a></center></td><td class="equation-label"><span
class="cmr-12">(5)</span></td></tr></table>
<!--l. 208--><p class="nopar" >
<span
class="cmr-12">and </span><span
class="cmmi-12">&#x03C9;</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">is an approximation of 4</span><span
class="cmmi-12">&#x2215;</span><span
class="cmr-12">(3</span><span
class="cmmi-12">&#x03C1;</span><sup><span
class="cmmi-8">k</span></sup><span
class="cmr-12">), where </span><span
class="cmmi-12">&#x03C1;</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">is the spectral radius of (</span><span
class="cmmi-12">D</span><sup><span
class="cmmi-8">k</span></sup><span
class="cmr-12">)</span><sup><span
class="cmsy-8">-</span><span
class="cmr-8">1</span></sup><span
class="cmmi-12">A</span><sub>
<span
class="cmmi-8">F</span> </sub><sup><span
class="cmmi-8">k</span></sup>
<span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XBREZINA_VANEK"><span
class="cmr-12">2</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">. In MLD2P4 this approximation is obtained by using </span><span
class="cmsy-10x-x-120">&#x2225;</span><span
class="cmmi-12">A</span><sub><span
class="cmmi-8">F</span> </sub><sup><span
class="cmmi-8">k</span></sup><span
class="cmsy-10x-x-120">&#x2225;</span><sub>
<span
class="cmsy-8">&#x221E;</span></sub> <span
class="cmr-12">as an estimate of </span><span
class="cmmi-12">&#x03C1;</span><sup><span
class="cmmi-8">k</span></sup><span
class="cmr-12">.</span>
<span
class="cmr-12">Note that for systems coming from uniformly elliptic problems, filtering the matrix </span><span
class="cmmi-12">A</span><sup><span
class="cmmi-8">k</span></sup>
<span
class="cmr-12">has little or no effect, and </span><span
class="cmmi-12">A</span><sup><span
class="cmmi-8">k</span></sup> <span
class="cmr-12">can be used instead of </span><span
class="cmmi-12">A</span><sub>
<span
class="cmmi-8">F</span> </sub><sup><span
class="cmmi-8">k</span></sup><span
class="cmr-12">. The latter choice is the</span>
<span
class="cmr-12">default in MLD2P4.</span>
<!--l. 216--><div class="crosslinks"><p class="noindent"><span
<!--l. 73--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu8.html" ><span
class="cmr-12">next</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu6.html" ><span
class="cmr-12">prev</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu6.html#tailuserhtmlsu6.html" ><span
class="cmr-12">prev-tail</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu7.html" ><span
class="cmr-12">front</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse4.html#userhtmlsu7.html" ><span
href="userhtmlse5.html#userhtmlsu7.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<!--l. 216--><p class="indent" > <a
<!--l. 73--><p class="indent" > <a
id="tailuserhtmlsu7.html"></a>
</body></html>

File diff suppressed because it is too large Load Diff

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>Examples</title>
<head><title>Method hierarchy_build</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
@ -10,8 +10,17 @@
<link rel="stylesheet" type="text/css" href="userhtml.css">
</head><body
>
<!--l. 109--><div class="crosslinks"><p class="noindent"><span
<!--l. 572--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu10.html" ><span
class="cmr-12">next</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu8.html" ><span
class="cmr-12">prev</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu8.html#tailuserhtmlsu8.html" ><span
class="cmr-12">prev-tail</span></a><span
class="cmr-12">] [</span><a
href="#tailuserhtmlsu9.html"><span
class="cmr-12">tail</span></a><span
class="cmr-12">] [</span><a
@ -19,372 +28,128 @@ href="userhtmlse5.html#userhtmlsu9.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<h4 class="subsectionHead"><span class="titlemark"><span
class="cmr-12">5.1 </span></span> <a
id="x18-170005.1"></a><span
class="cmr-12">Examples</span></h4>
<!--l. 111--><p class="noindent" ><span
class="cmr-12">The code reported in Figure</span><span
class="cmr-12">&#x00A0;</span><a
href="#x18-170012"><span
class="cmr-12">2</span><!--tex4ht:ref: fig:ex1 --></a> <span
class="cmr-12">shows how to set and apply the default multilevel</span>
<span
class="cmr-12">preconditioner available in the real double precision version of AMG4PSBLAS</span>
<span
class="cmr-12">(see Table</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse5.html#x17-160151"><span
class="cmr-12">1</span><!--tex4ht:ref: tab:precinit --></a><span
class="cmr-12">). This preconditioner is chosen by simply specifying </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">&#8217;ML&#8217;</span></span></span> <span
class="cmr-12">as the</span>
<span
class="cmr-12">second argument of </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">P%init</span></span></span> <span
class="cmr-12">(a call to </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">P%set</span></span></span> <span
class="cmr-12">is not needed) and is applied</span>
class="cmr-12">5.3 </span></span> <a
id="x18-170005.3"></a><span
class="cmr-12">Method hierarchy</span><span
class="cmr-12">_build</span></h4>
<div class="center"
>
<!--l. 574--><p class="noindent" >
<!--l. 575--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">call</span><span
class="cmtt-12">&#x00A0;p%hierarchy_build(a,desc_a,info)</span></span></span><br />
</div>
<!--l. 578--><p class="noindent" ><span
class="cmr-12">This method builds the hierarchy of matrices and restriction/prolongation operators for</span>
<span
class="cmr-12">with the CG solver provided by PSBLAS (the matrix of the system to be</span>
class="cmr-12">the multilevel preconditioner </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">p</span></span></span><span
class="cmr-12">, according to the requirements made by the user</span>
<span
class="cmr-12">solved is assumed to be positive definite). As previously observed, the modules</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">psb_base_mod</span></span></span><span
class="cmr-12">, </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amg_prec_mod</span></span></span> <span
class="cmr-12">through the methods </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">init</span></span></span> <span
class="cmr-12">and </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">psb_krylov_mod</span></span></span> <span
class="cmr-12">must be used by the example</span>
<span
class="cmr-12">program.</span>
<!--l. 121--><p class="indent" > <span
class="cmr-12">The part of the code concerning the reading and assembling of the sparse matrix</span>
<span
class="cmr-12">and the right-hand side vector, performed through the PSBLAS routines for sparse</span>
<span
class="cmr-12">matrix and vector management, is not reported here for brevity; the statements</span>
<span
class="cmr-12">concerning the deallocation of the PSBLAS data structure are neglected too. The</span>
<span
class="cmr-12">complete code can be found in the example program file </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amg_dexample_ml.f90</span></span></span><span
class="cmr-12">, in the</span>
<span
class="cmr-12">directory </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">examples/fileread</span></span></span> <span
class="cmr-12">of the AMG4PSBLAS implementation (see</span>
<span
class="cmr-12">Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlsu5.html#x12-110003.5"><span
class="cmr-12">3.5</span><!--tex4ht:ref: sec:ex_and_test --></a><span
class="cmr-12">). A sample test problem along with the relevant input data is available in</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">examples/fileread/runs</span></span></span><span
class="cmr-12">. For details on the use of the PSBLAS routines, see the</span>
<span
class="cmr-12">PSBLAS User&#8217;s Guide</span><span
class="cmr-12">&#x00A0;</span><span class="cite"><span
class="cmtt-12">set</span></span></span><span
class="cmr-12">.</span>
<!--l. 583--><p class="noindent" ><span
class="cmbx-12">Arguments</span>
<div class="tabular"> <table id="TBL-11" class="tabular"
cellspacing="0" cellpadding="0"
><colgroup id="TBL-11-1g"><col
id="TBL-11-1"><col
id="TBL-11-2"></colgroup><tr
style="vertical-align:baseline;" id="TBL-11-1-"><td style="white-space:normal; text-align:left;" id="TBL-11-1-1"
class="td11"><!--l. 586--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">a</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-11-1-2"
class="td11"><!--l. 586--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">type(psb_</span></span></span><span
class="cmti-12">x</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">spmat_type),</span><span
class="cmtt-12">&#x00A0;intent(in)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-11-2-"><td style="white-space:normal; text-align:left;" id="TBL-11-2-1"
class="td11"><!--l. 587--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-11-2-2"
class="td11"><!--l. 587--><p class="noindent" ><span
class="cmr-12">The sparse matrix structure containing the local part of the matrix</span>
<span
class="cmr-12">to be preconditioned. Note that </span><span
class="cmti-12">x </span><span
class="cmr-12">must be chosen according to the</span>
<span
class="cmr-12">real/complex, single/double precision version of AMG4PSBLAS</span>
<span
class="cmr-12">under use. See the PSBLAS User&#8217;s Guide for details </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span>
<!--l. 133--><p class="indent" > <span
class="cmr-12">The setup and application of the default multilevel preconditioner for the real single</span>
<span
class="cmr-12">precision and the complex, single and double precision, versions are obtained</span>
<span
class="cmr-12">with straightforward modifications of the previous example (see Section</span><span
class="cmr-12">&#x00A0;</span><a
href="userhtmlse6.html#x19-180006"><span
class="cmr-12">6</span><!--tex4ht:ref: sec:userinterface --></a> <span
class="cmr-12">for</span>
<span
class="cmr-12">details). If these versions are installed, the corresponding codes are available in</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">examples/fileread/</span></span></span><span
class="cmr-12">.</span>
<!--l. 139--><p class="indent" > <hr class="figure"><div class="figure"
>
<a
id="x18-170012"></a>
<div class="center"
>
<!--l. 140--><p class="noindent" >
<div class="minipage"><pre class="verbatim" id="verbatim-6">
&#x00A0;&#x00A0;use&#x00A0;psb_base_mod
&#x00A0;&#x00A0;use&#x00A0;amg_prec_mod
&#x00A0;&#x00A0;use&#x00A0;psb_krylov_mod
...&#x00A0;...
!
!&#x00A0;sparse&#x00A0;matrix
&#x00A0;&#x00A0;type(psb_dspmat_type)&#x00A0;::&#x00A0;A
!&#x00A0;sparse&#x00A0;matrix&#x00A0;descriptor
&#x00A0;&#x00A0;type(psb_desc_type)&#x00A0;&#x00A0;&#x00A0;::&#x00A0;desc_A
!&#x00A0;preconditioner
&#x00A0;&#x00A0;type(amg_dprec_type)&#x00A0;&#x00A0;::&#x00A0;P
!&#x00A0;right-hand&#x00A0;side&#x00A0;and&#x00A0;solution&#x00A0;vectors
&#x00A0;&#x00A0;type(psb_d_vect_type)&#x00A0;::&#x00A0;b,&#x00A0;x
...&#x00A0;...
!
!&#x00A0;initialize&#x00A0;the&#x00A0;parallel&#x00A0;environment
&#x00A0;&#x00A0;call&#x00A0;psb_init(ictxt)
&#x00A0;&#x00A0;call&#x00A0;psb_info(ictxt,iam,np)
...&#x00A0;...
!
!&#x00A0;read&#x00A0;and&#x00A0;assemble&#x00A0;the&#x00A0;spd&#x00A0;matrix&#x00A0;A&#x00A0;and&#x00A0;the&#x00A0;right-hand&#x00A0;side&#x00A0;b
!&#x00A0;using&#x00A0;PSBLAS&#x00A0;routines&#x00A0;for&#x00A0;sparse&#x00A0;matrix&#x00A0;/&#x00A0;vector&#x00A0;management
...&#x00A0;...
!
!&#x00A0;initialize&#x00A0;the&#x00A0;default&#x00A0;multilevel&#x00A0;preconditioner,&#x00A0;i.e.&#x00A0;V-cycle
!&#x00A0;with&#x00A0;basic&#x00A0;smoothed&#x00A0;aggregation,&#x00A0;1&#x00A0;hybrid&#x00A0;forward/backward
!&#x00A0;GS&#x00A0;sweep&#x00A0;as&#x00A0;pre/post-smoother&#x00A0;and&#x00A0;UMFPACK&#x00A0;as&#x00A0;coarsest-level
!&#x00A0;solver
&#x00A0;&#x00A0;call&#x00A0;P%init(&#8217;ML&#8217;,info)
!
!&#x00A0;build&#x00A0;the&#x00A0;preconditioner
&#x00A0;&#x00A0;call&#x00A0;P%hierarchy_build(A,desc_A,info)
&#x00A0;&#x00A0;call&#x00A0;P%smoothers_build(A,desc_A,info)
!
!&#x00A0;set&#x00A0;the&#x00A0;solver&#x00A0;parameters&#x00A0;and&#x00A0;the&#x00A0;initial&#x00A0;guess
&#x00A0;&#x00A0;...&#x00A0;...
!
!&#x00A0;solve&#x00A0;Ax=b&#x00A0;with&#x00A0;preconditioned&#x00A0;CG
&#x00A0;&#x00A0;call&#x00A0;psb_krylov(&#8217;CG&#8217;,A,P,b,x,tol,desc_A,info)
&#x00A0;&#x00A0;...&#x00A0;...
!
!&#x00A0;deallocate&#x00A0;the&#x00A0;preconditioner
&#x00A0;&#x00A0;call&#x00A0;P%free(info)
!
!&#x00A0;deallocate&#x00A0;other&#x00A0;data&#x00A0;structures
&#x00A0;&#x00A0;...&#x00A0;...
!
!&#x00A0;exit&#x00A0;the&#x00A0;parallel&#x00A0;environment
&#x00A0;&#x00A0;call&#x00A0;psb_exit(ictxt)
&#x00A0;&#x00A0;stop
</pre>
<!--l. 195--><p class="nopar" >
</div>
<br /> <div class="caption"
><span class="id">Figure&#x00A0;2: </span><span
class="content">setup and application of the default multilevel preconditioner (example 1). </span></div><!--tex4ht:label?: x18-170012 -->
</div>
<!--l. 201--><p class="indent" > </div><hr class="endfigure">
<!--l. 203--><p class="indent" > <span
class="cmr-12">Different versions of the multilevel preconditioner can be obtained by changing the</span>
<span
class="cmr-12">default values of the preconditioner parameters. The code reported in Figure</span><span
class="cmr-12">&#x00A0;</span><a
href="#x18-170023"><span
class="cmr-12">3</span><!--tex4ht:ref: fig:ex2 --></a> <span
class="cmr-12">shows</span>
<span
class="cmr-12">how to set a V-cycle preconditioner which applies 1 block-Jacobi sweep as pre- and</span>
<span
class="cmr-12">post-smoother, and solves the coarsest-level system with 8 block-Jacobi sweeps. Note</span>
<span
class="cmr-12">that the ILU(0) factorization (plus triangular solve) is used as local solver for the</span>
<span
class="cmr-12">block-Jacobi sweeps, since this is the default associated with block-Jacobi</span>
<span
class="cmr-12">and set by</span><span
class="cmr-12">&#x00A0;</span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">P%init</span></span></span><span
class="cmr-12">. Furthermore, specifying block-Jacobi as coarsest-level</span>
<span
class="cmr-12">solver implies that the coarsest-level matrix is distributed among the processes.</span>
<span
class="cmr-12">Figure</span><span
class="cmr-12">&#x00A0;</span><a
href="#x18-170034"><span
class="cmr-12">4</span><!--tex4ht:ref: fig:ex3 --></a> <span
class="cmr-12">shows how to set a W-cycle preconditioner using the Coarsening</span>
<span
class="cmr-12">based on Compatible Weighted Matching. It applies 2 hybrid Gauss-Seidel</span>
<span
class="cmr-12">sweeps as pre- and post-smoother, and solves the coarsest-level system with the</span>
<span
class="cmr-12">multifrontal LU factorization implemented in MUMPS. It is specified that the</span>
<span
class="cmr-12">coarsest-level matrix is distributed, since MUMPS can be used on both replicated and</span>
<span
class="cmr-12">distributed matrices, and by default it is used on replicated ones. The code</span>
<span
class="cmr-12">fragments shown in Figures</span><span
class="cmr-12">&#x00A0;</span><a
href="#x18-170023"><span
class="cmr-12">3</span><!--tex4ht:ref: fig:ex2 --></a> <span
class="cmr-12">and </span><a
href="#x18-170034"><span
class="cmr-12">4</span><!--tex4ht:ref: fig:ex3 --></a> <span
class="cmr-12">are included in the example program file</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amg_dexample_ml.f90</span></span></span> <span
class="cmr-12">too. </span><span
class="cmbx-12">DA CORREGGERE NEL CODICE ESEMPIO</span>
<span
class="cmbx-12">3</span>
<!--l. 228--><p class="indent" > <span
class="cmr-12">Finally, Figure</span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-11-3-"><td style="white-space:normal; text-align:left;" id="TBL-11-3-1"
class="td11"><!--l. 592--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">desc_a</span></span></span></td><td style="white-space:normal; text-align:left;" id="TBL-11-3-2"
class="td11"><!--l. 592--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">type(psb_desc_type),</span><span
class="cmtt-12">&#x00A0;intent(in)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-11-4-"><td style="white-space:normal; text-align:left;" id="TBL-11-4-1"
class="td11"><!--l. 593--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-11-4-2"
class="td11"><!--l. 593--><p class="noindent" ><span
class="cmr-12">The communication descriptor of </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">a</span></span></span><span
class="cmr-12">. See the PSBLAS User&#8217;s Guide</span>
<span
class="cmr-12">for details </span><span class="cite"><span
class="cmr-12">[</span><a
href="userhtmlli4.html#XPSBLASGUIDE"><span
class="cmr-12">16</span></a><span
class="cmr-12">]</span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-11-5-"><td style="white-space:normal; text-align:left;" id="TBL-11-5-1"
class="td11"><!--l. 596--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">info</span></span></span> </td><td style="white-space:normal; text-align:left;" id="TBL-11-5-2"
class="td11"><!--l. 596--><p class="noindent" ><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">integer,</span><span
class="cmtt-12">&#x00A0;intent(out)</span></span></span><span
class="cmr-12">.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-11-6-"><td style="white-space:normal; text-align:left;" id="TBL-11-6-1"
class="td11"><!--l. 597--><p class="noindent" > </td><td style="white-space:normal; text-align:left;" id="TBL-11-6-2"
class="td11"><!--l. 597--><p class="noindent" ><span
class="cmr-12">Error code. If no error, 0 is returned. See Section</span><span
class="cmr-12">&#x00A0;</span><a
href="#x18-170045"><span
class="cmr-12">5</span><!--tex4ht:ref: fig:ex4 --></a> <span
class="cmr-12">shows the setup of a one-level additive Schwarz preconditioner,</span>
<span
class="cmr-12">i.e., RAS with overlap 2. Note also that a Krylov method different from CG</span>
<span
class="cmr-12">must be used to solve the preconditioned system, since the preconditione in</span>
<span
class="cmr-12">nonsymmetric. The corresponding example program is available in the file</span>
<span class="obeylines-h"><span class="verb"><span
class="cmtt-12">amg_dexample_1lev.f90</span></span></span><span
class="cmr-12">.</span>
<!--l. 235--><p class="indent" > <span
class="cmr-12">For all the previous preconditioners, example programs where the sparse matrix and</span>
<span
class="cmr-12">the right-hand side are generated by discretizing a PDE with Dirichlet boundary</span>
<span
class="cmr-12">conditions are also available in the directory </span><span class="obeylines-h"><span class="verb"><span
class="cmtt-12">examples/pdegen</span></span></span><span
class="cmr-12">.</span>
<!--l. 239--><p class="indent" > <hr class="figure"><div class="figure"
>
<a
id="x18-170023"></a>
<div class="center"
>
<!--l. 240--><p class="noindent" >
<div class="minipage"><pre class="verbatim" id="verbatim-7">
...&#x00A0;...
!&#x00A0;build&#x00A0;a&#x00A0;V-cycle&#x00A0;preconditioner&#x00A0;with&#x00A0;1&#x00A0;block-Jacobi&#x00A0;sweep&#x00A0;(with
!&#x00A0;ILU(0)&#x00A0;on&#x00A0;the&#x00A0;blocks)&#x00A0;as&#x00A0;pre-&#x00A0;and&#x00A0;post-smoother,&#x00A0;and&#x00A0;8&#x00A0;&#x00A0;block-Jacobi
!&#x00A0;sweeps&#x00A0;(with&#x00A0;ILU(0)&#x00A0;on&#x00A0;the&#x00A0;blocks)&#x00A0;as&#x00A0;coarsest-level&#x00A0;solver
&#x00A0;&#x00A0;call&#x00A0;P%init(&#8217;ML&#8217;,info)
&#x00A0;&#x00A0;call_P%set(&#8217;SMOOTHER_TYPE&#8217;,&#8217;BJAC&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;COARSE_SOLVE&#8217;,&#8217;BJAC&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;COARSE_SWEEPS&#8217;,8,info)
&#x00A0;&#x00A0;call&#x00A0;P%hierarchy_build(A,desc_A,info)
&#x00A0;&#x00A0;call&#x00A0;P%smoothers_build(A,desc_A,info)
...&#x00A0;...
</pre>
<!--l. 255--><p class="nopar" ></div>
<br /><div class="caption"
><span class="id">Figure&#x00A0;3: </span><span
class="content">setup of a multilevel preconditioner based on the default decoupled coarsening</span></div><!--tex4ht:label?: x18-170023 -->
</div>
<!--l. 261--><p class="indent" > </div><hr class="endfigure">
<!--l. 263--><p class="indent" > <hr class="figure"><div class="figure"
>
<a
id="x18-170034"></a>
<div class="center"
>
<!--l. 264--><p class="noindent" >
<div class="minipage"><pre class="verbatim" id="verbatim-8">
...&#x00A0;...
!&#x00A0;build&#x00A0;a&#x00A0;W-cycle&#x00A0;preconditioner&#x00A0;with&#x00A0;2&#x00A0;hybrid&#x00A0;Gauss-Seidel&#x00A0;sweeps
!&#x00A0;as&#x00A0;pre-&#x00A0;and&#x00A0;post-smoother,&#x00A0;a&#x00A0;distributed&#x00A0;coarsest
!&#x00A0;matrix,&#x00A0;and&#x00A0;MUMPS&#x00A0;as&#x00A0;coarsest-level&#x00A0;solver
&#x00A0;&#x00A0;call&#x00A0;P%init(&#8217;ML&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;PAR_AGGR_ALG&#8217;,&#8217;COUPLED&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;ML_CYCLE&#8217;,&#8217;WCYCLE&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;SMOOTHER_TYPE&#8217;,&#8217;FBGS&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;SMOOTHER_SWEEPS&#8217;,2,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;COARSE_SOLVE&#8217;,&#8217;MUMPS&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;COARSE_MAT&#8217;,&#8217;DIST&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%hierarchy_build(A,desc_A,info)
&#x00A0;&#x00A0;call&#x00A0;P%smoothers_build(A,desc_A,info)
...&#x00A0;...
</pre>
<!--l. 282--><p class="nopar" ></div>
<br /> <div class="caption"
><span class="id">Figure&#x00A0;4: </span><span
class="content">setup of a multilevel preconditioner based on the coupled coarsening based
on weighted matching</span></div><!--tex4ht:label?: x18-170034 -->
</div>
<!--l. 287--><p class="indent" > </div><hr class="endfigure">
<!--l. 289--><p class="indent" > <hr class="figure"><div class="figure"
>
href="userhtmlse7.html#x26-300007"><span
class="cmr-12">7</span><!--tex4ht:ref: sec:errors --></a> <span
class="cmr-12">for details.</span> </td>
</tr><tr
style="vertical-align:baseline;" id="TBL-11-7-"><td style="white-space:normal; text-align:left;" id="TBL-11-7-1"
class="td11"> </td> </tr></table></div>
<a
id="x18-170045"></a>
<div class="center"
>
<!--l. 290--><p class="noindent" >
<div class="minipage"><pre class="verbatim" id="verbatim-9">
...&#x00A0;...
!&#x00A0;set&#x00A0;RAS&#x00A0;with&#x00A0;overlap&#x00A0;2&#x00A0;and&#x00A0;ILU(0)&#x00A0;on&#x00A0;the&#x00A0;local&#x00A0;blocks
&#x00A0;&#x00A0;call&#x00A0;P%init(&#8217;AS&#8217;,info)
&#x00A0;&#x00A0;call&#x00A0;P%set(&#8217;SUB_OVR&#8217;,2,info)
&#x00A0;&#x00A0;call&#x00A0;P%bld(A,desc_A,info)
...&#x00A0;...
!&#x00A0;solve&#x00A0;Ax=b&#x00A0;with&#x00A0;preconditioned&#x00A0;BiCGSTAB
&#x00A0;&#x00A0;call&#x00A0;psb_krylov(&#8217;BICGSTAB&#8217;,A,P,b,x,tol,desc_A,info)
</pre>
<!--l. 302--><p class="nopar" ></div>
<br /> <div class="caption"
><span class="id">Figure&#x00A0;5: </span><span
class="content">setup of a one-level Schwarz preconditioner.</span></div><!--tex4ht:label?: x18-170045 -->
</div>
<!--l. 307--><p class="indent" > </div><hr class="endfigure">
<!--l. 1--><div class="crosslinks"><p class="noindent"><span
<!--l. 603--><div class="crosslinks"><p class="noindent"><span
class="cmr-12">[</span><a
href="userhtmlsu10.html" ><span
class="cmr-12">next</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu8.html" ><span
class="cmr-12">prev</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu8.html#tailuserhtmlsu8.html" ><span
class="cmr-12">prev-tail</span></a><span
class="cmr-12">] [</span><a
href="userhtmlsu9.html" ><span
class="cmr-12">front</span></a><span
class="cmr-12">] [</span><a
href="userhtmlse5.html#userhtmlsu9.html" ><span
class="cmr-12">up</span></a><span
class="cmr-12">] </span></p></div>
<!--l. 1--><p class="indent" > <a
<!--l. 603--><p class="indent" > <a
id="tailuserhtmlsu9.html"></a>
</body></html>

@ -2,9 +2,8 @@
\markboth{\textsc{AMG4PSBLAS User's and Reference Guide}}
{\textsc{\ref{sec:license} License}}
{\bf DA CONTROLLARE E MODIFICARE INCLUDENDO I CREDITS A MLD2P4}
The AMG4PSBLAS is freely distributable under the following copyright
AMG4PSBLAS is freely distributable under the following copyright
terms: {\small
\begin{verbatim}
@ -44,3 +43,46 @@ terms: {\small
\end{verbatim}
}
\newpage
AMG4PSBLAS is an evolution of MLD2P4, whose license we reproduce here
to abide by its terms: {\small
\begin{verbatim}
MLD2P4 version 2.2
MultiLevel Domain Decomposition Parallel Preconditioners Package
based on PSBLAS (Parallel Sparse BLAS version 3.5)
(C) Copyright 2008-2018
Salvatore Filippone
Pasqua D'Ambra
Daniela di Serafino
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the MLD2P4 group or the names of its contributors may
not be used to endorse or promote products derived from this
software without specific written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
\end{verbatim}
}

@ -89,7 +89,7 @@
\newcommand{\precdata}{\hyperlink{precdata}{{\tt mld\_prec\_type}}}
\newcommand{\descdata}{\hyperlink{descdata}{{\tt psb\_desc\_type}}}
\newcommand{\spdata}{\hyperlink{spdata}{{\tt psb\_spmat\_type}}}
\newcommand{\Ref}[1]{\mbox{(\ref{#1})}}
%\newcommand{\Ref}[1]{\mbox{(\ref{#1})}}
\begin{document}
\pdfbookmark{AMG4PSBLAS User's and Reference Guide}{title}

@ -87,7 +87,7 @@
\newcommand{\precdata}{\hyperlink{precdata}{{\tt mld\_prec\_type}}}
\newcommand{\descdata}{\hyperlink{descdata}{{\tt psb\_desc\_type}}}
\newcommand{\spdata}{\hyperlink{spdata}{{\tt psb\_spmat\_type}}}
\newcommand{\Ref}[1]{\mbox{(\ref{#1})}}
%\newcommand{\Ref}[1]{\mbox{(\ref{#1})}}
\begin{document}
{\LARGE\bfseries MLD2P4\\[.8ex] User's and Reference Guide}\\[\baselineskip]

@ -240,28 +240,30 @@ be applied.
\bsideways
\begin{center}
%\begin{tabular}{|p{5cm}|l|p{2.4cm}|p{2.5cm}|p{5cm}|}
\begin{tabular}{|p{3.9cm}|l|p{2.3cm}|p{2.9cm}|p{6.9cm}|}
\begin{tabular}{|p{5.7cm}|l|p{2.3cm}|p{2.5cm}|p{6.9cm}|}
\hline
\verb|what| & \textsc{data type} & \verb|val| & \textsc{default} &
\textsc{comments} \\ \hline
\verb|'MIN_COARSE_SIZE'| & \verb|integer|
\verb|'MIN_COARSE_SIZE_PER_PROCESS'| & \verb|integer|
& Any number \par $> 0$
& $\lfloor 40 \sqrt[3]{n} \rfloor$, where $n$ is the dimension
of the matrix at the finest level
& Coarse size threshold. The aggregation stops
if the global number of variables of the
& $200$
& Coarse size threshold per process. The aggregation stops
if the global number of variables of the
computed coarsest matrix
is lower than or equal to this threshold
(see Note).
multiplied by the number of processes.
\\ \hline
\verb|'MIN_COARSE_SIZE_PROCESS'| & \verb|integer|
\verb|'MIN_COARSE_SIZE'| & \verb|integer|
& Any number \par $> 0$
& $200$
& Coarse size threshold per process. The aggregation stops
if the number of variables of the
computed coarsest matrix on the local process
& -1
& Coarse size threshold. The aggregation stops
if the global number of variables of the
computed coarsest matrix
is lower than or equal to this threshold
(see Note).
(see Note). If negative, it is ignored in
favour of the default for
\verb|'MIN_COARSE_SIZE_PER_PROCESS'|.
\\ \hline
\verb|'MIN_CR_RATIO'| & \verb|real|

Loading…
Cancel
Save