Julia interface to hypre linear solvers (https://github.com/hypre-space/hypre)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

12 lines
18 KiB

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>API · HYPRE.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link rel="canonical" href="https://fredrikekre.github.io/HYPRE.jl/stable/api/"/><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../">HYPRE.jl</a></span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../matrix-vector/">Matrix/vector representation</a></li><li><a class="tocitem" href="../solvers-preconditioners/">Solvers and preconditioners</a></li><li><a class="tocitem" href="../libhypre/">LibHYPRE C API</a></li><li class="is-active"><a class="tocitem" href>API</a><ul class="internal"><li><a class="tocitem" href="#Initialization-and-configuration"><span>Initialization and configuration</span></a></li><li><a class="tocitem" href="#Matrix/vector-creation"><span>Matrix/vector creation</span></a></li><li><a class="tocitem" href="#Solvers-and-preconditioners"><span>Solvers and preconditioners</span></a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>API</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>API</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/fredrikekre/HYPRE.jl" title="View the repository on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/fredrikekre/HYPRE.jl/blob/master/docs/src/api.md" title="Edit source on GitHub"><span class="docs-icon fas"></span></a><a class="docs-settings-button docs-navbar-link fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button docs-navbar-link fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="API"><a class="docs-heading-anchor" href="#API">API</a><a id="API-1"></a><a class="docs-heading-anchor-permalink" href="#API" title="Permalink"></a></h1><h2 id="Initialization-and-configuration"><a class="docs-heading-anchor" href="#Initialization-and-configuration">Initialization and configuration</a><a id="Initialization-and-configuration-1"></a><a class="docs-heading-anchor-permalink" href="#Initialization-and-configuration" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="HYPRE.Init" href="#HYPRE.Init"><code>HYPRE.Init</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">Init(; finalize_atexit=true)</code></pre><p>Wrapper around <code>HYPRE_Init</code>. If <code>finalize_atexit</code> is <code>true</code> a Julia exit hook is added, which calls <code>HYPRE_Finalize</code>. This method will also call <code>MPI.Init</code> unless MPI is already initialized.</p><p><strong>Note</strong>: This function <em>must</em> be called before using HYPRE functions.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/fredrikekre/HYPRE.jl/blob/3e9b21b3c7e7e58356a7613677d4c4760305095c/src/HYPRE.jl#L23-L31">source</a></section></article><h2 id="Matrix/vector-creation"><a class="docs-heading-anchor" href="#Matrix/vector-creation">Matrix/vector creation</a><a id="Matrix/vector-creation-1"></a><a class="docs-heading-anchor-permalink" href="#Matrix/vector-creation" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="HYPRE.start_assemble!" href="#HYPRE.start_assemble!"><code>HYPRE.start_assemble!</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">HYPRE.start_assemble!(A::HYPREMatrix) -&gt; HYPREMatrixAssembler
HYPRE.start_assemble!(b::HYPREVector) -&gt; HYPREVectorAssembler
HYPRE.start_assemble!(A::HYPREMatrix, b::HYPREVector) -&gt; HYPREAssembler</code></pre><p>Initialize a new assembly for matrix <code>A</code>, vector <code>b</code>, or for both. This zeroes out any previous data in the arrays. Return a <code>HYPREAssembler</code> with allocated data buffers needed to perform the assembly efficiently.</p><p>See also: <a href="#HYPRE.assemble!"><code>HYPRE.assemble!</code></a>, <a href="#HYPRE.finish_assemble!"><code>HYPRE.finish_assemble!</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/fredrikekre/HYPRE.jl/blob/3e9b21b3c7e7e58356a7613677d4c4760305095c/src/HYPRE.jl#L551-L561">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="HYPRE.assemble!" href="#HYPRE.assemble!"><code>HYPRE.assemble!</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">HYPRE.assemble!(A::HYPREMatrixAssembler, ij, a::Matrix)
HYPRE.assemble!(A::HYPREVectorAssembler, ij, b::Vector)
HYPRE.assemble!(A::HYPREAssembler, ij, a::Matrix, b::Vector)</code></pre><p>Assemble (by adding) matrix contribution <code>a</code>, vector contribution <code>b</code>, into the underlying array(s) of the assembler at global row and column indices <code>ij</code>.</p><p>This is roughly equivalent to:</p><pre><code class="language-julia hljs"># A.A::HYPREMatrix
A.A[ij, ij] += a
# A.b::HYPREVector
A.b[ij] += b</code></pre><p>See also: <a href="#HYPRE.start_assemble!"><code>HYPRE.start_assemble!</code></a>, <a href="#HYPRE.finish_assemble!"><code>HYPRE.finish_assemble!</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/fredrikekre/HYPRE.jl/blob/3e9b21b3c7e7e58356a7613677d4c4760305095c/src/HYPRE.jl#L594-L612">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="HYPRE.finish_assemble!" href="#HYPRE.finish_assemble!"><code>HYPRE.finish_assemble!</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">HYPRE.finish_assemble!(A::HYPREMatrixAssembler)
HYPRE.finish_assemble!(A::HYPREVectorAssembler)
HYPRE.finish_assemble!(A::HYPREAssembler)</code></pre><p>Finish the assembly. This synchronizes the data between processors.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/fredrikekre/HYPRE.jl/blob/3e9b21b3c7e7e58356a7613677d4c4760305095c/src/HYPRE.jl#L667-L673">source</a></section></article><h2 id="Solvers-and-preconditioners"><a class="docs-heading-anchor" href="#Solvers-and-preconditioners">Solvers and preconditioners</a><a id="Solvers-and-preconditioners-1"></a><a class="docs-heading-anchor-permalink" href="#Solvers-and-preconditioners" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="HYPRE.solve!" href="#HYPRE.solve!"><code>HYPRE.solve!</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">solve!(solver::HYPRESolver, x::HYPREVector, A::HYPREMatrix, b::HYPREVector)</code></pre><p>Solve the linear system <code>A x = b</code> using <code>solver</code> with <code>x</code> as the initial guess. The approximate solution is stored in <code>x</code>.</p><p>See also <a href="#HYPRE.solve"><code>solve</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/fredrikekre/HYPRE.jl/blob/3e9b21b3c7e7e58356a7613677d4c4760305095c/src/solvers.jl#L37-L44">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="HYPRE.solve" href="#HYPRE.solve"><code>HYPRE.solve</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">solve(solver::HYPRESolver, A::HYPREMatrix, b::HYPREVector) -&gt; HYPREVector</code></pre><p>Solve the linear system <code>A x = b</code> using <code>solver</code> and return the approximate solution.</p><p>This method allocates an initial guess/output vector <code>x</code>, initialized to 0.</p><p>See also <a href="#HYPRE.solve!"><code>solve!</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/fredrikekre/HYPRE.jl/blob/3e9b21b3c7e7e58356a7613677d4c4760305095c/src/solvers.jl#L26-L34">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="HYPRE.HYPRESolver" href="#HYPRE.HYPRESolver"><code>HYPRE.HYPRESolver</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">HYPRESolver</code></pre><p>Abstract super type of all the wrapped HYPRE solvers.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/fredrikekre/HYPRE.jl/blob/3e9b21b3c7e7e58356a7613677d4c4760305095c/src/solvers.jl#L3-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="HYPRE.BiCGSTAB" href="#HYPRE.BiCGSTAB"><code>HYPRE.BiCGSTAB</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">BiCGSTAB(; settings...)</code></pre><p>Create a <code>BiCGSTAB</code> solver. See HYPRE API reference for details and supported settings.</p><p><strong>External links</strong></p><ul><li><a href="https://hypre.readthedocs.io/en/latest/api-sol-parcsr.html#breathe-section-title-parcsr-bicgstab-solver">BiCGSTAB API reference</a></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/fredrikekre/HYPRE.jl/blob/3e9b21b3c7e7e58356a7613677d4c4760305095c/src/solvers.jl#L94-L101">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="HYPRE.BoomerAMG" href="#HYPRE.BoomerAMG"><code>HYPRE.BoomerAMG</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">BoomerAMG(; settings...)</code></pre><p>Create a <code>BoomerAMG</code> solver/preconditioner. See HYPRE API reference for details and supported settings.</p><p><strong>External links</strong></p><ul><li><a href="https://hypre.readthedocs.io/en/latest/solvers-boomeramg.html">BoomerAMG documentation</a></li><li><a href="https://hypre.readthedocs.io/en/latest/api-sol-parcsr.html#breathe-section-title-parcsr-boomeramg-solver-and-preconditioner">BoomerAMG API reference</a></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/fredrikekre/HYPRE.jl/blob/3e9b21b3c7e7e58356a7613677d4c4760305095c/src/solvers.jl#L142-L151">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="HYPRE.FlexGMRES" href="#HYPRE.FlexGMRES"><code>HYPRE.FlexGMRES</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">FlexGMRES(; settings...)</code></pre><p>Create a <code>FlexGMRES</code> solver. See HYPRE API reference for details and supported settings.</p><p><strong>External links</strong></p><ul><li><a href="https://hypre.readthedocs.io/en/latest/api-sol-parcsr.html#breathe-section-title-parcsr-flexgmres-solver">FlexGMRES API reference</a></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/fredrikekre/HYPRE.jl/blob/3e9b21b3c7e7e58356a7613677d4c4760305095c/src/solvers.jl#L187-L194">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="HYPRE.GMRES" href="#HYPRE.GMRES"><code>HYPRE.GMRES</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GMRES(; settings...)</code></pre><p>Create a <code>GMRES</code> solver. See HYPRE API reference for details and supported settings.</p><p><strong>External links</strong></p><ul><li><a href="https://hypre.readthedocs.io/en/latest/api-sol-parcsr.html#breathe-section-title-parcsr-gmres-solver">GMRES API reference</a></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/fredrikekre/HYPRE.jl/blob/3e9b21b3c7e7e58356a7613677d4c4760305095c/src/solvers.jl#L270-L277">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="HYPRE.Hybrid" href="#HYPRE.Hybrid"><code>HYPRE.Hybrid</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">Hybrid(; settings...)</code></pre><p>Create a <code>Hybrid</code> solver. See HYPRE API reference for details and supported settings.</p><p><strong>External links</strong></p><ul><li><a href="https://hypre.readthedocs.io/en/latest/solvers-hybrid.html">Hybrid documentation</a></li><li><a href="https://hypre.readthedocs.io/en/latest/api-sol-parcsr.html#breathe-section-title-parcsr-hybrid-solver">Hybrid API reference</a></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/fredrikekre/HYPRE.jl/blob/3e9b21b3c7e7e58356a7613677d4c4760305095c/src/solvers.jl#L316-L324">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="HYPRE.ILU" href="#HYPRE.ILU"><code>HYPRE.ILU</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">ILU(; settings...)</code></pre><p>Create a <code>ILU</code> solver/preconditioner. See HYPRE API reference for details and supported settings.</p><p><strong>External links</strong></p><ul><li><a href="https://hypre.readthedocs.io/en/latest/solvers-hypre-ilu.html">ILU documentation</a></li><li><a href="https://hypre.readthedocs.io/en/latest/api-sol-parcsr.html#breathe-section-title-parcsr-ilu-solver">ILU API reference</a></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/fredrikekre/HYPRE.jl/blob/3e9b21b3c7e7e58356a7613677d4c4760305095c/src/solvers.jl#L364-L373">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="HYPRE.PCG" href="#HYPRE.PCG"><code>HYPRE.PCG</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">PCG(; settings...)</code></pre><p>Create a <code>PCG</code> solver. See HYPRE API reference for details and supported settings.</p><p><strong>External links</strong></p><ul><li><a href="https://hypre.readthedocs.io/en/latest/api-sol-parcsr.html#breathe-section-title-parcsr-pcg-solver">PCG API reference</a></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/fredrikekre/HYPRE.jl/blob/3e9b21b3c7e7e58356a7613677d4c4760305095c/src/solvers.jl#L446-L453">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="HYPRE.ParaSails" href="#HYPRE.ParaSails"><code>HYPRE.ParaSails</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">ParaSails(comm=MPI.COMM_WORLD; settings...)</code></pre><p>Create a <code>ParaSails</code> preconditioner. See HYPRE API reference for details and supported settings.</p><p><strong>External links</strong></p><ul><li><a href="https://hypre.readthedocs.io/en/latest/solvers-parasails.html">ParaSails documentation</a></li><li><a href="https://hypre.readthedocs.io/en/latest/api-sol-parcsr.html#breathe-section-title-parcsr-parasails-preconditioner">ParaSails API reference</a></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/fredrikekre/HYPRE.jl/blob/3e9b21b3c7e7e58356a7613677d4c4760305095c/src/solvers.jl#L409-L418">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../libhypre/">« LibHYPRE C API</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.28.0-DEV on <span class="colophon-date" title="Wednesday 12 October 2022 16:05">Wednesday 12 October 2022</span>. Using Julia version 1.8.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>