mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #1170 from akva2/2p
Add 2 phase regression test for flow_ebos and flow_legacy
This commit is contained in:
@@ -21,16 +21,21 @@ set(BASE_RESULT_PATH ${PROJECT_BINARY_DIR}/tests/results)
|
||||
# Details:
|
||||
# - This test class compares output from a simulation to reference files.
|
||||
macro (add_test_compareECLFiles casename filename simulator abs_tol rel_tol prefix dirprefix)
|
||||
if(${ARGC} GREATER 7)
|
||||
set(DIR ${ARGN})
|
||||
else()
|
||||
set(DIR ${casename})
|
||||
endif()
|
||||
set(RESULT_PATH ${BASE_RESULT_PATH}${dirprefix}/${simulator}+${casename})
|
||||
opm_add_test(${prefix}_${simulator}+${filename} NO_COMPILE
|
||||
EXE_NAME ${simulator}
|
||||
DRIVER_ARGS ${OPM_DATA_ROOT}/${casename} ${RESULT_PATH}
|
||||
DRIVER_ARGS ${OPM_DATA_ROOT}/${DIR} ${RESULT_PATH}
|
||||
${CMAKE_BINARY_DIR}/bin
|
||||
${filename}
|
||||
${abs_tol} ${rel_tol}
|
||||
${COMPARE_SUMMARY_COMMAND}
|
||||
${COMPARE_ECL_COMMAND}
|
||||
TEST_ARGS ${OPM_DATA_ROOT}/${casename}/${filename}.DATA )
|
||||
TEST_ARGS ${OPM_DATA_ROOT}/${DIR}/${filename}.DATA )
|
||||
endmacro (add_test_compareECLFiles)
|
||||
|
||||
###########################################################################
|
||||
@@ -94,7 +99,9 @@ set(abs_tol 2e-2)
|
||||
set(rel_tol 1e-5)
|
||||
|
||||
add_test_compareECLFiles(spe1 SPE1CASE2 flow_ebos ${abs_tol} ${rel_tol} compareECLFiles "")
|
||||
add_test_compareECLFiles(spe1_2p SPE1CASE2_2P flow_ebos ${abs_tol} ${rel_tol} compareECLFiles "" spe1)
|
||||
add_test_compareECLFiles(spe1 SPE1CASE2 flow_legacy ${abs_tol} ${rel_tol} compareECLFiles "")
|
||||
add_test_compareECLFiles(spe1_2p SPE1CASE2_2P flow_legacy ${abs_tol} ${rel_tol} compareECLFiles "" spe1)
|
||||
add_test_compareECLFiles(spe1 SPE1CASE1 flow_sequential ${abs_tol} ${rel_tol} compareECLFiles "")
|
||||
add_test_compareECLFiles(spe3 SPE3CASE1 flow_ebos ${abs_tol} ${rel_tol} compareECLFiles "")
|
||||
add_test_compareECLFiles(spe3 SPE3CASE1 flow_legacy ${abs_tol} ${rel_tol} compareECLFiles "")
|
||||
|
||||
@@ -19,7 +19,7 @@ copyToReferenceDir () {
|
||||
}
|
||||
|
||||
tests=${@:2}
|
||||
test -z "$tests" && tests="spe11 spe12 spe3 spe9 norne_init msw_2d_h"
|
||||
test -z "$tests" && tests="spe11 spe12 spe12p spe3 spe9 norne_init msw_2d_h"
|
||||
if grep -q -i "norne " <<< $ghprbCommentBody
|
||||
then
|
||||
if test -d $WORKSPACE/deps/opm-data/norne/flow
|
||||
@@ -55,6 +55,21 @@ for test_name in ${tests}; do
|
||||
EGRID INIT SMSPEC UNRST UNSMRY
|
||||
fi
|
||||
|
||||
if grep -q "spe12p" <<< $test_name
|
||||
then
|
||||
copyToReferenceDir \
|
||||
$configuration/build-opm-simulators/tests/results/flow_ebos+spe1_2p/ \
|
||||
$OPM_DATA_ROOT/spe1/opm-simulation-reference/flow_ebos \
|
||||
SPE1CASE2_2P \
|
||||
EGRID INIT SMSPEC UNRST UNSMRY
|
||||
|
||||
copyToReferenceDir \
|
||||
$configuration/build-opm-simulators/tests/results/flow_legacy+spe1_2p/ \
|
||||
$OPM_DATA_ROOT/spe1/opm-simulation-reference/flow_legacy \
|
||||
SPE1CASE2_2P \
|
||||
EGRID INIT SMSPEC UNRST UNSMRY
|
||||
fi
|
||||
|
||||
if grep -q "msw_2d_h" <<< $test_name
|
||||
then
|
||||
copyToReferenceDir \
|
||||
@@ -133,6 +148,7 @@ then
|
||||
git status | grep "SPE1CASE1" && tests="spe11"
|
||||
git status | grep "SPE1CASE2" && tests="$tests spe12"
|
||||
git status | grep "SPE3CASE1" && tests="$tests spe3"
|
||||
git status | grep "SPE1CASE2_2P" && tests="$tests spe1-2p"
|
||||
git status | grep "SPE9_CP" && tests="$tests spe9"
|
||||
git status | grep "2D_H__" && tests="$tests msw_2d_h"
|
||||
git status | grep "NORNE_ATW2013.INIT" && tests="$tests norne_init"
|
||||
|
||||
Reference in New Issue
Block a user