TestAcousticSolver

Package: kwave.tests.unit Superclasses: matlab.unittest.TestCase

Non-parameterised unit tests for the AcousticSolver class. Use this test class for tests that do not require automatically sweeping over the grid sizes defined in AbstractTestGrid.

Description

Runs the following tests for the AcousticSolver:

  • Verifies that plane wave simulations in 2D and 3D match simulations in 1D. Performed both with constant and nonconstant gridfield variables.
  • Tests that the simulations produce the same results as the legacy code.
  • Verifies than the simulations produce the same result when using the medium class or acoustic medium class
  • Verifies the numerical solution for the pressure when given both an initial velocity and initial pressure in 1D.
  • Verifies the plane waves when an initial velocity is given in 1D, 2D and 3D, with consideration for directional velocity.
  • Verifies automatic creation of Nt and dt when required.
  • Verifies sensorData is initialised when a sensor is defined.
  • Verifies that an error occurs if the medium, source, or sensor grids do not equal the computational grid.