OpenFOAM: API Guide
v2112
The open source CFD toolbox
faMeshWriteVTK.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | www.openfoam.com
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
Copyright (C) 2021 OpenCFD Ltd.
9
-------------------------------------------------------------------------------
10
License
11
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
12
13
Description
14
VTK output of faMesh with some geometric or debug fields
15
16
\*---------------------------------------------------------------------------*/
17
18
{
19
// finiteArea
20
vtk::uindirectPatchWriter
writer
21
(
22
aMesh
.patch(),
23
// vtk::formatType::INLINE_ASCII,
24
fileName
25
(
26
aMesh
.mesh().time().globalPath() /
"finiteArea"
27
)
28
);
29
30
writer
.writeGeometry();
31
32
// CellData
33
writer
.beginCellData(3);
34
writer
.writeProcIDs();
35
writer
.write(
"area"
,
aMesh
.S().field());
36
writer
.write(
"normal"
,
aMesh
.faceAreaNormals());
37
38
// PointData
39
writer
.beginPointData(1);
40
writer
.write(
"normal"
,
aMesh
.pointAreaNormals());
41
42
Info<< nl
43
<<
"Wrote faMesh in vtk format: "
<<
writer
.output().name() << nl;
44
}
45
46
47
// ************************************************************************* //
writer
vtk::internalMeshWriter writer(topoMesh, topoCells, vtk::formatType::INLINE_ASCII, runTime.path()/"blockTopology")
aMesh
faMesh aMesh(mesh)
applications
utilities
finiteArea
makeFaMesh
faMeshWriteVTK.H
Generated by
1.9.5
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.