writePatchGraph.C
Go to the documentation of this file.
1 #include "writePatchGraph.H"
2 #include "volFields.H"
3 #include "fvMesh.H"
4 #include "graph.H"
5 
6 
7 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
8 
9 namespace Foam
10 {
11 
12 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
13 
14 void writePatchGraph
15 (
16  const volScalarField& vsf,
17  const label patchLabel,
18  const direction d,
19  const word& graphFormat
20 )
21 {
22  graph
23  (
24  vsf.name(),
25  "position",
26  vsf.name(),
27  vsf.mesh().boundary()[patchLabel].Cf().component(d),
28  vsf.boundaryField()[patchLabel]
29  ).write(vsf.time().timePath()/vsf.name(), graphFormat);
30 }
31 
32 
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 
35 } // End namespace Foam
36 
37 // ************************************************************************* //
volFields.H
Foam::GeometricField::component
tmp< GeometricField< cmptType, PatchField, GeoMesh > > component(const direction) const
Return a component of the field.
Foam::graph
Class to create, store and output qgraph files.
Definition: graph.H:58
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::writePatchGraph
void writePatchGraph(const volScalarField &vsf, const label patchLabel, const direction d, const word &graphFormat)
Definition: writePatchGraph.C:15
Foam::GeometricField::boundaryField
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
Definition: GeometricField.C:735
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::graph::write
void write(Ostream &, const word &format) const
Write graph to stream in given format.
Definition: graph.C:221
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
writePatchGraph.H
graph.H
Foam::direction
unsigned char direction
Definition: direction.H:43
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
graphFormat
word graphFormat
Definition: createFields.H:34