Package nl.tudelft.simulation.jstats.ode
Class DifferentialEquationTest
java.lang.Object
nl.tudelft.simulation.jstats.ode.DifferentialEquationTest
The test script for the ODE package.
Copyright (c) 2002-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.
- Since:
- 1.5
- Author:
- Peter Jacobs
-
Nested Class Summary
Modifier and TypeClassDescription(package private) class
ODE.(package private) class
Stiff ODE. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
testODE()
tests the differential equation solvers on y' = x.y^(1/3); see F.void
tests the differential equation solvers on the stiff equation y" + 101y' + 100y = 0.
-
Constructor Details
-
DifferentialEquationTest
public DifferentialEquationTest()
-
-
Method Details
-
testODE
@Test public void testODE()tests the differential equation solvers on y' = x.y^(1/3); see F. Scheid, Numerical Analysis, 2nd Edition, p.204 (Schaum Outline Series). for x=1..5, solutions are: 1: 1.0; 2: 2.82843; 3: 7.02113; 4: 14.69694; 5: 27.0. -
testODEStiff
@Test public void testODEStiff()tests the differential equation solvers on the stiff equation y" + 101y' + 100y = 0. This can be split into two equations: y' = p and p' = -100y -101p with y(0) = 1 and p(0) = -1. The exact solution is y(x) = exp(-x). see F. Scheid, Numerical Analysis, 2nd Edition, p.236 (Schaum Outline Series).
-