Skip to content
rjleveque edited this page Feb 10, 2012 · 11 revisions

Workshop Webpage

Group Organization Pages

AMR

Manycore

Geo

Implicit Methods

DG

Viz/Steering

WENO

Documentation useful this week:

Pointers-to-documentation

git tutorial documentation

cython tutorial documentation

  • Cython webpage -- cython is the newest most talked about wrapper, but only works for C/C++ to Python. Its real value is not as a wrapper, but as a Python -> C/C++ code generator. Since this involves wrapping it also serves that purpose well too.
  • C++ Cython basics

Other wrapping tools

  • ctypes -- ctypes is fragile but a simple standard that doesn't require another dependency from Python.
  • SWIG -- SWIG is a huge tool that works (mostly) automatically. Unfortunately it generates code that only a mother could love.
  • SIP -- a smaller version of SWIG only targetting C/C++ and Python.
  • PyCXX -- never used but recommended to me 2 min before tutorial.
  • Boost.Py -- good luck!

Tools for embedding snippets of C/C++ in Python

These tools accel at giving users a simple interface to creating a c functions to run over grids many times faster than allowed in Python.

  • Instant - embeds one line of C/C++ using SWIG and Distutils
  • Weave - scipy's version of Instant (beware this is completely unsupported at this point)

MATHEMATICAL EQUATIONS

Page files may contain mathematic equations in TeX syntax that will be somewhat reasonably typeset into the expected output using an image renderer.

Block-style example:

\[ P(E) = {n \choose k} p^k (1-p)^{ n-k} \]

Inline example:

The Pythagorean theorem is \( a^2 + b^2 = c^2 \).
Clone this wiki locally