Introduction#
The aim is to share the learning in optimising particle motion simulation, which includes how to build simulation models in python and how to optimise simulation performance using cython and other means. The main topics covered are Python, C, Numpy and Cython.
Content#
- 1. One-dimensional particle motion simulation
- 2. Two-dimensional particle motion simulation
- 3. Two-dimensional particle motion simulation_Lennard-Jones potential
- 4. NumPy Optimization: Vectorization and Broadcasting
- 5. Trying to change the threads to improve Numpy’s efficiency
- 6. Learn how to use cython
- 7. How to speed up Numpy with Cython
- 8. Speed up 2D particles with Cython
- 9. Methods of Inspection
- 10. Performance comparison (Python & Numpy & Numba & Cython & C)