foamVtkWriteTopoSet.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) 2017-2018 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26InNamespace
27 Foam::vtk
28
29Description
30 Write topoSet in VTK format
31
32SourceFiles
33 foamVtkWriteTopoSet.C
34 foamVtkWriteCellSetFaces.C
35 foamVtkWriteFaceSet.C
36 foamVtkWritePointSet.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef Foam_vtk_WriteTopoSet_H
41#define Foam_vtk_WriteTopoSet_H
42
43#include "fileName.H"
44#include "UPstream.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52// Forward Declarations
53class polyMesh;
54class topoSet;
55class faceSet;
56class cellSet;
57class pointSet;
58
59namespace vtk
60{
61
62// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63
64//- Dispatch to vtk::writeCellSetFaces, vtk::writeFaceSet, vtk::writePointSet
65// The file name is with/without an extension.
66// \return True on successful dispatch
67bool writeTopoSet
68(
69 const polyMesh& mesh,
70 const topoSet& set,
71 const vtk::outputOptions opts,
72 const fileName& file,
73 bool parallel = Pstream::parRun()
74);
75
76
77//- Write faceSet as VTK polydata file.
78// Only one CELL_DATA, which is the original faceID
79// The file name is with/without an extension.
80bool writeFaceSet
81(
82 const polyMesh& mesh,
83 const faceSet& set,
84 const vtk::outputOptions opts,
85 const fileName& file,
86 bool parallel = Pstream::parRun()
87);
88
89
90//- Write perimeter faces of cellset to vtk polydata file.
91// The data are the original cell ids
92// The file name is with/without an extension.
94(
95 const polyMesh& mesh,
96 const cellSet& set,
97 const vtk::outputOptions opts,
98 const fileName& file,
99 bool parallel = Pstream::parRun()
100);
101
102
103//- Write pointSet to VTK polydata file.
104// Only one CELL_DATA, which is the original pointID
105// The file name is with/without an extension.
106bool writePointSet
107(
108 const polyMesh& mesh,
109 const pointSet& set,
110 const vtk::outputOptions opts,
111 const fileName& file,
112 bool parallel = Pstream::parRun()
113);
114
115
116// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117
118} // End namespace vtk
119} // End namespace Foam
120
121// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122
123#endif
124
125// ************************************************************************* //
static bool & parRun() noexcept
Test if this a parallel run.
Definition: UPstream.H:433
dynamicFvMesh & mesh
bool writeTopoSet(const polyMesh &mesh, const topoSet &set, const vtk::outputOptions opts, const fileName &file, bool parallel=Pstream::parRun())
Dispatch to vtk::writeCellSetFaces, vtk::writeFaceSet, vtk::writePointSet.
bool writeCellSetFaces(const polyMesh &mesh, const cellSet &set, const vtk::outputOptions opts, const fileName &file, bool parallel=Pstream::parRun())
Write perimeter faces of cellset to vtk polydata file.
bool writePointSet(const polyMesh &mesh, const pointSet &set, const vtk::outputOptions opts, const fileName &file, bool parallel=Pstream::parRun())
Write pointSet to VTK polydata file.
bool writeFaceSet(const polyMesh &mesh, const faceSet &set, const vtk::outputOptions opts, const fileName &file, bool parallel=Pstream::parRun())
Write faceSet as VTK polydata file.
Namespace for OpenFOAM.