diff --git a/regression-tests/driven_cavity_test.sh b/regression-tests/driven_cavity_test.sh index eb91cfbc8294e414413c1a19bc120c9724fe8da2..e10a829d2680ab647ba0f66e0f2e85a70186007e 100755 --- a/regression-tests/driven_cavity_test.sh +++ b/regression-tests/driven_cavity_test.sh @@ -1,16 +1,24 @@ #!/bin/bash +################################# +# Driven Cavity Regression Test +################################# +# build VirtualFluids accordingly to our specific test scenario. +# in this case adding -DUSER_APPS="apps/gpu/LBM/DrivenCavity to the cmake command is not necessary, because the DrivenCavity is added to VirtualFluids by default. mkdir -p build cmake -B build --preset=gpu_make -DCMAKE_CUDA_ARCHITECTURES=75 #-DUSER_APPS="apps/gpu/LBM/DrivenCavity" cd build && make -j 8 && cd .. - +# execute VirtualFluids ./build/bin/DrivenCavity - +# set the path to the produced data PATH_TO_DIR=output/DrivenCavity -PATH_TO_REFERENCE_DIR=regression-tests/reference_data/regression_tests_gpu/DrivenCavity +# set the path to the reference data. +# `regression-tests/reference_data` is fix `regression_tests/gpu/DrivenCavity_2Levels` must match the structure in https://github.com/irmb/test_data: +PATH_TO_REFERENCE_DIR=regression-tests/reference_data/regression_tests/gpu/DrivenCavity_2Levels +# execute fieldcompare (A more comprehensive manual can be found here https://gitlab.com/dglaeser/fieldcompare) fieldcompare dir $PATH_TO_DIR --reference $PATH_TO_REFERENCE_DIR --include-files "*.vtu" \ No newline at end of file diff --git a/regression-tests/regression-tests.sh b/regression-tests/regression-tests.sh index 90d944bf70d5445e9b82bfd1f2232d4df208d563..bd5f19bc13022b3bd437f84297faa27e766eab78 100755 --- a/regression-tests/regression-tests.sh +++ b/regression-tests/regression-tests.sh @@ -1,14 +1,29 @@ #!/bin/bash +################################# +# VirtualFludis regression tests +################################# + + +# 1. Cloning the reference data from github mkdir -p regression-tests/reference_data git clone https://github.com/irmb/test_data regression-tests/reference_data +# 2. set up the python environnement +# by cloning our meshio patch and fieldcompare into a venv python3 -m venv .venv source .venv/bin/activate - pip install rich pip install git+https://github.com/soerenPeters/meshio@update-pyproject-version pip install git+https://gitlab.com/dglaeser/fieldcompare +# 3. Running the specific tests +./regression-tests/driven_cavity_test.sh + + -./regression-tests/driven_cavity_test.sh \ No newline at end of file +# How to add a new regression test? +# 1. setup the specfic simulation and run it to create reference data. +# 2. fork https://github.com/irmb/test_data and create a pull request containing the reference data. +# 3. copy ./regression-tests/driven_cavity_test.sh and adjust the file accordingly to the new test scenario. +# 4. execute this file from here accordingly to line 18. \ No newline at end of file