Commit 0d150e32 authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

Merge branch 'cherry-pick-7b733722' into 'releases/3.3'

Merge branch 'fix/lcd-plot-2' into 'master'

See merge request !2373
parents cc04a7c0 1f7f55f5
add_subdirectory(reference_data)
dune_symlink_to_source_files(FILES "params_re1.input" "params_re1000.input" "run_and_plot.py")
set(DUMUX_EXAMPLE_LDC_CMAKE_GUARDS "( HAVE_UMFPACK )")
dumux_add_test(NAME example_ff_liddrivencavity
SOURCES main.cc
LABELS freeflow navierstokes example
CMAKE_GUARD HAVE_UMFPACK
CMAKE_GUARD DUMUX_EXAMPLE_LDC_CMAKE_GUARDS
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_ff_navierstokes_closedsystem_ldc_re1-reference.vtu
......@@ -15,7 +16,6 @@ dumux_add_test(NAME example_ff_liddrivencavity
dumux_add_test(NAME example_ff_liddrivencavity_re1000
TARGET example_ff_liddrivencavity
LABELS freeflow navierstokes example
CMAKE_GUARD HAVE_UMFPACK
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_ff_navierstokes_closedsystem_ldc_re1000-reference.vtu
......@@ -23,14 +23,14 @@ dumux_add_test(NAME example_ff_liddrivencavity_re1000
--command "${CMAKE_CURRENT_BINARY_DIR}/example_ff_liddrivencavity params_re1000.input
-Grid.Cells \"64 64\" -TimeLoop.TEnd 50")
# test plot script
dune_symlink_to_source_files(run_and_plot.py)
dune_python_add_test(NAME example_ff_liddrivencavity_plot
COMMAND ${PYTHON_EXECUTABLE} run_and_plot.py -s -n
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
# test plot script (only if UMFPack is available and the tests above were actually run)
if(DUMUX_EXAMPLE_LDC_CMAKE_GUARDS)
dumux_add_test(NAME example_ff_liddrivencavity_plot
TARGET example_ff_liddrivencavity
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/run_and_plot.py
CMD_ARGS -s -n)
set_tests_properties(example_ff_liddrivencavity_plot
PROPERTIES LABELS example
DEPENDS "example_ff_liddrivencavity;example_ff_liddrivencavity_re1000")
set_tests_properties(example_ff_liddrivencavity_plot PROPERTIES SKIP_RETURN_CODE 127)
set_tests_properties(example_ff_liddrivencavity_plot
PROPERTIES LABELS example
DEPENDS "example_ff_liddrivencavity;example_ff_liddrivencavity_re1000")
endif()
......@@ -26,11 +26,9 @@ for re in reynolds:
if not args['skipsim']:
subprocess.run(['make', 'example_ff_liddrivencavity'], check=True)
subprocess.run(['./example_ff_liddrivencavity', 'params_re' + str(re) + '.input'], check=True)
try:
y[str(re)], vx[str(re)] = np.genfromtxt('example_ff_liddrivencavity_re' + str(re) + '_vx' + '.log', skip_header= True).T
x[str(re)], vy[str(re)] = np.genfromtxt('example_ff_liddrivencavity_re' + str(re) + '_vy' + '.log', skip_header= True).T
except OSError:
sys.exit(127)
y[str(re)], vx[str(re)] = np.genfromtxt('example_ff_liddrivencavity_re' + str(re) + '_vx' + '.log', skip_header= True).T
x[str(re)], vy[str(re)] = np.genfromtxt('example_ff_liddrivencavity_re' + str(re) + '_vy' + '.log', skip_header= True).T
####################################################
#### reference #####################################
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment