pynitride.tests.core.test_cython_maths module

Tests the high-performance mathematical methods in cython_maths.

pynitride.tests.core.test_cython_maths.generate_tridiagonal_problem(N)

Generates a random tridiagonal matrix problem (a,b,c,d) for tdma().

The off-diagonals are limited to half of the diagonal in the same row, which guarantees diagonal dominance as required by CFD-Online.

Returns:

a tuple of a,b,c,d.

pynitride.tests.core.test_cython_maths.test_fd12()

Spot-checks fd12() against a couple Nanohub-computed values.

pynitride.tests.core.test_cython_maths.test_fd12p()

Spot-checks fd12p() against a couple Nanohub-computed values.

pynitride.tests.core.test_cython_maths.test_fd_timing(capfd)

Tests how fast the fd12() and fd12() compute large vector inputs.

pynitride.tests.core.test_cython_maths.test_tdma()

Tests tdma() numerically for a random tridiagonal problem.

pynitride.tests.core.test_cython_maths.test_tdma_timing()

Tests how fast tdma() computes a large problem.