advance_x and advance_v now replace f instead of writing the result to g.
Removed dead code for spline and advection.