Skip to content

Commit c0c1920

Browse files
committed
ensure that gnuplot output is directed to the png
1 parent 1b81961 commit c0c1920

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • benchmarks/rotating-cylinders/openfoam

benchmarks/rotating-cylinders/openfoam/plot

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/sh
2+
cd "${0%/*}" || exit # Run from this directory
23
# Require gnuplot
34
command -v gnuplot >/dev/null || {
45
echo "FOAM FATAL ERROR: gnuplot not found - skipping graph creation" 1>&2
@@ -8,6 +9,7 @@ command -v gnuplot >/dev/null || {
89

910
gnuplot<<EOF
1011
set terminal pngcairo font "helvetica,16" size 800,600
12+
set output "p.png"
1113
set xlabel "Radius, r"
1214
set xrange [1:2]
1315
set grid
@@ -29,7 +31,6 @@ gnuplot<<EOF
2931
samples="postProcessing/sample1/1000/centreLine_p_U.xy"
3032
3133
set ylabel "Pressure, p"
32-
set output "p.png"
3334
set samples 20
3435
set key bottom right
3536
plot samples u 1:2 w lines lw 2 lc "black" t "OpenFOAM", \
@@ -41,4 +42,5 @@ gnuplot<<EOF
4142
set key top right
4243
plot samples u 1:4 w lines lw 2 lc "black" t "OpenFOAM", \
4344
analytical_utheta(x) w p ps 2 pt 6 lw 2 lc rgb "red" t "analytical"
45+
set output
4446
EOF

0 commit comments

Comments
 (0)