Simple 1D elastic code