3 template <typename F, typename T, typename V>
\r
4 void operator()(F fun, V& x, T t, T tend, T dt)
\r
6 V rhs(x); // Initialize RHS vector
\r
10 dt = tend-t; // Adjust dt for last time step
\r
12 (*fun)(t, x, rhs); // Apply rhs function
\r
13 x.axpy(dt,rhs); // Update stage
\r
14 t += dt; // Next time step
\r