View Issue Details

IDProjectCategoryView StatusLast Update
0001952OpenFOAMpublic2015-12-16 20:30
Reporternsf Assigned Tohenry  
Status resolvedResolutionfixed 
PlatformintelOSCentOSOS Version6.2
Summary0001952: foamMonitor generates inappropiate file for older gnuplots. (tested 4.2)
DescriptionCurrently a generated file might look like:
plot \
"postProcessing/residuals/7.8/residuals_7.8002.dat" using 1:2 with lines title "p_rgh", \
"postProcessing/residuals/7.8/residuals_7.8002.dat" using 1:3 with lines title "h", \
"postProcessing/residuals/7.8/residuals_7.8002.dat" using 1:4 with lines title "k", \
"postProcessing/residuals/7.8/residuals_7.8002.dat" using 1:5 with lines title "U", \

The last two characters ,\ of the last line will generate an error for older gnuplots (at least for 4.2). The error message is:
"function to plot expected"

Steps To Reproducerun foamMonitor and inspect the file it generates.
Additional Information
One possible fix could be to change the for loop on line 154 to

for field in $KEYS
    i=$(expr $i + 1)
    PLOTLINE="\"$FILE\" using 1:${i} with lines title \"$field\""
    if [[ $i -lt $NCOLS ]];then
    echo $PLOTLINE >> $GPFILE

This way the last plot command doesn't have the terminating ,\.

I tested this with gnuplot 4.2 and 5.0.
TagsNo tags attached.



2015-12-16 20:30

manager   ~0005774

Thanks for the patch.

Resolved in OpenFOAM-dev by commit 668edf8465cce2d973294e1c89c2aefa4356590c
Resolved in OpenFOAM-3.0.x by commit 2787b4606ec3dfdcee0757877ac9d45986d4cb7c

Issue History

Date Modified Username Field Change
2015-12-15 19:46 nsf New Issue
2015-12-16 20:30 henry Note Added: 0005774
2015-12-16 20:30 henry Status new => resolved
2015-12-16 20:30 henry Resolution open => fixed
2015-12-16 20:30 henry Assigned To => henry
2016-03-11 11:44 administrator Category 3.0.1 => (No Category)