55 template <
class X,
class F,
class dX>
60 void advance(
double& a_time,
double& a_dt, X& a_state);
67 template <
class X,
class F,
class dX>
70 double sixth = 1, third=1, half = 1;
71 sixth/=6; third/=3; half/=2;
73 m_delta.init(a_state);
75 m_f(m_k, a_time, a_dt, a_state);
76 m_delta.increment(sixth, m_k);
78 m_f(m_k, a_time+half*a_dt, a_dt, a_state);
79 m_delta.increment(third, m_k);
81 m_f(m_k, a_time+half*a_dt, a_dt, a_state);
82 m_delta.increment(third, m_k);
83 m_f(m_k, a_time+a_dt, a_dt, a_state);
84 m_delta.increment(sixth, m_k);
85 a_state.increment(m_delta);
90 #endif //end include guard Definition: Proto_Box.H:11
Generic Explicit RK4 Algorithm.
Definition: Proto_RK4.H:56