Commit a117604d authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

Merge branch 'fix/ldc-plot-test' into 'master'

[examples] Fix plot test on minimal installations

Closes #962

See merge request !2360
parents e76f9809 6f2aed1f
......@@ -24,11 +24,13 @@ dumux_add_test(NAME example_ff_liddrivencavity_re1000
-Grid.Cells \"64 64\" -TimeLoop.TEnd 50")
# test plot script
dumux_add_test(NAME example_ff_liddrivencavity_plot
TARGET example_ff_liddrivencavity
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/run_and_plot.py
CMD_ARGS -s -n)
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})
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)
......@@ -26,8 +26,11 @@ 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)
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
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)
####################################################
#### reference #####################################
......
Markdown is supported
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