summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-10-06 20:40:41 -0400
committerTavian Barnes <tavianator@gmail.com>2010-10-06 20:40:41 -0400
commitbc0b87a5cb49cda5f79f1f1374c33a26725d2dde (patch)
tree9a749a790aeb7dcd902e49dc8331d76133bc5c26
parent27a904183f0d549cb61bbdc78fe37fc4d7ea414f (diff)
downloadvz-bc0b87a5cb49cda5f79f1f1374c33a26725d2dde.tar.xz
Fix stepsize in tests.
-rw-r--r--tests/Midpoint.cpp4
-rw-r--r--tests/RK4.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/Midpoint.cpp b/tests/Midpoint.cpp
index 9be7bb7..c16fb76 100644
--- a/tests/Midpoint.cpp
+++ b/tests/Midpoint.cpp
@@ -15,7 +15,7 @@ int
main()
{
vZ::MidpointIntegrator integrator(f);
- integrator.y(1.0).x(0.0).h(0.01);
+ integrator.y(1.0).x(0.0).h(0.02);
integrator.integrate(2.0);
@@ -27,7 +27,7 @@ main()
<< "Expected: " << expected << std::endl;
double error = std::fabs(expected - actual)/expected;
- if (error > 3.4e-5) {
+ if (error > 1.4e-4) {
std::cerr << "Error: " << 100.0*error << "%" << std::endl;
return EXIT_FAILURE;
} else {
diff --git a/tests/RK4.cpp b/tests/RK4.cpp
index 7165c76..2090a1e 100644
--- a/tests/RK4.cpp
+++ b/tests/RK4.cpp
@@ -15,7 +15,7 @@ int
main()
{
vZ::RK4Integrator integrator(f);
- integrator.y(1.0).x(0.0).h(0.01);
+ integrator.y(1.0).x(0.0).h(0.04);
integrator.integrate(2.0);
@@ -27,7 +27,7 @@ main()
<< "Expected: " << expected << std::endl;
double error = std::fabs(expected - actual)/expected;
- if (error > 1.7e-10) {
+ if (error > 4.2e-8) {
std::cerr << "Error: " << 100.0*error << "%" << std::endl;
return EXIT_FAILURE;
} else {