58 void Foam::graph::readCurves(Istream& is)
62 x_.setSize(xyData.size());
149 <<
"y field requested for graph containing " << size()
162 <<
"y field requested for graph containing " << size()
175 <<
"When setting limits, x1 must be greater than x0" <<
nl 176 <<
" x0: " << x0 <<
nl 177 <<
" x1: " << x1 <<
nl 196 label nX = i1 - i0 + 1;
211 const word& graphFormat
214 if (!wordConstructorTablePtr_)
217 <<
"Graph writer table is empty" 221 auto* ctorPtr = wordConstructorTable(graphFormat);
229 *wordConstructorTablePtr_
278 if (graphFile.good())
285 <<
"Could not open graph file " << graphFile.name()
293 const fileName&
path,
string & replace(const std::string &s1, const std::string &s2, size_type pos=0)
Replace first occurrence of sub-string s1 with s2, beginning at pos.
A class for handling file names.
void write(Ostream &, const word &format) const
Write graph to stream in given format.
errorManipArg< error, int > exit(error &err, const int errNo=1)
vtk::lineWriter writer(edgeCentres, edgeList::null(), fileName(aMesh.time().globalPath()/"finiteArea-edgesCentres"))
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
const scalarField & y() const
Output to file stream as an OSstream, normally using std::ofstream for the actual output...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
#define FatalErrorInLookup(lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalError.
void writeTable(Ostream &) const
Write out graph data as a simple table.
Abstract base class for a graph writer.
#define forAll(list, i)
Loop across all elements in list.
graph::writer graphWriter
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
void setXRange(const scalar x0, const scalar x1)
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
graph(const string &title, const string &xName, const string &yName, const scalarField &x)
Construct from title and labels (no curves)
void writeXY(const scalarField &x, const scalarField &y, Ostream &) const
#define forAllIters(container, iter)
Iterate across all elements in the container object.
A single curve in a graph.
errorManip< error > abort(error &err)
static word wordify(const string &sname)
Helper function to convert string name into appropriate word.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const uniformDimensionedVectorField & g
Istream and Ostream manipulators taking arguments.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
OBJstream os(runTime.globalPath()/outputName)
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
defineTypeNameAndDebug(combustionModel, 0)
word format(conversionProperties.get< word >("format"))
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionedScalar c
Speed of light in a vacuum.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Omanip< int > setw(const int i)
constexpr auto begin(C &c) -> decltype(c.begin())
Return iterator to the beginning of the container c.
A class for handling character strings derived from std::string.
const string & yName() const
forAllConstIters(mixture.phases(), phase)
static autoPtr< writer > New(const word &writeFormat)
Return a reference to the selected writer.