Skip to content

Commit

Permalink
updates to the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 committed Jan 8, 2017
1 parent e36e843 commit f80a6cc
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 69 deletions.
57 changes: 5 additions & 52 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ pymatsolver
:target: https://crate.io/packages/pymatsolver/
:alt: Latest PyPI version

.. image:: https://img.shields.io/pypi/dm/pymatsolver.svg
:target: https://crate.io/packages/pymatsolver/
:alt: Number of PyPI downloads

.. image:: https://img.shields.io/badge/license-MIT-blue.svg
:target: https://github.com/rowanc1/pymatsolver/blob/master/LICENSE
:alt: MIT license.
Expand All @@ -17,12 +13,12 @@ pymatsolver
:target: https://travis-ci.org/rowanc1/pymatsolver
:alt: Travis CI build status

.. image:: https://img.shields.io/coveralls/rowanc1/pymatsolver.svg
:target: https://coveralls.io/r/rowanc1/pymatsolver?branch=master
.. image:: https://codecov.io/gh/rowanc1/pymatsolver/branch/master/graph/badge.svg
:target: https://codecov.io/gh/rowanc1/pymatsolver
:alt: Coverage status


A sparse matrix solver for python.
A (sparse) matrix solver for python.

Solving Ax = b should be as easy as:

Expand All @@ -38,52 +34,9 @@ Solvers Available

All solvers work with :code:`scipy.sparse` matricies, and a single or multiple right hand sides using :code:`numpy`:

* L/U Triangular Solves (done in fortran)
* L/U Triangular Solves
* Wrapping of SciPy matrix solvers (direct and indirect)
* MUMPS (http://mumps.enseeiht.fr/) for real and imaginary components (fortran wrapper, mac/linux supported, with nice error messages!)

Installing
==========

I have not been able to get the pip install to work because of multiple dependencies on fortran libraries.
However, the linux and mac installs are relatively easy. Note that you must have mumps pre-installed,
currently I have only got this working for the sequential version, so when you are installing,
you will need to point to that one. You can also look at the `.travis.yml` file for how to get it working on TravisCI.

Linux
-----

From a clean install on Ubuntu:

.. code-block:: bash
apt-get update
apt-get -y install gcc gfortran git libopenmpi-dev libmumps-seq-dev libblas-dev liblapack-dev
# Install all the python you need!
wget http://repo.continuum.io/miniconda/Miniconda-3.8.3-Linux-x86_64.sh -O miniconda.sh;
chmod +x miniconda.sh
./miniconda.sh -b
export PATH=/root/anaconda/bin:/root/miniconda/bin:$PATH
conda update --yes conda
conda install --yes numpy scipy matplotlib cython ipython nose
git clone https://github.com/rowanc1/pymatsolver.git
cd pymatsolver
python setup.py install
Mac
---

This assumes that you have Brew and some python installed (numpy, scipy):

.. code-block:: bash
brew install mumps --with-scotch5 --without-mpi
git clone https://github.com/rowanc1/pymatsolver.git
cd pymatsolver
python setup.py install
* Pardiso solvers now that MKL comes with conda!


Code:
Expand Down
61 changes: 61 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@

The API
*******

.. autoclass:: pymatsolver.solvers.Base
:members:
:undoc-members:



Basic Solvers
=============


.. autoclass:: pymatsolver.wrappers.Solver
:members:
:undoc-members:

.. autoclass:: pymatsolver.wrappers.SolverLU
:members:
:undoc-members:

.. autoclass:: pymatsolver.wrappers.SolverCG
:members:
:undoc-members:

Diagonal
--------

.. autoclass:: pymatsolver.solvers.Diagonal
:members:
:undoc-members:

Triangular
----------

.. autoclass:: pymatsolver.solvers.Forward
:members:
:undoc-members:


.. autoclass:: pymatsolver.solvers.Backward
:members:
:undoc-members:


Iterative Solvers
=================

.. autoclass:: pymatsolver.iterative.BicgJacobi
:members:
:undoc-members:


Direct Solvers
==============

.. autoclass:: pymatsolver.direct.Pardiso
:members:
:undoc-members:

10 changes: 9 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.autodoc',
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -112,7 +113,14 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'alabaster'

try:
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
pass
except Exception, e:
html_theme = 'alabaster'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
12 changes: 2 additions & 10 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
.. pymatsolver documentation master file, created by
sphinx-quickstart on Sat Jan 7 17:12:34 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to pymatsolver's documentation!
=======================================

Contents:
.. include:: ../README.rst

.. toctree::
:maxdepth: 2


api

Indices and tables
==================
Expand Down
10 changes: 4 additions & 6 deletions pymatsolver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

from pymatsolver.iterative import BicgJacobi


SolverHelp = {}
AvailableSolvers = {
"Diagonal": True,
"Solver": True,
Expand All @@ -28,9 +26,9 @@
from pymatsolver.direct import Pardiso
AvailableSolvers['Pardiso'] = True
except ImportError:
SolverHelp['Pardiso'] = """PardisoSolver is not working."""
pass

__version__ = '0.0.2'
__author__ = 'Rowan Cockett'
__license__ = 'MIT'
__version__ = '0.0.2'
__author__ = 'Rowan Cockett'
__license__ = 'MIT'
__copyright__ = 'Copyright 2017 Rowan Cockett'

0 comments on commit f80a6cc

Please sign in to comment.