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 (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)
PaGMO / PyGMO (version 2.4+. Required for the EO submodule. pagmo)
(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
compile fortran parts:
$ cd fortranBase $ make
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 Mac OS X
The default compiler on OSX uses a clang which does not support OpenMP. Hence compilation might fail. We therefore suggest using Anaconda and install gcc from the conda repository in a virtualenv:
$ 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 $ conda install pip $ conda install gcc $ pip install pygdm2
Alternatively, you can download the latest version and compile it manually without OpenMP support, which should work with the default OSX compiler:
$ python setup.py install --no-openmp
Installation under windows
Via pip
There is a binary for 64bit windows on the pypi repository (tested on Win10). Install via
$ pip install pygdm2
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.3-py2.7-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 406ab8b180654875b15f9e1cb4742f53adda31bb4d94c563ed1ed6d1906e5615 |
|
MD5 | 3052694eb84c4cd2c95c52cd4e52e88f |
|
BLAKE2b-256 | 230be7013bd66b483c2426b0f50b684a840f043165599fc36cc010ce3aac353d |
Hashes for pyGDM2-1.0.3-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce77392a105650ec23f804a278830c5a2274d29f2fa26c23e944493c334c8842 |
|
MD5 | 141f3c99cb69e2d458cbb0c4b5951183 |
|
BLAKE2b-256 | 7182deacba060e392776013e1fb84e19f16abd3a6db27234f1395f7b86ef5099 |