A python full-field electrodynamical solver, based on the Green dyadic method (volume integral technique in frequency domain).
Project description
pyGDM2 is available on pypi and gitlab.
Detailed documentation with many examples is avaiable at the pyGDM2 documentation website. See also the documentation paper on arXiv (1802.04071)
Requirements
Python
Fortran
Optional Python packages
scipy >= v0.17.0, lower versions supported with restrictions (Strongly recommended. Used for standard solver LU decomposition and several tools. scipy)
matplotlib (Strongly recommended. For all 2D visualization tools. matplotlib)
mpi4py (for MPI parallelized calculation of spectra. mpi4py)
mayavi (for all 3D visualization. mayavi)
PIL (image processing. PIL)
pathos (for multi-threaded generalized propagator operations. pathos)
pytables (v3.x recommended. For hdf5 saving/loading of simulations. pytables)
PaGMO / PyGMO (version 2.4+. Required for the EO submodule. pagmo)
pycuda (tested with version 2018.1, for GPU-based matrix inversion. pyCUDA, for problems during installation with pip, see solution proposed here)
scikit-cuda (tested with version 0.5, for GPU-based matrix inversion. scikit-cuda)
(all available via pip)
Installation under linux
Via pip
Install from pypi repository via
$ pip install pygdm2
Via setup script
The easiest possibility to compile (and install) pyGDM is via the setup-script, which uses the extended distutils from numpy.
To install pyGDM, run in the source directory:
$ python setup.py install
To install to a user-defined location, use the prefix option:
$ python setup.py install --prefix=/some/specific/location
To only compile without installation, use
$ python setup.py build
Manual compilation
clone git:
$ git clone https://gitlab.com/wiechapeter/pyGDM2.git
2.a python 2.7: compile fortran parts:
$ cd fortranBase $ make
2.b python 3.5+:
$ cd fortranBase $ make python3
optional, for system-wide usage add to path and pythonpath, e.g. add following lines to file “/home/USER/.profile”, where “path_of_pyGDM_folder” is the pyGDM installation directory:
PATH="path_of_pyGDM_folder:$PATH" export PATH PYTHONPATH="path_of_pyGDM_folder:$PYTHONPATH" export PYTHONPATH
Installation under windows
For windows, we also recommend Anaconda in which pyGDM can be installed easily via pip. See also the MacOS X instructions, but you can skip all steps for installing the gcc compilers, since the windows version of pyGDM comes as pre-compiled binary package.
Via pip
We provide a 64bit windows binary on the pypi repository (tested on Win7 and Win10). Install via
$ pip install pygdm2
Compile using the Anaconda distribution (tested with anaconda3)
get the repo (e.g. download from gitlab)
install gcc compiler:
$ conda install m2w64-toolchain libpython
compile fortran parts:
$ python setupy.py build
install:
$ python setupy.py install
Installation under Mac OS X
Using the Anaconda distribution
The default compiler on OSX uses a clang which does not support OpenMP. Hence compilation might fail. We therefore suggest using Anaconda (Mac) and install gcc from the conda repository in a virtualenv (Here the example of python2. python3 was not tested on OSX so far):
$ conda create -n python2 python=2.7 anaconda
“anaconda” at the end will copy the whole anaconda distribution to the virtial env. You can omit this option and create a “blank” virtual environment to install only selected packages.
Next activate the virtualenv and install the required software:
$ source activate python2 $ xcode-select --install $ conda install pip $ conda install gcc $ pip install pygdm2
Also make sure you have the latest versions of numpy and scipy:
$ pip install numpy scipy --upgrade
Without Anaconda
Alternatively, you can download the latest version and cEmissionompile it manually without OpenMP support, which should work with the default OSX compiler:
$ python setup.py install --no-openmp
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pyGDM2-1.0.8-py3.5-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dc0ef0075422e7e88c425e0433eb5c3a2ef0461d7c7d679e58ff34a24b235e2 |
|
MD5 | 706b2e3f0a822efc783b777a6285ff29 |
|
BLAKE2b-256 | aa5d3f90f2c8f5384aac2bdd2a3af062d6bd4db566ad919df78fd056b5086791 |
Hashes for pyGDM2-1.0.8-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f150cba2ece346f2c8fd9de9e4796644979b6978930257c29d99cdd8ce43ad2a |
|
MD5 | 2acdaf9125358ee4355d7cb0010d30be |
|
BLAKE2b-256 | ae850344e5809187f8fb0ec825d2b04fcc430b8eaa57d0dc150110e6a5623fcf |
Hashes for pyGDM2-1.0.8-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 415fb6ea2fc4c063b970e2d39235c54b691ef7d6b04c2081fecc19f663d99df8 |
|
MD5 | dbbb4d8ae977f0df96b0f687fa801f78 |
|
BLAKE2b-256 | 10608001875ff72d3756855611a068287f48776257850d6eb528a78a29cef7e9 |
Hashes for pyGDM2-1.0.8-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fff0961f3a1dffaf81299fb38633955a9960d4542333956dd157013d19741dc5 |
|
MD5 | 082a5764391b258da9a72965a7e8ffc3 |
|
BLAKE2b-256 | 067d49be3ffc3bd1eb93318f1fd8b0a3bf225cd2e9925dc220ac6d803907f6ef |
Hashes for pyGDM2-1.0.8-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcc187975f3569b35b7290ff4885be51b0676bd55254a3cb38d5d44073d76694 |
|
MD5 | b4e8a05d27a917ce4649482d71aa7e34 |
|
BLAKE2b-256 | 2ef77844ac52009683490882578e6ba21668fbfe3f46930619772727a6070dc1 |