diff --git a/.gitlab-ci/default.yml b/.gitlab-ci/default.yml index 6b04a76eb5af025a9f1f30dbb4ec837314ebf63a..195b0c83d2dea9700e440f39ed6836ae1da818fa 100644 --- a/.gitlab-ci/default.yml +++ b/.gitlab-ci/default.yml @@ -92,7 +92,12 @@ select tests: stage: select script: - | - if [[ -n "$MR_TARGET_BRANCH_NAME" ]]; then + if [[ -n "$DUMUX_SKIP_TEST_SELECTION" ]]; then + echo "Skipping test selection, build/test stages will consider all tests!" + touch affectedtests.json + touch changedfiles.txt + + elif [[ -n "$MR_TARGET_BRANCH_NAME" ]]; then echo "Detecting changes w.r.t to target branch '$MR_TARGET_BRANCH_NAME'" python3 bin/testing/getchangedfiles.py --outfile changedfiles.txt \ --target-tree origin/$MR_TARGET_BRANCH_NAME diff --git a/bin/testing/fuzzycomparedata.py b/bin/testing/fuzzycomparedata.py index ce5133fbb5aaedf3662d597eb9997c64a80d5113..21a75baed68657a4e9c53245be126990bb9daad1 100644 --- a/bin/testing/fuzzycomparedata.py +++ b/bin/testing/fuzzycomparedata.py @@ -11,6 +11,10 @@ import json import sys from fuzzycomparevtu import isFuzzyEqualText +# Note: these issues can be improved on by factoring out functions +# but we ignore it for know ("legacy code") +# pylint: disable=too-many-arguments,too-many-locals,too-many-branches,too-many-statements + def compareData( dataFile1, @@ -19,8 +23,9 @@ def compareData( absolute=1.5e-7, relative=1e-2, zeroValueThreshold=None, + ignoreFields=None, verbose=True, -): # pylint: disable=too-many-arguments +): """take two data files and compare them. Returns an exit key as returnvalue. Arguments: @@ -40,6 +45,8 @@ def compareData( A dictionary of parameter value pairs that set the threshold under which a number is treated as zero for a certain parameter. Use this parameter if you have to avoid comparisons of very small numbers for a certain parameter. + ignoreFields: list + A list of field names to be ignored in the comparison verbose : bool If the script should produce informative output. Enabled by default as the details give the tester a lot more information on why tests fail. @@ -54,6 +61,11 @@ def compareData( zeroValueThreshold = zeroValueThreshold or {} + # implement ignoring fields by setting a very high threshold + if ignoreFields is not None: + for field in ignoreFields: + zeroValueThreshold[field] = 1e100 + # construct element tree from data files with open(dataFile1, "r") as data1: data1 = list(csv.reader(data1, delimiter=delimiter)) @@ -128,6 +140,12 @@ if __name__ == "__main__": 'e.g. {"vel":1e-7,"delP":1.0}' ), ) + parser.add_argument( + "-i", + "--ignore", + nargs="+", + help=("Space separated list of fields to ignore in the comparison"), + ) args = vars(parser.parse_args()) sys.exit( @@ -139,5 +157,6 @@ if __name__ == "__main__": args["relative"], args["zeroThreshold"], args["verbose"], + args["ignore"], ) ) diff --git a/bin/testing/fuzzycomparevtu.py b/bin/testing/fuzzycomparevtu.py index 49df8ed8c5a95aa32bbc9a69e49a8dc029f8901a..99be77b0a34aa3fd2f5ed3fa717d5a402627b93c 100644 --- a/bin/testing/fuzzycomparevtu.py +++ b/bin/testing/fuzzycomparevtu.py @@ -19,7 +19,15 @@ import functools # pylint: disable=too-many-arguments,too-many-locals,too-many-branches,too-many-statements -def compareVTK(vtk1, vtk2, absolute=1.5e-7, relative=1e-2, zeroValueThreshold=None, verbose=True): +def compareVTK( + vtk1, + vtk2, + absolute=1.5e-7, + relative=1e-2, + zeroValueThreshold=None, + ignoreFields=None, + verbose=True, +): """take two vtk files and compare them. Returns an exit key as returnvalue. Arguments: @@ -41,6 +49,8 @@ def compareVTK(vtk1, vtk2, absolute=1.5e-7, relative=1e-2, zeroValueThreshold=No A dictionary of parameter value pairs that set the threshold under which a number is treated as zero for a certain parameter. Use this parameter if you have to avoid comparisons of very small numbers for a certain parameter. + ignoreFields: list + A list of field names to be ignored in the comparison verbose : bool If the script should produce informative output. Enabled by default as the details give the tester a lot more information on why tests fail. @@ -54,6 +64,11 @@ def compareVTK(vtk1, vtk2, absolute=1.5e-7, relative=1e-2, zeroValueThreshold=No zeroValueThreshold = zeroValueThreshold or {} + # implement ignoring fields by setting a very high threshold + if ignoreFields is not None: + for field in ignoreFields: + zeroValueThreshold[field] = 1e100 + # convert parallel vtu to sequential vtu if necessary convertedFromParallelVtu = False if vtk1.endswith(".pvtu"): @@ -668,6 +683,12 @@ if __name__ == "__main__": 'e.g. {"vel":1e-7,"delP":1.0}' ), ) + parser.add_argument( + "-i", + "--ignore", + nargs="+", + help=("Space separated list of fields to ignore in the comparison"), + ) parser.add_argument("-v", "--verbose", dest="verbose", action="store_true") parser.add_argument("--no-verbose", dest="verbose", action="store_false") parser.set_defaults(verbose=True) @@ -681,5 +702,6 @@ if __name__ == "__main__": args["relative"], args["zeroThreshold"], args["verbose"], + args["ignore"], ) ) diff --git a/bin/testing/runtest.py b/bin/testing/runtest.py index dc18f84b3f5d9cd924815e9ce2a45d8b4da62b1a..b8ade4dc9a55960d89ce98f787e555d5ae5c430a 100755 --- a/bin/testing/runtest.py +++ b/bin/testing/runtest.py @@ -11,8 +11,130 @@ import os import sys import subprocess import json -from fuzzycomparevtu import compareVTK -from fuzzycomparedata import compareData + + +try: + from fieldcompare import FieldDataComparator, protocols, DefaultFieldComparisonCallback + from fieldcompare.mesh import MeshFieldsComparator + from fieldcompare.predicates import DefaultEquality, ScaledTolerance + from fieldcompare.io import read_as + + # pylint: disable=too-many-arguments + def makePredicateSelector( + relThreshold, + absThreshold, + zeroValueThreshold, + sourceFieldNameTransform=lambda name: name, + ): + """Create a predicate selector for fieldcompare emulates the Dumux behaviour""" + + def _selector(sourceField: protocols.Field, _: protocols.Field) -> protocols.Predicate: + sourceFieldName = sourceFieldNameTransform(sourceField.name) + absTol = zeroValueThreshold.get( + sourceFieldName, + ScaledTolerance(base_tolerance=absThreshold), + ) + return DefaultEquality(abs_tol=absTol, rel_tol=relThreshold) + + return _selector + + def fieldcompareMeshData( + source, + ref, + absThreshold=0.0, + relThreshold=1e-7, + zeroValueThreshold=None, + ignoreFields=None, + ): + """Compares mesh data with the fieldcompare library""" + + print(f"-- Comparing {source} and {ref}") + + zeroValueThreshold = zeroValueThreshold or {} + if zeroValueThreshold: + print(f"-- Using the following absolute thresholds: {zeroValueThreshold}") + + # read the files + sourceFields = read_as("mesh", source) + referenceFields = read_as("mesh", ref) + + # hard-code some values for the mesh comparisons (as for Dumux legacy backend) + sourceFields.domain.set_tolerances(abs_tol=ScaledTolerance(1e-6), rel_tol=1.5e-7) + referenceFields.domain.set_tolerances(abs_tol=ScaledTolerance(1e-6), rel_tol=1.5e-7) + + ignoreFields = ignoreFields or [] + compare = MeshFieldsComparator( + source=sourceFields, + reference=referenceFields, + field_exclusion_filter=lambda name: name in ignoreFields, + ) + result = compare( + predicate_selector=makePredicateSelector( + relThreshold=relThreshold, + absThreshold=absThreshold, + zeroValueThreshold=zeroValueThreshold, + ), + fieldcomp_callback=DefaultFieldComparisonCallback(verbosity=1), + reordering_callback=lambda msg: print(f"-- {msg}"), + ) + + print(f"-- Summary: {result.status} ({result.report})\n") + + if not result: + return 1 + return 0 + + def fieldcompareCSVData( + source, + ref, + delimiter, + absThreshold=0.0, + relThreshold=1e-7, + zeroValueThreshold=None, + ignoreFields=None, + ): + """Compares CSV data with the fieldcompare library""" + + print(f"-- Comparing {source} and {ref}") + + zeroValueThreshold = zeroValueThreshold or {} + if zeroValueThreshold: + print(f"-- Using the following absolute thresholds: {zeroValueThreshold}") + + sourceFields = read_as("dsv", source, delimiter=delimiter, use_names=False) + referenceFields = read_as("dsv", ref, delimiter=delimiter, use_names=False) + + ignoreFields = ignoreFields or [] + compare = FieldDataComparator( + source=sourceFields, + reference=referenceFields, + field_exclusion_filter=lambda name: name in ignoreFields, + ) + result = compare( + predicate_selector=makePredicateSelector( + relThreshold=relThreshold, + absThreshold=absThreshold, + zeroValueThreshold=zeroValueThreshold, + sourceFieldNameTransform=lambda name: f"row {float(name.strip('field_'))}", + ), + fieldcomp_callback=DefaultFieldComparisonCallback(verbosity=1), + ) + + print(f"-- Summary: {result.status} ({result.report})\n") + + if not result: + return 1 + return 0 + + BACKEND = "fieldcompare" + + +# fall back to Dumux legacy backend if we don't have fieldcompare +except ImportError: + from fuzzycomparevtu import compareVTK as fieldcompareMeshData + from fuzzycomparedata import compareData as fieldcompareCSVData + + BACKEND = "legacy" def readCmdParameters(): @@ -70,6 +192,12 @@ def readCmdParameters(): ' a parameter as a python dict e.g. {"vel":1e-7,"delP":1.0}' ), ) + parser.add_argument( + "-i", + "--ignore", + nargs="+", + help=("Space separated list of fields to ignore in the comparison"), + ) args = vars(parser.parse_args()) # check parameters @@ -98,69 +226,102 @@ def readCmdParameters(): return args +def _exactComparison(args): + """Exact comparison driver""" + returnCode = 0 + for i in range(0, len(args["files"]) // 2): + print("\nExact comparison...") + result = subprocess.call(["diff", args["files"][i * 2], args["files"][(i * 2) + 1]]) + if result: + returnCode = 1 + return returnCode + + +def _fuzzyMeshComparison(args): + """Fuzzy mesh comparison driver""" + numFailed = 0 + for i in range(0, len(args["files"]) // 2): + print(f"\nFuzzy data comparison with {BACKEND} backend") + source, ref = args["files"][i * 2], args["files"][(i * 2) + 1] + if "reference" in source and "reference" not in ref: + source, ref = ref, source + relThreshold = args["relative"] + absThreshold = args["absolute"] + zeroValueThreshold = args["zeroThreshold"] + ignoreFields = args["ignore"] + numFailed += fieldcompareMeshData( + source, + ref, + absThreshold, + relThreshold, + zeroValueThreshold, + ignoreFields, + ) + + return int(numFailed > 0) + + +def _fuzzyDataComparison(args): + """Fuzzy data comparison driver""" + numFailed = 0 + for i in range(0, len(args["files"]) // 2): + print(f"\nFuzzy data comparison with {BACKEND} backend") + source, ref = args["files"][i * 2], args["files"][(i * 2) + 1] + if "reference" in source and "reference" not in ref: + source, ref = ref, source + delimiter = args["delimiter"] + relThreshold = args["relative"] + absThreshold = args["absolute"] + zeroValueThreshold = args["zeroThreshold"] + ignoreFields = args["ignore"] + numFailed += fieldcompareCSVData( + source, + ref, + delimiter, + absThreshold, + relThreshold, + zeroValueThreshold, + ignoreFields, + ) + + return int(numFailed > 0) + + +def _scriptComparison(args): + """Script comparison driver""" + returnCode = 0 + for i in range(0, len(args["files"]) // 2): + print(f"\n{args['script']} comparison") + result = subprocess.call(args["script"], args["files"][i * 2], args["files"][(i * 2) + 1]) + if result: + returnCode = 1 + return returnCode + + def runRegressionTest(args): """Run regression test scripts against reference data""" # exact comparison? if args["script"] == ["exact"]: - returnCode = 0 - for i in range(0, len(args["files"]) // 2): - print("\nExact comparison...") - result = subprocess.call(["diff", args["files"][i * 2], args["files"][(i * 2) + 1]]) - if result: - returnCode = 1 - sys.exit(returnCode) + sys.exit(_exactComparison(args)) - # fuzzy comparison? + # fuzzy mesh comparison? elif args["script"] == ["fuzzy"] or args["script"] == [ os.path.dirname(os.path.abspath(__file__)) + "/fuzzycomparevtu.py" ]: - returnCode = 0 - for i in range(0, len(args["files"]) // 2): - print("\nFuzzy comparison...") - result = compareVTK( - args["files"][i * 2], - args["files"][(i * 2) + 1], - relative=args["relative"], - absolute=args["absolute"], - zeroValueThreshold=args["zeroThreshold"], - ) - if result: - returnCode = 1 - sys.exit(returnCode) + sys.exit(_fuzzyMeshComparison(args)) - # fuzzy comparison of data sets? + # fuzzy comparison of CSV-like data sets? elif args["script"] == ["fuzzyData"]: - returnCode = 0 - for i in range(0, len(args["files"]) // 2): - print("\nFuzzy data comparison...") - result = compareData( - args["files"][i * 2], - args["files"][(i * 2) + 1], - args["delimiter"], - relative=args["relative"], - absolute=args["absolute"], - zeroValueThreshold=args["zeroThreshold"], - ) - if result: - returnCode = 1 - sys.exit(returnCode) + sys.exit(_fuzzyDataComparison(args)) # other script? else: - returnCode = 0 - for i in range(0, len(args["files"]) // 2): - print(f"\n{args['script']} comparison...") - result = subprocess.call( - args["script"], args["files"][i * 2], args["files"][(i * 2) + 1] - ) - if result: - returnCode = 1 - sys.exit(returnCode) + sys.exit(_scriptComparison(args)) def runTest(): - """Run a DuMux test""" + """DuMux test driver""" args = readCmdParameters() diff --git a/examples/embedded_network_1d3d/CMakeLists.txt b/examples/embedded_network_1d3d/CMakeLists.txt index d0ea6fd723dedcd8336e7ebb1cc2c34e8709c7cc..587595a1f05c189de700e6617836d2f1ebd71373 100644 --- a/examples/embedded_network_1d3d/CMakeLists.txt +++ b/examples/embedded_network_1d3d/CMakeLists.txt @@ -17,6 +17,6 @@ dumux_add_test( COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzyData --delimiter " " --files ${CMAKE_SOURCE_DIR}/test/references/example_embedded_network_1d3d-reference.dat - ${CMAKE_CURRENT_BINARY_DIR}/clearance_tracer_amounts.dat.dat + ${CMAKE_CURRENT_BINARY_DIR}/clearance_tracer_amounts.dat --command "${CMAKE_CURRENT_BINARY_DIR}/example_embedded_network_1d3d" ) diff --git a/test/freeflow/shallowwater/dambreak/CMakeLists.txt b/test/freeflow/shallowwater/dambreak/CMakeLists.txt index ee23f9b411a18dbe32a63ef70e4e5a2d0e49a6df..776040ff2a6e690d31925c0db43afb572723caab 100644 --- a/test/freeflow/shallowwater/dambreak/CMakeLists.txt +++ b/test/freeflow/shallowwater/dambreak/CMakeLists.txt @@ -23,6 +23,7 @@ dumux_add_test(NAME test_shallowwater_dambreak_parallel CMD_ARGS --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/test_ff_shallowwater_dambreak-reference.vtu ${CMAKE_CURRENT_BINARY_DIR}/s0002-dambreak_parallel-00001.pvtu - --zeroThreshold {"velocityY":1e-14,"process rank":100} + --zeroThreshold {"velocityY":1e-14} + --ignore "process rank" --command "${MPIEXEC} -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_shallowwater_dambreak params.input -Problem.Name dambreak_parallel") diff --git a/test/multidomain/poromechanics/el2p/CMakeLists.txt b/test/multidomain/poromechanics/el2p/CMakeLists.txt index f0e1e2f1e6c426164dddd473bd0294c62642a7ae..635de4e58bbd683926dbae35379a5b6ffc16fd82 100644 --- a/test/multidomain/poromechanics/el2p/CMakeLists.txt +++ b/test/multidomain/poromechanics/el2p/CMakeLists.txt @@ -12,5 +12,4 @@ dumux_add_test(NAME test_md_poromechanics_el2p ${CMAKE_SOURCE_DIR}/test/references/test_md_poromechanics_el2p_poroelastic-reference.vtu ${CMAKE_CURRENT_BINARY_DIR}/test_md_poromechanics_el2p_poroelastic-00010.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_md_poromechanics_el2p params.input - -Vtk.OutputName test_md_poromechanics_el2p" - --zeroThreshold {"u":1e-14}) + -Vtk.OutputName test_md_poromechanics_el2p") diff --git a/test/porenetwork/2p/static/CMakeLists.txt b/test/porenetwork/2p/static/CMakeLists.txt index b0602ff1ee1b101ea5a9d8f6ba490d275103ba87..392568f7b3ff572b25529f7704d9b259347ca6c8 100644 --- a/test/porenetwork/2p/static/CMakeLists.txt +++ b/test/porenetwork/2p/static/CMakeLists.txt @@ -6,6 +6,7 @@ dumux_add_test(NAME test_pnm_2p_static COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMAKE_GUARD "( dune-foamgrid_FOUND AND HAVE_UMFPACK )" CMD_ARGS --script fuzzyData + --delimiter " " --files ${CMAKE_SOURCE_DIR}/test/references/test_pnm_2p_static-reference.txt ${CMAKE_CURRENT_BINARY_DIR}/test_pnm_2p_static_pc-s-curve.txt --command "${CMAKE_CURRENT_BINARY_DIR}/test_pnm_2p_static") diff --git a/test/porousmediumflow/1p/nonisothermal/CMakeLists.txt b/test/porousmediumflow/1p/nonisothermal/CMakeLists.txt index 9b2594e883040fe3de10ff0f124eea04a6e8301c..0454f5f201a168b747674d9f431026c216571679 100644 --- a/test/porousmediumflow/1p/nonisothermal/CMakeLists.txt +++ b/test/porousmediumflow/1p/nonisothermal/CMakeLists.txt @@ -10,7 +10,7 @@ dumux_add_test(NAME test_1pni_conduction_box --files ${CMAKE_SOURCE_DIR}/test/references/test_1pni_conduction_box-reference.vtu ${CMAKE_CURRENT_BINARY_DIR}/test_1pni_conduction_box-00005.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pni_conduction_box params_conduction.input -Problem.Name test_1pni_conduction_box" - --zeroThreshold {"velocity_liq":1e-8}) + --zeroThreshold {"velocity_liq \(m/s\)":1e-8}) add_executable(test_1pni_convection_box EXCLUDE_FROM_ALL main.cc) target_compile_definitions(test_1pni_convection_box PUBLIC TYPETAG=OnePNIConvectionBox) @@ -23,7 +23,7 @@ dumux_add_test(NAME test_1pni_convection_box --files ${CMAKE_SOURCE_DIR}/test/references/test_1pni_convection_box-reference.vtp ${CMAKE_CURRENT_BINARY_DIR}/test_1pni_convection_box-00009.vtp --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pni_convection_box params_convection.input -Problem.Name test_1pni_convection_box" - --zeroThreshold {"velocity":1e-15}) + --zeroThreshold {"velocity_liq \(m/s\)":1e-15}) dumux_add_test(NAME test_1pni_convection_box_restart TARGET test_1pni_convection_box @@ -33,7 +33,7 @@ dumux_add_test(NAME test_1pni_convection_box_restart --files ${CMAKE_SOURCE_DIR}/test/references/test_1pni_convection_box-reference.vtp ${CMAKE_CURRENT_BINARY_DIR}/test_1pni_convection_box_restart-00004.vtp --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pni_convection_box params_convection.input -Problem.Name test_1pni_convection_box_restart -TimeLoop.DtInitial 1000 -Restart.Time 16768 -Restart.File test_1pni_convection_box-00006.vtp" - --zeroThreshold {"velocity":1e-15}) + --zeroThreshold {"velocity_liq \(m/s\)":1e-15}) # the restart test has to run after the test that produces the corresponding vtu file set_tests_properties(test_1pni_convection_box_restart PROPERTIES DEPENDS test_1pni_convection_box) @@ -47,7 +47,7 @@ dumux_add_test(NAME test_1pni_conduction_tpfa --files ${CMAKE_SOURCE_DIR}/test/references/test_1pni_conduction_cc-reference.vtu ${CMAKE_CURRENT_BINARY_DIR}/test_1pni_conduction_tpfa-00005.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pni_conduction_tpfa params_conduction.input -Problem.Name test_1pni_conduction_tpfa" - --zeroThreshold {"velocity":1e-8}) + --zeroThreshold {"velocity_liq \(m/s\)":1e-8}) dumux_add_test(NAME test_1pni_convection_tpfa LABELS porousmediumflow 1p 1pni diff --git a/test/porousmediumflow/1pnc/1p2c/nonisothermal/conduction/CMakeLists.txt b/test/porousmediumflow/1pnc/1p2c/nonisothermal/conduction/CMakeLists.txt index 30fcb84cf47dcd3411f201a1005978abeaf0cd73..faa7b1a44cd9e94826aff58c54552fbd40b7b96c 100644 --- a/test/porousmediumflow/1pnc/1p2c/nonisothermal/conduction/CMakeLists.txt +++ b/test/porousmediumflow/1pnc/1p2c/nonisothermal/conduction/CMakeLists.txt @@ -24,7 +24,7 @@ dumux_add_test(NAME test_1p2cni_conduction_tpfa --files ${CMAKE_SOURCE_DIR}/test/references/test_1p2cni_conduction_tpfa-reference.vtu ${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_conduction_tpfa-00005.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_conduction_tpfa params.input -Problem.Name test_1p2cni_conduction_tpfa" - --zeroThreshold {"velocity_liq \(m/s\)_0":1e-9}) + --zeroThreshold {"velocity_liq \(m/s\)":1e-9}) dumux_add_test(NAME test_1p2cni_conduction_mpfa LABELS porousmediumflow 1p2c 1p2cni @@ -36,4 +36,4 @@ dumux_add_test(NAME test_1p2cni_conduction_mpfa --files ${CMAKE_SOURCE_DIR}/test/references/test_1p2cni_conduction_tpfa-reference.vtu ${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_conduction_mpfa-00005.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_conduction_mpfa params.input -Problem.Name test_1p2cni_conduction_mpfa" - --zeroThreshold {"velocity_liq \(m/s\)_0":1e-9}) + --zeroThreshold {"velocity_liq \(m/s\)":1e-9}) diff --git a/test/porousmediumflow/1pnc/1p2c/nonisothermal/convection/CMakeLists.txt b/test/porousmediumflow/1pnc/1p2c/nonisothermal/convection/CMakeLists.txt index d86012463a85e799e021a070c4ff11866f01a283..f0567938d8aedbd5acf7974c942a5e6e0fafe9d7 100644 --- a/test/porousmediumflow/1pnc/1p2c/nonisothermal/convection/CMakeLists.txt +++ b/test/porousmediumflow/1pnc/1p2c/nonisothermal/convection/CMakeLists.txt @@ -24,7 +24,7 @@ dumux_add_test(NAME test_1p2cni_convection_tpfa --files ${CMAKE_SOURCE_DIR}/test/references/test_1p2cni_convection_tpfa-reference.vtu ${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_convection_tpfa-00009.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_convection_tpfa params.input -Problem.Name test_1p2cni_convection_tpfa" - --zeroThreshold {"velocity_liq \(m/s\)_0":1e-9}) + --zeroThreshold {"velocity_liq \(m/s\)":1e-9}) dumux_add_test(NAME test_1p2cni_convection_mpfa LABELS porousmediumflow 1p2c 1p2cni @@ -36,4 +36,4 @@ dumux_add_test(NAME test_1p2cni_convection_mpfa --files ${CMAKE_SOURCE_DIR}/test/references/test_1p2cni_convection_tpfa-reference.vtu ${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_convection_mpfa-00009.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1p2cni_convection_mpfa params.input -Problem.Name test_1p2cni_convection_mpfa" - --zeroThreshold {"velocity_liq \(m/s\)_0":1e-9}) + --zeroThreshold {"velocity_liq \(m/s\)":1e-9}) diff --git a/test/porousmediumflow/1pnc/1p3c/CMakeLists.txt b/test/porousmediumflow/1pnc/1p3c/CMakeLists.txt index 82bdac1b4074ee99489b7d236296d620b5d3d9ff..42ef9875d0069454a1c53110b228aa1a815570a9 100644 --- a/test/porousmediumflow/1pnc/1p3c/CMakeLists.txt +++ b/test/porousmediumflow/1pnc/1p3c/CMakeLists.txt @@ -20,4 +20,4 @@ dumux_add_test(NAME test_1pnc_maxwellstefan_box --files ${CMAKE_SOURCE_DIR}/test/references/test_1pnc_maxwellstefan_box-reference.vtu ${CMAKE_CURRENT_BINARY_DIR}/test_1pnc_maxwellstefan_box-00005.vtu --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnc_maxwellstefan_box params.input -Problem.Name test_1pnc_maxwellstefan_box" - --zeroThreshold {"velocity_Gas \(m/s\)":1e-13}) + --zeroThreshold {"velocity_Gas \(m/s\)":1e-12}) diff --git a/test/porousmediumflow/richards/benchmarks/CMakeLists.txt b/test/porousmediumflow/richards/benchmarks/CMakeLists.txt index 55e48c9b6deec70859adfd6641147cd2aedf5c63..2abe57f7dcd7c10954f0d32dbe657f263051faec 100644 --- a/test/porousmediumflow/richards/benchmarks/CMakeLists.txt +++ b/test/porousmediumflow/richards/benchmarks/CMakeLists.txt @@ -20,6 +20,7 @@ dumux_add_test(NAME test_richards_benchmark_infiltration_tpfa COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzyData --relative 0.05 + --delimiter " " --files ${CMAKE_SOURCE_DIR}/test/references/test_richards_benchmark_tpfa_theta_deltaeta_ana_loam_0-reference.dat ${CMAKE_CURRENT_BINARY_DIR}/theta_deltaeta_ana_loam_0.dat ${CMAKE_SOURCE_DIR}/test/references/test_richards_benchmark_tpfa_theta_deltaeta_num_loam_1-reference.dat @@ -54,6 +55,7 @@ dumux_add_test(NAME test_richards_benchmark_evaporation_tpfa TIMEOUT 3600 COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py CMD_ARGS --script fuzzyData + --delimiter " " --files ${CMAKE_SOURCE_DIR}/test/references/test_richards_benchmark_tpfa_rate_analytical_clay-reference.dat ${CMAKE_CURRENT_BINARY_DIR}/rate_analytical_clay.dat ${CMAKE_SOURCE_DIR}/test/references/test_richards_benchmark_tpfa_rate_analytical_loam1-reference.dat diff --git a/test/references/test_1pni_conduction_box-reference.vtu b/test/references/test_1pni_conduction_box-reference.vtu index 3e62d163f1f9f7fc790a4af58c6107ec3ffb4651..552726a4872d95b8efe2514a4906d8992bc888db 100644 --- a/test/references/test_1pni_conduction_box-reference.vtu +++ b/test/references/test_1pni_conduction_box-reference.vtu @@ -2,7 +2,7 @@ <VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian"> <UnstructuredGrid> <Piece NumberOfCells="200" NumberOfPoints="402"> - <PointData Scalars="p" Vectors="velocity_liq"> + <PointData Scalars="p" Vectors="velocity_liq (m/s)"> <DataArray type="Float32" Name="p" NumberOfComponents="1" format="ascii"> 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 @@ -39,7 +39,7 @@ 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 </DataArray> - <DataArray type="Float32" Name="velocity_liq" NumberOfComponents="3" format="ascii"> + <DataArray type="Float32" Name="velocity_liq (m/s)" NumberOfComponents="3" format="ascii"> -1.17342e-09 8.52243e-19 0 -1.16807e-09 1.68217e-18 0 -1.17342e-09 8.52243e-19 0 -1.16807e-09 1.68217e-18 0 -1.15247e-09 3.1127e-18 0 -1.15247e-09 3.1127e-18 0 -1.1275e-09 1.84323e-18 0 -1.1275e-09 1.84323e-18 0 -1.09416e-09 3.84099e-18 0 -1.09416e-09 3.84099e-18 0 -1.05354e-09 1.9959e-18 0 -1.05354e-09 1.9959e-18 0