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 -------------------------------------------------------------------------------
10 License
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 
26 InNamespace
27  Foam::vtk
28 
29 Description
30  Write topoSet in VTK format
31 
32 SourceFiles
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"
45 #include "foamVtkOutputOptions.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 // Forward Declarations
53 class polyMesh;
54 class topoSet;
55 class faceSet;
56 class cellSet;
57 class pointSet;
58 
59 namespace 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
67 bool 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.
80 bool 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.
106 bool 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 // ************************************************************************* //
Foam::BitOps::set
void set(List< bool > &bools, const labelRange &range)
Set the specified range 'on' in a boolList.
Definition: BitOps.C:37
UPstream.H
Foam::vtk::writeCellSetFaces
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.
Definition: foamVtkWriteCellSetFaces.C:37
Foam::vtk::writeTopoSet
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.
Definition: foamVtkWriteTopoSet.C:38
fileName.H
Foam::vtk::writePointSet
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.
Definition: foamVtkWritePointSet.C:38
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::vtk::writeFaceSet
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.
Definition: foamVtkWriteFaceSet.C:37
foamVtkOutputOptions.H
Foam::UPstream::parRun
static bool & parRun() noexcept
Test if this a parallel run.
Definition: UPstream.H:433