From 86c12ec4516a15bdf71605f9be98c1e14d076cfb Mon Sep 17 00:00:00 2001 From: Christoph Groth <christoph.groth@cea.fr> Date: Wed, 28 Nov 2012 16:42:34 +0100 Subject: [PATCH] absorb solver module docstrings into the documentation --- doc/source/reference/kwant.solvers.common.rst | 5 ++++- doc/source/reference/kwant.solvers.mumps.rst | 19 ++++++++++++++++++- doc/source/reference/kwant.solvers.sparse.rst | 13 ++++++++++++- kwant/solvers/common.py | 6 ------ kwant/solvers/mumps.py | 19 ------------------- kwant/solvers/sparse.py | 13 ------------- 6 files changed, 34 insertions(+), 41 deletions(-) diff --git a/doc/source/reference/kwant.solvers.common.rst b/doc/source/reference/kwant.solvers.common.rst index 282b8ddd..2d120120 100644 --- a/doc/source/reference/kwant.solvers.common.rst +++ b/doc/source/reference/kwant.solvers.common.rst @@ -1,7 +1,10 @@ :mod:`kwant.solvers.common` -- common functionality used by solvers =================================================================== -.. automodule:: kwant.solvers.common +.. module:: kwant.solvers.common + +This module typically needs not be used directly by the user. It is rather +used by the individual solver modules. .. autosummary:: :toctree: generated/ diff --git a/doc/source/reference/kwant.solvers.mumps.rst b/doc/source/reference/kwant.solvers.mumps.rst index 418e54a5..de20ccd2 100644 --- a/doc/source/reference/kwant.solvers.mumps.rst +++ b/doc/source/reference/kwant.solvers.mumps.rst @@ -1,7 +1,24 @@ :mod:`kwant.solvers.mumps` -- High performance sparse solver based on MUMPS =========================================================================== -.. automodule:: kwant.solvers.mumps +.. module:: kwant.solvers.mumps + +A sparse solver that uses `MUMPS <http://graal.ens-lyon.fr/MUMPS/>`_. (Only +the sequential, single core version is used.) + +MUMPS is a very efficient direct sparse solver that can take advantage of +memory beyond 3GB for the solution of large problems. Furthermore, it offers a +choice of several orderings of the input matrix from which can speed up a +calculation significantly. + +Compared to the generic sparse solver framework, `mumps` adds the following +control options that may affect performance: + +- `ordering`: a fill-in reducing ordering of the matrix +- `nrhs`: number of right hand sides that should be solved simultaneously +- `sparse_rhs`: whether to use dense or sparse right hand sides + +For more details see `~Solver.options`. .. autosummary:: :toctree: generated/ diff --git a/doc/source/reference/kwant.solvers.sparse.rst b/doc/source/reference/kwant.solvers.sparse.rst index ff10c250..00947d84 100644 --- a/doc/source/reference/kwant.solvers.sparse.rst +++ b/doc/source/reference/kwant.solvers.sparse.rst @@ -1,7 +1,18 @@ :mod:`kwant.solvers.sparse` -- Basic sparse matrix solver ========================================================= -.. automodule:: kwant.solvers.sparse +.. module:: kwant.solvers.sparse + +A sparse solver that uses `scipy.sparse.linalg +<http://docs.scipy.org/doc/scipy/reference/sparse.linalg.html>`_. + +SciPy currently uses internally either the direct sparse solver UMFPACK or if +that is not installed, SuperLU. Often, SciPy's SuperLU will give quite poor +performance and you will be warned if only SuperLU is found. The module +variable `uses_umfpack` can be checked to determine if UMFPACK is being used. + +`sparse` does not introduce any additional options as compared to the generic +sparse solver framework. .. autosummary:: :toctree: generated/ diff --git a/kwant/solvers/common.py b/kwant/solvers/common.py index 47ff6fc9..7da4ad3c 100644 --- a/kwant/solvers/common.py +++ b/kwant/solvers/common.py @@ -1,9 +1,3 @@ -"""Collection of things commonly used by the different solvers. - -Typically needs not be called by the user, but is rather used by the -individual solver modules -""" - __all__ = ['SparseSolver', 'BlockResult'] from collections import namedtuple diff --git a/kwant/solvers/mumps.py b/kwant/solvers/mumps.py index e290d755..9b3b04ff 100644 --- a/kwant/solvers/mumps.py +++ b/kwant/solvers/mumps.py @@ -1,22 +1,3 @@ -"""Implementation of the sparse solver framework using the direct sparse solver -MUMPS (http://graal.ens-lyon.fr/MUMPS/, only the sequential, single core -version is used). - -MUMPS is a very efficient direct sparse solver that can take advantage of -memory beyond 3GB for the solution of large problems. Furthermore, it offers a -choice of several orderings of the input matrix from which can speed up a -calculation significantly. - -Compared to the generic sparse solver framework, `mumps` adds the following -control options that may affect performance: - -- `ordering`: a fill-in reducing ordering of the matrix -- `nrhs`: number of right hand sides that should be solved simultaneously -- `sparse_rhs`: whether to use dense or sparse right hand sides - -For more details see `~Solver.options`. -""" - __all__ = ['solve', 'ldos', 'wave_func', 'options', 'Solver'] import numpy as np diff --git a/kwant/solvers/sparse.py b/kwant/solvers/sparse.py index 9d6dfa4f..8192870b 100644 --- a/kwant/solvers/sparse.py +++ b/kwant/solvers/sparse.py @@ -1,16 +1,3 @@ -"""Implementation of the sparse solver framework using the direct sparse solver -provided by `scipy.sparse.linalg -<http://docs.scipy.org/doc/scipy/reference/sparse.linalg.html>`. - -SciPy currently uses internally either the direct sparse solver UMFPACK or if -that is not installed, SuperLU. Often, SciPy's SuperLU will give quite poor -performance and you will be warned if only SuperLU is found. The module -variable `uses_umfpack` can be checked to determine if UMFPACK is being used. - -`sparse` does not introduce any additional options as compared to the generic -sparse solver framework. -""" - __all__ = ['solve', 'ldos', 'wave_func', 'Solver'] import warnings -- GitLab