PeriPy, a collaboration between Exeter, Cambridge & the Alan Turing Institute, is a lightweight, open-source and high-performance python package for solving bond-based peridynamics (BBPD) problems in solid mechanics. It is implemented in Python and the performance critical parts are implemented in Cython and PyOpenCL.
PeriPy allows users to write their code in pure Python. Simulations are then executed seamlessly using high performance OpenCL code.
(base)
environmentpython
import pyopencl
pyopencl.get_platforms()
The error pyopencl._cl.LogicError: clGetPlatformIDs failed: PLATFORM_NOT_FOUND_KHR
means that the OpenCL device driver is not correctly installed.
pip install cython
pip install peripy
peripy run example1
on the command lineperipy run example1 --cat
peripy run --list
for a list of examplesperipy run --help
The tests for this project use pytest. To run the tests yourself,
pip install pytest
peripy test
on the command linepytest-cov
and type peripy coverage
on the command line(base)
environmentpython
import pyopencl
pyopencl.get_platforms()
The error pyopencl._cl.LogicError: clGetPlatformIDs failed: PLATFORM_NOT_FOUND_KHR
means that the OpenCL device driver is not correctly installed.
pip install cython
git clone git@github.com:alan-turing-institute/peripy.git
pip install -e .
from the root directory of the repositoryperipy/examples/
. Run the first example by typing python peripy/examples/example1/example.py
The tests for this project use pytest. To run the tests yourself,
pip install -e .
from the root directory of the repositorypip install pytest
pytest
from the root directory of the repositorypytest-cov
and run pytest --cov=./peripy