Skip to content
Snippets Groups Projects
Commit 270f14f6 authored by Mark Olesen's avatar Mark Olesen
Browse files

foamGraph* : check if log file exists

parent b5616b4e
Branches
Tags
No related merge requests found
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
# Description # Description
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
if (! -f "$1" ) then
echo "No file: '$1'"
exit 1
endif
set tmpTime = newTime$$.dat set tmpTime = newTime$$.dat
cat $1 | grep "ExecutionTime = " | awk 'BEGIN { NENTRIES = 0 ; TPREV = 0.0 }{NENTRIES++; printf("%f %e\n", NENTRIES, $3 - TPREV); TPREV = $3}' - > $tmpTime cat $1 | grep "ExecutionTime = " | awk 'BEGIN { NENTRIES = 0 ; TPREV = 0.0 }{NENTRIES++; printf("%f %e\n", NENTRIES, $3 - TPREV); TPREV = $3}' - > $tmpTime
......
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
# Description # Description
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
if (! -f "$1" ) then
echo "No file: '$1'"
exit 1
endif
set tmpK = newK$$.dat set tmpK = newK$$.dat
cat $1 | grep "Solving for k" | grep -v "solution singularity" | sed s/,//g | awk 'BEGIN { NENTRIES = 0 }{NENTRIES++; printf("%f %e\n", NENTRIES, $8)}' - > $tmpK cat $1 | grep "Solving for k" | grep -v "solution singularity" | sed s/,//g | awk 'BEGIN { NENTRIES = 0 }{NENTRIES++; printf("%f %e\n", NENTRIES, $8)}' - > $tmpK
......
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
# Description # Description
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
if (! -f "$1" ) then
echo "No file: '$1'"
exit 1
endif
set tmpU = newU$$.dat set tmpU = newU$$.dat
cat $1 | grep "Solving for Ux" | grep -v "solution singularity" | sed s/,//g | awk 'BEGIN { NENTRIES = 0 }{NENTRIES++; printf("%d %e\n", NENTRIES, $8)}' - > $tmpU cat $1 | grep "Solving for Ux" | grep -v "solution singularity" | sed s/,//g | awk 'BEGIN { NENTRIES = 0 }{NENTRIES++; printf("%d %e\n", NENTRIES, $8)}' - > $tmpU
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment