You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which enable Python code to employ a variety of sparse matrix
322
322
formats using essentially identical operations to the dense matrix
323
323
case. The skeleton code already contains commands to construct
324
324
empty sparse matrices and to solve the resulting linear system. You
325
325
may, if you wish, experiment with choosing other sparse formats
326
-
from <aclass="reference external" href="http://scipy.github.io/devdocs/reference/sparse.html#module-scipy.sparse" title="(in SciPy v1.11.0.dev0+1660.4a6f2d1)"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">scipy.sparse</span></code></a>, but it is very strongly suggested that
326
+
from <aclass="reference external" href="http://scipy.github.io/devdocs/reference/sparse.html#module-scipy.sparse" title="(in SciPy v1.11.0.dev0+1662.6a4b15c)"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">scipy.sparse</span></code></a>, but it is very strongly suggested that
327
327
you do <strong>not</strong> switch to a dense numpy array; unless, that is, you
328
328
particularly enjoy running out of memory on your computer!</p>
function which will stitch together a larger sparse matrix from blocks. In
385
385
order to have the full indexing options you are likely to want for imposing the
386
386
boundary conditions, you will probably want to specify that the resulting
@@ -408,15 +408,15 @@ <h3><span class="section-number">9.4.3. </span>Solving the matrix system<a class
408
408
<p>The block matrix system that you eventually produce will be larger than many of
409
409
those we have previously encountered, and will have non-zero entries further
410
410
from the diagonal. This can cause the matrix solver to become expensive in both
411
-
time and memory. Fortunately, <aclass="reference external" href="http://scipy.github.io/devdocs/reference/sparse.linalg.html#module-scipy.sparse.linalg" title="(in SciPy v1.11.0.dev0+1660.4a6f2d1)"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">scipy.sparse.linalg</span></code></a> now incorporates an
411
+
time and memory. Fortunately, <aclass="reference external" href="http://scipy.github.io/devdocs/reference/sparse.linalg.html#module-scipy.sparse.linalg" title="(in SciPy v1.11.0.dev0+1662.6a4b15c)"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">scipy.sparse.linalg</span></code></a> now incorporates an
412
412
interface to <aclass="reference external" href="https://portal.nersc.gov/project/sparse/superlu/">SuperLU</a>,
413
413
which is a high-performance direct sparse solver. The recommended solution
414
414
strategy is therefore:</p>
415
415
<olclass="arabic simple">
416
-
<li><p>Convert your block matrix to <aclass="reference external" href="http://scipy.github.io/devdocs/reference/generated/scipy.sparse.csc_matrix.html#scipy.sparse.csc_matrix" title="(in SciPy v1.11.0.dev0+1660.4a6f2d1)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">scipy.sparse.csc_matrix</span></code></a>, which is the
416
+
<li><p>Convert your block matrix to <aclass="reference external" href="http://scipy.github.io/devdocs/reference/generated/scipy.sparse.csc_matrix.html#scipy.sparse.csc_matrix" title="(in SciPy v1.11.0.dev0+1662.6a4b15c)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">scipy.sparse.csc_matrix</span></code></a>, which is the
417
417
format that SuperLU requires.</p></li>
418
-
<li><p>Factorise the matrix using <aclass="reference external" href="http://scipy.github.io/devdocs/reference/generated/scipy.sparse.linalg.splu.html#scipy.sparse.linalg.splu" title="(in SciPy v1.11.0.dev0+1660.4a6f2d1)"><codeclass="xref py py-func docutils literal notranslate"><spanclass="pre">scipy.sparse.linalg.splu()</span></code></a>.</p></li>
419
-
<li><p>Use the resulting <aclass="reference external" href="http://scipy.github.io/devdocs/reference/generated/scipy.sparse.linalg.SuperLU.html#scipy.sparse.linalg.SuperLU" title="(in SciPy v1.11.0.dev0+1660.4a6f2d1)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">SuperLU</span></code></a> object to finally solve
418
+
<li><p>Factorise the matrix using <aclass="reference external" href="http://scipy.github.io/devdocs/reference/generated/scipy.sparse.linalg.splu.html#scipy.sparse.linalg.splu" title="(in SciPy v1.11.0.dev0+1662.6a4b15c)"><codeclass="xref py py-func docutils literal notranslate"><spanclass="pre">scipy.sparse.linalg.splu()</span></code></a>.</p></li>
419
+
<li><p>Use the resulting <aclass="reference external" href="http://scipy.github.io/devdocs/reference/generated/scipy.sparse.linalg.SuperLU.html#scipy.sparse.linalg.SuperLU" title="(in SciPy v1.11.0.dev0+1662.6a4b15c)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">SuperLU</span></code></a> object to finally solve
0 commit comments