A (sparse) matrix solver for python.
Solving Ax = b should be as easy as:
Ainv = Solver(A)
x = Ainv * b
In pymatsolver we provide a number of wrappers to existing numerical packages. Nothing fancy here.
All solvers work with scipy.sparse
matricies, and a single or multiple right hand sides using numpy
:
We 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 we 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.
From a clean install on Ubuntu:
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
make mumps
This assumes that you have Brew and some python installed (numpy, scipy):
brew install mumps --with-scotch5 --without-mpi
git clone https://github.com/rowanc1/pymatsolver.git
cd pymatsolver
make mumps_mac
If you have problems you may have to go into the Makefile and update the pointers to Lib and Include for the various libraries.
This command is helpful for finding dependencies. You should also take note of have happens when brew installs mumps.
mpicc --showme
Code: https://github.com/simpeg/pymatsolver
Tests: https://travis-ci.org/simpeg/pymatsolver
Bugs & Issues: https://github.com/simpeg/pymatsolver/issues
License: MIT
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。