CompSciWeek13

= Numerical Integration + Binary Output Format =
 * Van der Pol Oscillator: $$\ddot u - \mu (1-u^2) \dot u + u = 0$$
 * Implementations in OpenOffice Spreadsheet, GNU ODE, and Python
 * Perturbed initial conditions, Lyapunov exponents, and large deviation principles
 * Working well with others: text
 * Working with machines: binary
 * This is preferable when you have lots and lots of data
 * The relevant numpy methods are x.tofile("file") and x = fromfile("file") -- but save("file", x) and x = load("file") are preferred
 * inspecting binary formats with od
 * [[Media:Integrate.pdf|Lecture Slides]]

GNU ODE Integrator
vanderpol.ode

You can do the substitution with sed and run all dynamics with:

for((i=0;i<10;i++)); do   sed -e "s|%MU|$i|" vanderpol.ode >vanderpol-$i.ode ode -f vanderpol-$i.ode >out-$i.dat </dev/null done

Plotting with Gnuplot
Run with:

gnuplot plot_van.gplot

Working with binary
Example: ELF header

od -t x1 -t c -N 8 /bin/bash

Binary comes in lots of units

Byte ordering on most modern 64-bit processors is little-endian (Intel, AMD). For more info, see.

In an imaginary system where base 10 numbers are encoded by 4-bit nibbles, a 4-digit representation of the number 123 is

3 = 0011 2 = 0010 1 = 0001 0 = 0000

The binary together would read:

0011 0010 0001 0000

Since we have to use 4 digits, the most significant digit is set to all zeros, and goes last. The little end (least significant byte) goes first. Notice that within the 4-bit nibbles, the least-significant bit is still on the right. So the number is encoded using this left-to right (within a digit) and bottom to top (digits within a word) order.

Real binary encoding is just like the above, except that each 'digit' is a byte, so every 8 bits are in order, but the bytes are reversed.

= Basis Functions =
 * Constructing B-splines - tensor method
 * Representing the differentiation operator
 * Solving PDEs using the implicit method
 * [[Media:Basis.pdf|Lecture Slides]]