diff --git a/tests/hello481/breakpoints.seer b/tests/hello481/breakpoints.seer index 50ee722..618f56b 100644 --- a/tests/hello481/breakpoints.seer +++ b/tests/hello481/breakpoints.seer @@ -1 +1 @@ -break -source /nas/erniep/Development/seer/tests/hello481/hello481.cpp -line 17 +break -source /nas/erniep/Development/seer/tests/hello481/hello481.cpp -line 81 diff --git a/tests/hello481/hello481.cpp b/tests/hello481/hello481.cpp index 10bcfc4..bb6ebd8 100644 --- a/tests/hello481/hello481.cpp +++ b/tests/hello481/hello481.cpp @@ -1,19 +1,92 @@ -#include +// damped_oscillator +// +// Simulates a damped harmonic oscillator: +// x'' + 2*zeta*omega0*x' + omega0^2*x = 0 +// +// Stores a 4000-point dataset directly into two double arrays: +// X[i] = position at step i +// Y[i] = velocity at step i +// + #include +#include +#include -int main () { +const int N = 4000; // number of data points - double pos[40]; - double vit[40]; +double X[N]; // position array +double Y[N]; // velocity array - double posv = 1.0; +struct State { + double x; // position + double v; // velocity +}; - for (int i=0; i