Cython: Runge-Kutta

The follow set of scripts calculate the response of a specific single-degree-of-freedom system to an arbitrary base input time history, via the Runge-Kutta fourth order method.

The scripts also demonstrate the passing of numpy arrays to the function, which processes the the data and then returns the resulting arrays to the main Python script.

The scripts on this page require the utility module tompy.py

The function is defined in: sdof_rk4.pyx

The setup file is: sdof_rk4_setup.py

The function is complied in command-line mode via: python sdof_rk4_setup.py build_ext –inplace
The main Python script which imports the function is: arbit_rk4_c.py

Tom Irvine

One thought on “Cython: Runge-Kutta

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s