Test System

The goal of mantaflow's test system is to allow you to easily verify that your compilation is giving the right results. This is done by running a series of increasingly complex scenes, and comparing the outcomes with reference data.

Using Existing Test-data

To verify that you compilation gives the intended results, download the following archive (it contains all test result data files), and unzip it under mantaflow/tools/. If you enabled the DOUBLEPRECISION option when compiling, use the double data below, and the regular one otherwise.

Download   OS Version Description
testdata0_12.tar.gz

All OS

v0.12
test data (float)
testdataDouble0_12.tar.gz

All OS

v0.12
test data (double)
testdata0_11.tar.gz

All OS

v0.11
test data (float)
testdataDouble0_11.tar.gz

All OS

v0.11
test data (double)
testdata0_10.tar.gz

All OS

v0.10
test data (float)
testdataDouble0_10.tar.gz

All OS

v0.10
test data (double)

Running the tests is best done via the command line (under windows we recommend cygwin):

cd <install-path>/mantaflow/tools/tests
python ./runTests.py <path-to-manta-executable>

This will run all test scenes (called test_xxxx.py) in the tests directory, and will compare results with the data from the archive. In the end, a test summary will be shown, ideally it should read:

"Test summary, 132 passed, 0 failed. (from 25 files)."

This means 25 test scenes were run, and the 132 tests contained in them were passed. If any of the tests failed, it is recommended to check the outputs of the test script to see which test failed (and then figure out why it failed). Note that round-off errors can lead to slightly different results over time, causing tests to fail - this is taken into account, and with varying accuracy thresholds. Due to the differences between single and double precision, a separate test data set for double precision exists, which you can download separately above.

Generating Test-data

There are several reasons why you might not want to download and use the test data above. E.g., you only want to ensure your local modifications yield the same results while modifying the code. In such a case, you can generate your own set of test data files by setting the environment variable MANTA_GEN_TEST_DATA to 1, and executing the runTests.py script above.

Visual Tests

Mantaflow has a visual test mode that generates a series of images for higher resolution test cases that can be easliy checked and verified visually. This is handy for more complex, long running simulations. This mode is enabled when the MANTA_VISUAL environment variable is set to 1 when running the runTests.py script. Its value is a resolution multiplier. Set it to 2 or higher to run the simulations with correspondingly more DOFs.