Merged

parent 1535dd83
...@@ -37,13 +37,11 @@ int Euler(double t0, double t1, double dt, double *y0, double *y1, int N, ...@@ -37,13 +37,11 @@ int Euler(double t0, double t1, double dt, double *y0, double *y1, int N,
puts("Error calculating slope."); puts("Error calculating slope.");
return -1; return -1;
} }
printf("%.12e: %.12e,%.12e\n", t, y1[0], y1[1]);
for( i = 0; i < N; i++ ) for( i = 0; i < N; i++ )
y1[i] = y1[i] + dy[i] * dt; y1[i] = y1[i] + dy[i] * dt;
// Value can be printed/logged here // Value can be printed/logged here
printf("%.12e: %.12e,%.12e\n", t, y1[0], y1[1]);
logger(t, N, y1); logger(t, N, y1);
} }
...@@ -132,7 +130,6 @@ int RungeKutta4(double t0, double t1, double dt, double *y0, double *y1, int N, ...@@ -132,7 +130,6 @@ int RungeKutta4(double t0, double t1, double dt, double *y0, double *y1, int N,
} }
// Value can be printed/logged here // Value can be printed/logged here
printf("%.12e: %.12e, %.12e\n", t, y1[0], y1[1]);
logger(t, N, y1); logger(t, N, y1);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment