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
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
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Pre-declare SubField and related Field type.
static const Field< vector > & null()
Return a null field.
static const versionNumber currentVersion
Current version number.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Holds list of sampling positions.
static const NamedEnum< axisType, 6 > axisTypeNames_
String representation of axis enums.
word axis() const
Return the axis name.
tmp< scalarField > scalarCoords() const
Get scalar coordinates (axis is x, y, z or distance)
word scalarName() const
Return the name of the scalar coordinates.
const labelList & segments() const
Return the segments.
bool hasScalarAxis() const
Is the coordinate axis a scalar?
A class for handling file names.
Write set in gnuplot format.
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.
virtual ~gnuplotSetWriter()
Destructor.
Base class for writing coordinate sets with data.
A class for handling words, derived from string.
static const word null
An empty word.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define PlotTypeValueSets(Type, nullArg)
#define TypeValueSetsParameter(Type, nullArg)
#define TypeValueSetsConstArg(Type, nullArg)
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
defineTypeNameAndDebug(combustionModel, 0)
bool isDir(const fileName &, const bool followLink=true)
Does the name exist as a directory in the file system?
FOR_ALL_FIELD_TYPES(makeFieldSourceTypedef)