Loading...
Searching...
No Matches
writeCellGraph.C
Go to the documentation of this file.
1#include "writeCellGraph.H"
2#include "volFields.H"
3#include "fvMesh.H"
4#include "graph.H"
5
6// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
7
9(
10 const volScalarField& vsf,
11 const word& graphFormat
12)
13{
14 fileName path(vsf.time().path()/"graphs"/vsf.time().timeName());
15 mkDir(path);
16
17 graph
18 (
19 vsf.name(),
20 "x",
21 vsf.name(),
22 vsf.mesh().C().primitiveField().component(vector::X),
23 vsf.primitiveField()
24 ).write(path/vsf.name(), graphFormat);
25}
26
27
28// ************************************************************************* //
const Mesh & mesh() const noexcept
Return const reference to mesh.
const Internal::FieldType & primitiveField() const noexcept
Return a const-reference to the internal field values.
const Time & time() const noexcept
Return Time associated with the objectRegistry.
Definition IOobject.C:456
const word & name() const noexcept
Return the object name.
Definition IOobjectI.H:205
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
Definition Time.C:714
fileName path() const
The path for the case = rootPath/caseName.
Definition TimePathsI.H:102
A class for handling file names.
Definition fileName.H:75
Class to create, store and output qgraph files.
Definition graph.H:56
void write(Ostream &, const word &format) const
Write graph to stream in given format.
Definition graph.C:259
A class for handling words, derived from Foam::string.
Definition word.H:66
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
GeometricField< scalar, fvPatchField, volMesh > volScalarField
void writeCellGraph(const volScalarField &vsf, const word &graphFormat)
mkDir(pdfPath)