tests.paper.test_plane

Plot the absolute and relative relative errors of different integrators for the \(\xi, v\) plane. See Hindmarsh et al., 2019 fig. 9 Excerpts of these plots are in Hindmarsh et al., 2019 fig. 10 and Hindmarsh et al., 2021 fig. 15.

Classes

class tests.paper.test_plane.TestPlane(methodName='runTest')

Bases: TestCase

FIGSIZE = array([27.2, 15.3])
FIG_PATH = '/home/docs/checkouts/readthedocs.org/user_builds/pttools/checkouts/latest/test-results/figures/integrators'
axs_abs: ndarray
axs_rel: ndarray
grid_fig_abs: Figure
grid_fig_rel: Figure
grid_shape: Tuple[int, int] = (2, 5)
iter_times: Dict[int, float] = {}
mean_abs_diffs: Dict[int, float] = {}
mean_rel_diffs: Dict[int, float] = {}
names: Dict[int, str] = {}
classmethod plot_diff(ax, name, diffs)
Parameters:
  • ax (Axes)

  • name (str)

  • diffs (Dict[int, float])

classmethod plot_perf(ax)
Parameters:

ax (Axes)

classmethod process_output(name, fig, axs, diffs)
Parameters:
ref_data: ndarray
classmethod setUpClass()

Hook method for setting up class fixture before running tests in the class.

Return type:

None

classmethod tearDownClass()

Hook method for deconstructing the class fixture after running all tests in the class.

Return type:

None

test_plane_bdf()
test_plane_dop853()
test_plane_lsoda()
test_plane_numba_lsoda()
test_plane_odeint()
test_plane_radau()
test_plane_rk23()
test_plane_rk45()
validate_plane(method='odeint', rtol=1e-7, i=None, ax=None, perf_iters=10)
Parameters:
  • method (str)

  • rtol (float)

  • i (int)

  • ax (Tuple[int, int])

  • perf_iters (int)