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
21  (
22  aMesh.patch(),
23  // vtk::formatType::INLINE_ASCII,
24  fileName
25  (
26  aMesh.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 // ************************************************************************* //
vtk::lineWriter writer(edgeCentres, edgeList::null(), fileName(aMesh.time().globalPath()/"finiteArea-edgesCentres"))
constexpr char nl
The newline &#39;\n&#39; character (0x0a)
Definition: Ostream.H:50
GenericPatchWriter< uindirectPrimitivePatch > uindirectPatchWriter
Write uindirectPrimitivePatch faces/points (optionally with fields) as a vtp file or a legacy vtk fil...
messageStream Info
Information stream (stdout output on master, null elsewhere)