From aad2626e0dc6aaff69d804c63499f54535664078 Mon Sep 17 00:00:00 2001 From: Soeren Peters <peters@irmb.tu-bs.de> Date: Thu, 15 Sep 2022 06:50:53 +0000 Subject: [PATCH] add comments --- regression-tests/driven_cavity_test.sh | 14 +++++++++++--- regression-tests/regression-tests.sh | 19 +++++++++++++++++-- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/regression-tests/driven_cavity_test.sh b/regression-tests/driven_cavity_test.sh index eb91cfbc8..e10a829d2 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 90d944bf7..bd5f19bc1 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 -- GitLab