Skip to content
Snippets Groups Projects
Commit aad2626e authored by Soeren Peters's avatar Soeren Peters
Browse files

add comments

parent 16147c93
No related branches found
No related tags found
1 merge request!147Add regression test with fieldcompare with corresponding CI job.
#!/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
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment