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
Return mesh.
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
const word & name() const noexcept
Return the object name.
Definition: IOobjectI.H:65
const Time & time() const
Return Time associated with the objectRegistry.
Definition: IOobject.C:506
fileName path() const
Return path.
Definition: Time.H:358
static word timeName(const scalar t, const int precision=precision_)
Definition: Time.C:780
A class for handling file names.
Definition: fileName.H:76
Class to create, store and output qgraph files.
Definition: graph.H:62
void write(Ostream &, const word &format) const
Write graph to stream in given format.
Definition: graph.C:266
A class for handling words, derived from Foam::string.
Definition: word.H:68
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
void writeCellGraph(const volScalarField &vsf, const word &graphFormat)
Definition: writeCellGraph.C:9
mkDir(pdfPath)