I ask about a Freefem++ code of a Runge-Kutta schema of order 2 if there is one available somewhere?
I used the following code but it doesn’t work:
// Runge - Kutta Scheme of order 2…
func real [ int ] RK2( real [ int ] u, real t)
int N=5 ; // The size of vectors
real [ int ] k0 (N), k1 (N), k2 (N); // vectors of size N.
real [ int ] uold (N);
uold = 0.;
k1 = uold+ k0;
t1 = t + 0.5* dt;
k2 = f(t1,k1);
return u ;
Thank you in advance.