Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
OpenFOAM-plus
Commits
1b0dc5c8
Commit
1b0dc5c8
authored
Jul 07, 2017
by
Mark OLESEN
Browse files
STYLE: use shell 'command' instead of 'which' in tutorials
parent
03cc5bbb
Changes
11
Hide whitespace changes
Inline
Side-by-side
tutorials/combustion/chemFoam/gri/validation/createGraph
View file @
1b0dc5c8
#!/bin/sh
if
!
which gnuplot
>
/dev/null 2>&1
then
echo
"gnuplot not found - skipping graph creation"
>
&2
command
-v
gnuplot
>
/dev/null 2>&1
||
{
echo
"gnuplot not found - skipping graph creation"
1>&2
exit
1
fi
}
gnuplot
<<
EOF
set terminal postscript eps color enhanced "Helveicta,20"
...
...
tutorials/combustion/chemFoam/h2/validation/createGraph
View file @
1b0dc5c8
#!/bin/sh
if
!
which gnuplot
>
/dev/null 2>&1
then
echo
"gnuplot not found - skipping graph creation"
>
&2
# Test if gnuplot exists on the system
command
-v
gnuplot
>
/dev/null 2>&1
||
{
echo
"gnuplot not found - skipping graph creation"
1
>&2
exit
1
fi
}
gnuplot
<<
EOF
set terminal postscript eps color enhanced "Helvetica,20"
...
...
tutorials/combustion/chemFoam/ic8h18/validation/createGraph
View file @
1b0dc5c8
#!/bin/sh
if
!
which gnuplot
>
/dev/null 2>&1
then
echo
"gnuplot not found - skipping graph creation"
>
&2
# Test if gnuplot exists on the system
command
-v
gnuplot
>
/dev/null 2>&1
||
{
echo
"gnuplot not found - skipping graph creation"
1
>&2
exit
1
fi
}
gnuplot
<<
EOF
set terminal postscript eps color enhanced "Helvetica,20"
...
...
tutorials/combustion/chemFoam/ic8h18_TDAC/validation/createGraph
View file @
1b0dc5c8
#!/bin/sh
if
!
which gnuplot
>
/dev/null 2>&1
then
echo
"gnuplot not found - skipping graph creation"
>
&2
# Test if gnuplot exists on the system
command
-v
gnuplot
>
/dev/null 2>&1
||
{
echo
"gnuplot not found - skipping graph creation"
1
>&2
exit
1
fi
}
gnuplot
<<
EOF
set terminal postscript eps color enhanced "Helvetica,20"
...
...
tutorials/combustion/chemFoam/nc7h16/validation/createGraph
View file @
1b0dc5c8
#!/bin/sh
if
!
which gnuplot
>
/dev/null 2>&1
then
echo
"gnuplot not found - skipping graph creation"
>
&2
# Test if gnuplot exists on the system
command
-v
gnuplot
>
/dev/null 2>&1
||
{
echo
"gnuplot not found - skipping graph creation"
1
>&2
exit
1
fi
}
gnuplot
<<
EOF
set terminal postscript eps color enhanced "Helvetica,20"
...
...
tutorials/combustion/fireFoam/LES/compartmentFire/validation/createGraphs
View file @
1b0dc5c8
...
...
@@ -53,12 +53,11 @@ EOF
}
# test if gnuplot exists on the system
if
!
which gnuplot
>
/dev/null 2>&1
then
echo
"gnuplot not found - skipping graph creation"
>
&2
# Test if gnuplot exists on the system
command
-v
gnuplot
>
/dev/null 2>&1
||
{
echo
"gnuplot not found - skipping graph creation"
1>&2
exit
1
fi
}
SETSDIRT
=
"../postProcessing/thermoCouple"
...
...
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/validation/createGraphs
View file @
1b0dc5c8
...
...
@@ -85,20 +85,18 @@ EOF
echo
"createGraphs:"
# test if gnuplot exists on the system
if
!
which gnuplot
>
/dev/null 2>&1
then
echo
"FOAM FATAL ERROR: gnuplot not found - skipping graph creation"
>
&2
# Test if gnuplot exists on the system
command
-v
gnuplot
>
/dev/null 2>&1
||
{
echo
"FOAM FATAL ERROR: gnuplot not found - skipping graph creation"
1>&2
exit
1
fi
}
SETSDIR
=
"../postProcessing/sample"
if
[
!
-d
$SETSDIR
]
then
echo
"FOAM FATAL ERROR: result sets not available in directory
$SETSDIR
"
>
&2
[
-d
"
$SETSDIR
"
]
||
{
echo
"FOAM FATAL ERROR: result sets not available in directory
$SETSDIR
"
1>&2
exit
1
fi
}
# paths to data
LATESTTIME
=
$(
ls
$SETSDIR
)
...
...
tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/createGraphs
View file @
1b0dc5c8
...
...
@@ -30,28 +30,25 @@
# Joule heating case
#
#------------------------------------------------------------------------------
cd
${
0
%/*
}
||
exit
1
# Run from this directory
# Stop on first error
set
-e
# test if gnuplot exists on the system
if
!
which gnuplot
>
/dev/null 2>&1
then
echo
"FOAM FATAL ERROR: gnuplot not found - skipping graph creation"
>
&2
# Test if gnuplot exists on the system
command
-v
gnuplot
>
/dev/null 2>&1
||
{
echo
"FOAM FATAL ERROR: gnuplot not found - skipping graph creation"
1>&2
exit
1
fi
}
echo
"Creating graph"
OFDATA
=
'postProcessing/sample1/solid/20000/centreLine_T_jouleHeatingSource:V_jouleHeatingSource:sigma.xy'
if
[
!
-f
"
$OFDATA
"
]
then
echo
"FOAM FATAL ERROR: OpenFOAM results not available in
$OFDATA
"
>
&2
[
-f
"
$OFDATA
"
]
||
{
echo
"FOAM FATAL ERROR: OpenFOAM results not available in
$OFDATA
"
1>&2
exit
1
fi
}
gnuplot
<<
EOF
set terminal postscript eps color enhanced
...
...
tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun
View file @
1b0dc5c8
...
...
@@ -36,12 +36,11 @@ done
# create validation plot
# test if gnuplot exists on the system
if
!
which gnuplot
>
/dev/null 2>&1
then
echo
"gnuplot not found - skipping graph creation"
>
&2
# Test if gnuplot exists on the system
command
-v
gnuplot
>
/dev/null 2>&1
||
{
echo
"gnuplot not found - skipping graph creation"
1>&2
exit
1
fi
}
graphName
=
"OF_vs_ANALYTICAL.eps"
...
...
tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/createGraph
View file @
1b0dc5c8
...
...
@@ -3,11 +3,11 @@
tail
-n
+4 ../postProcessing/probes/0/U |
\
tr
-s
" "
|
tr
-d
'('
|
cut
-d
" "
-f2-3
>
../Numerical.dat
if
!
which gnuplot
>
/dev/null 2>&1
then
echo
"gnuplot not found - skipping graph creation"
>
&2
# Test if gnuplot exists on the system
command
-v
gnuplot
>
/dev/null 2>&1
||
{
echo
"gnuplot not found - skipping graph creation"
1
>&2
exit
1
fi
}
gnuplot
<<
EOF
set terminal postscript eps color enhanced "Helvetica,20"
...
...
tutorials/incompressible/simpleFoam/T3A/validation/createGraphs
View file @
1b0dc5c8
#!/bin/sh
if
!
which gnuplot
>
/dev/null 2>&1
then
echo
"gnuplot not found - skipping graph creation"
>
&2
# Test if gnuplot exists on the system
command
-v
gnuplot
>
/dev/null 2>&1
||
{
echo
"gnuplot not found - skipping graph creation"
1
>&2
exit
1
fi
}
gnuplot
<<
EOF
set term post enhanced color solid linewidth 2.0 20
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment