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-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
12
13Description
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;
46
47// ************************************************************************* //
vtk::internalMeshWriter writer(topoMesh, topoCells, vtk::formatType::INLINE_ASCII, runTime.path()/"blockTopology")
faMesh aMesh(mesh)