andrewcharles / pyticles Goto Github PK
View Code? Open in Web Editor NEWParticle system code with smooth particle hydrodynamics support
Particle system code with smooth particle hydrodynamics support
======== Pyticles ======== Pyticles is a set of python modules for physical modelling using particles. The main conceptual objects are particles, neighbour lists, boxes and forces. Interfaces to optimised cython modules, and wrapped fortran modules are also provided. For example: properties.py -- computes smooth particle properties using only python c_properties.py -- cython optimisation of properties.py f_properties.py -- calls wrapped Fortran modules Dependencies ------------ Numpy Scipy (ubuntu packages for scipy and numpy are just fine) Cython (sudo apt-get setuptools, easy_install cython) For visualisation modules: Pyglet pygarrayimage (<BS>http://pypi.python.org/pypi/pygarrayimage) rsp-fsp-spac TODO - write complete sph force and rates of change routine. - it can even be in fortran to ease the array copying overhead. - write fortran speed render computation. FORTRAN INTEGRATION NOTES ========================= Files ===== controller.py ------------- Forces, boundary conditions, anything that mutates particles is a subclass of controller. forces.py --------- Each Force class instance contains a reference to two particle systems and a neighbour list. But a neighbour list should contain references to the particles it maps. This looks like a design flaw. The force should operate as a one body or n body force. Given a list of particles, or particle pairs. A force iterates over a neighbour list. neighbour_list.py ----------------- Neighbour lists contain a reference to one or two particle systems. particles.py ------------ Instances of the particle class have attributes that are mostly numpy arrays. The update() method calls the numerical integrator to advance time step. config is a dictionary of configuration options. The ParticleSystem class. The SmoothParticleSystem class. About ===== The main driver is my smooth particle research. There are a number of front end scripts for pyticles: spana.py This is the front end for testing algorithms related to my research. ospana.py This is a front end to the cython and wrapped fortran optimised version of the code. bspana.py Batch front end - no graphics. Writes output to file. pyticles.py This is where the bulk of the work on the interactive gui is going. This doesn't use any SPH code at the moment - any work relevant to any particle system goes here. particle_man.py This is to be an effort to produce a simple game using the pyticles modules. It is pretty much nothing at the moment. vspana.py Opens an output file and views it. Road Map ======== Integrate some elements with lepton. Andrew Charles [email protected] 1. More scripted approach to execution 2. Visualisation in real time 3. Fast prototyping of new algoritms 4. Integration with the fortran code Pyticles uses Pyglet by Alex Holkner. Cython Notes ============ After the success of the simple nbody Cython, I have effectively forked the code by writing particle_module.pyx and forces_module.pyx. At this stage I just want to get a feel for the amount of difference in the code and the amount of speed increase. Later I can think about organising it better. Having trouble with the modules using objects that reference each other. build.sh rebuilds the cython modules. Zoom/Pan/Rotate Notes ===================== Zoom and rotation glScalef(d,d,d)
Yup, none.
Original issue reported on code.google.com by [email protected]
on 20 Dec 2007 at 12:11
3D viewport has been added, with neat trackball supplied by Roger who I
will attribute in full when I have his full name handy.
The various label and other HUD drawing functions mess with the trackball -
need to go through and make sure they leave the opengl state as they found it.
Original issue reported on code.google.com by [email protected]
on 30 Jul 2009 at 7:30
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.