https://github.com/alan-turing-institute/peripy
Code base for PeriPy, a lightweight, open-source and high-performance package for peridynamic simulations written in Python - a collaboration between Exeter, Cambridge & Turing
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
4 of 5 committers (80.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.8%) to scientific vocabulary
Keywords
Repository
Code base for PeriPy, a lightweight, open-source and high-performance package for peridynamic simulations written in Python - a collaboration between Exeter, Cambridge & Turing
Basic Info
Statistics
- Stars: 58
- Watchers: 6
- Forks: 16
- Open Issues: 14
- Releases: 0
Topics
Metadata Files
README.md
PeriPy
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.
Features
- Easy to use. Get started with the latest documentation at peripy.readthedocs.org
- 2-10x faster than exisiting OpenCL solvers
- 'Outer-loop' applications including uncertainty quantification, optimisation and feature recognition are made possible
- Support for both regular and irregular mesh files. See meshio for the full list of mesh formats
- Support for composite and interface material models
- Support for arbritrary n-linear 'microelastic' damage models
- Simulates force or displacement controlled boundary conditions and initial conditions
- Arbritrary subsets of particles are easily measured for their displacements, damages etc.
- Output files can be viewed in Paraview
- Various 'partial volume correction' algorithms, 'surface correction' algorithms and 'micromodulus functions' are included. The code is easily extended to define your own
- Velocity-Verlet, Euler and Euler-Cromer integrators are included and the code is easily extended to define your own higher order and/or adaptive integrators
Get started (preferred)
Building and Installation
- The package requires Python 3.7+
- Install pyopencl, a build dependency, by following these instructions https://documen.tician.de/pyopencl/misc.html
- To install pyopencl, note that pyopencl may need to be installed from
(base)environment - If using pyopencl on Windows with a CPU (rather than a GPU), first, ensure the C++ build tools for Visual Studio are installed (e.g., see https://youtu.be/KUTVnxCeC50)
- Make sure the OpenCL device driver is installed for your device:
python import pyopencl pyopencl.get_platforms()The errorpyopencl._cl.LogicError: clGetPlatformIDs failed: PLATFORM_NOT_FOUND_KHRmeans that the OpenCL device driver is not correctly installed. - Install cython, a build dependency,
pip install cython - Install PeriPy
pip install peripy
Running examples
- Run the first example by typing
peripy run example1on the command line - You can show the example code by typing
peripy run example1 --cat - Type
peripy run --listfor a list of examples - For usage, type
peripy run --help
Running the tests
The tests for this project use pytest. To run the tests yourself,
- Install pytest using pip
pip install pytest - Type
peripy teston the command line - For coverage install
pytest-covand typeperipy coverageon the command line
Get started from the GitHub repository (for developers)
Building and Installation
- The package requires Python 3.7+
- Install pyopencl, a build dependency, by following these instructions https://documen.tician.de/pyopencl/misc.html
- To install pyopencl, note that pyopencl may need to be installed from
(base)environment - If using pyopencl on Windows with a CPU (rather than a GPU), first, ensure the C++ build tools for Visual Studio are installed (e.g., see https://youtu.be/KUTVnxCeC50)
- Make sure the OpenCL device driver is installed for your device
python import pyopencl pyopencl.get_platforms()The errorpyopencl._cl.LogicError: clGetPlatformIDs failed: PLATFORM_NOT_FOUND_KHRmeans that the OpenCL device driver is not correctly installed. - Install cython, a build dependency,
pip install cython - Clone the repository
git clone git@github.com:alan-turing-institute/peripy.git - Install using pip
pip install -e .from the root directory of the repository
Running examples
- You can find examples of how to use the package under:
peripy/examples/. Run the first example by typingpython peripy/examples/example1/example.py
Running the tests
The tests for this project use pytest. To run the tests yourself,
- If you haven't already, install using pip
pip install -e .from the root directory of the repository - Install pytest using pip
pip install pytest - Run
pytestfrom the root directory of the repository - For coverage install
pytest-covand runpytest --cov=./peripy
Owner
- Name: The Alan Turing Institute
- Login: alan-turing-institute
- Kind: organization
- Email: info@turing.ac.uk
- Website: https://turing.ac.uk
- Repositories: 477
- Profile: https://github.com/alan-turing-institute
The UK's national institute for data science and artificial intelligence.
GitHub Events
Total
- Issues event: 2
- Watch event: 13
- Issue comment event: 2
- Pull request event: 1
- Fork event: 1
Last Year
- Issues event: 2
- Watch event: 13
- Issue comment event: 2
- Pull request event: 1
- Fork event: 1
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Jim Madge | j****e@g****m | 330 |
| bb515 | b****5@c****k | 231 |
| tjdodwell | t****l@e****k | 15 |
| Jim Madge | j****e@t****k | 5 |
| Greg Mingas | g****s@t****k | 4 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 55
- Total pull requests: 49
- Average time to close issues: about 2 months
- Average time to close pull requests: 2 days
- Total issue authors: 11
- Total pull request authors: 5
- Average comments per issue: 0.76
- Average comments per pull request: 0.73
- Merged pull requests: 42
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 2
- Average time to close issues: 2 minutes
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- JimMadge (17)
- gmingas (13)
- bb515 (10)
- mhobbs18 (6)
- tjdodwell (3)
- roozbeh191 (1)
- Gabanzixiaohan (1)
- andrewphilipsmith (1)
- liuzd2017 (1)
- zjin-lcf (1)
- canu-ugur (1)
Pull Request Authors
- JimMadge (25)
- bb515 (19)
- f-rower (2)
- mhobbs18 (2)
- gmingas (1)