Skip to content

Tests

Regression tests

The regression tests are short decks of regression-test/, checked by check_macro_quantities (sum of the densities, velocity bounds). Each deck is run three times by ctest: with one OpenMP thread, with two threads (_omp) and with two MPI processes (_mpi).

1
2
3
4
cd build-hippoLBM
ctest                     # all the tests
ctest -R couette          # tests whose name matches "couette"
ctest --output-on-failure
Test Case
hippolbm_regression_lbm_poiseuille Poiseuille flow
hippolbm_regression_lbm_couette Couette flow (BGK)
hippolbm_regression_lbm_couette_mrt Couette flow (MRT)
hippolbm_regression_lbm_couette_mrt_bgk_equiv MRT with all rates \(= 1/\tau\), equivalent to BGK
hippolbm_regression_lbm_checkpoint_restart restart of a Couette flow from data/couette_0000003000.dump
hippolbm_regression_lbm_cavite cavity with bounce-back walls
hippolbm_regression_lbm_cavite_wall cavity with a wall obstacle
hippolbm_regression_lbm_diff_pressure pressure-driven flow through an opening
hippolbm_regression_lbm_diff_pressure_complex_test pressure-driven flow, complex geometry
hippolbm_regression_lbm_lid_driven_cavity lid-driven cavity
hippolbm_regression_lbm_prepro_couette (couette/) Couette relaxation force (only with ONIKA_BUILD_hippo_couette)

A typical regression deck:

checker_op:
  - check_macro_quantities:
     density: 27900  # 30x30x31
     tol: 1e-8
     vmin: 0.00
     vmax: 1.00001e-03

global:
   simulation_paraview_freq: -1
   simulation_end_iteration: 100

When adding a feature, add a regression deck and a run_test(<name>) line in regression-test/CMakeLists.txt.

Continuous integration

Three GitHub workflows run on every push:

  • cmake CI: CPU build of onika and hippoLBM with CMake, ctest and code coverage;
  • CUDA CI: CUDA build (compilation only);
  • Spack: installation of hippoLBM with Spack.