60 #undef TypeValueSetsConstArg
63 if (!
set.hasScalarAxis())
66 <<
"Cannot write " << setName <<
" in " << typeName
67 <<
" format as it does not have a scalar axis" 71 if (!
isDir(outputDir))
78 outputDir/setName +
".gplt",
84 os <<
"$data << EOD" <<
nl;
104 os << nl <<
"EOD" << nl <<
nl;
106 os <<
"set term postscript color" << nl
107 <<
"set output \"" << setName.c_str() <<
".ps\"" << nl
108 <<
"set xlabel \"" <<
set.scalarName() <<
"\"" <<
nl;
110 if (valueSetNames.size() == 2)
112 os <<
"set ytics nomirror" << nl
113 <<
"set ylabel \"" << valueSetNames[0] <<
"\"" << nl
114 <<
"set y2tics nomirror" << nl
115 <<
"set y2label \"" << valueSetNames[1] <<
"\"" <<
nl;
122 forAll(valueSetNames, fieldi)
124 #define PlotTypeValueSets(Type, nullArg) \ 125 if (Type##ValueSets.set(fieldi)) \ 129 direction cmpt = 0; \ 130 cmpt < pTraits<Type>::nComponents; \ 134 const bool separator = \ 135 !valueSetNames[fieldi].empty() \ 136 && strlen(pTraits<Type>::componentNames[cmpt]) > 0; \ 139 valueSetNames[fieldi] \ 140 + (separator ? "_" : "") \ 141 + pTraits<Type>::componentNames[cmpt]; \ 143 if (columni != 0) os << ", "; \ 145 os << "$data us 1:" << 2 + columni; \ 147 if (valueSetNames.size() == 2) \ 149 os << " axis x1y" << 1 + fieldi; \ 152 os << " title \"" << w << "\" with lines"; \ 158 #undef PlotTypeValueSets
#define forAll(list, i)
Loop across all elements in list.
A class for handling file names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define TypeValueSetsConstArg(Type, nullArg)
static const NamedEnum< axisType, 6 > axisTypeNames_
String representation of axis enums.
Macros for easy insertion into run-time selection tables.
virtual void write(const fileName &outputDir, const fileName &setName, const coordSet &set, const wordList &valueSetNames #define TypeValueSetsConstArg(Type, nullArg)) const
Write a coordSet and associated data.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Holds list of sampling positions.
virtual ~gnuplotSetWriter()
Destructor.
Pre-declare SubField and related Field type.
bool isDir(const fileName &, const bool followLink=true)
Does the name exist as a directory in the file system?
static const word null
An empty word.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
#define TypeValueSetsParameter(Type, nullArg)
static const versionNumber currentVersion
Current version number.
static const Field< Type > & null()
Return a null field.
FOR_ALL_FIELD_TYPES(DefineFvWallInfoType)
#define PlotTypeValueSets(Type, nullArg)