VTPsurfaceFormatCore.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 Class
27  Foam::fileFormats::VTPsurfaceFormatCore
28 
29 Description
30  Internal class used by the VTPsurfaceFormat.
31  The default format is INLINE_BASE64
32 
33  \heading Output Options
34  \table
35  Property | Description | Required | Default
36  format | ascii or binary format | no | binary
37  precision | Write precision in ascii | no | same as IOstream
38  \endtable
39 
40 SourceFiles
41  VTPsurfaceFormatCore.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef VTPsurfaceFormatCore_H
46 #define VTPsurfaceFormatCore_H
47 
48 #include "point.H"
49 #include "surfZone.H"
50 #include "foamVtkOutputOptions.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 namespace fileFormats
57 {
58 
59 /*---------------------------------------------------------------------------*\
60  Class fileFormats::VTPsurfaceFormatCore Declaration
61 \*---------------------------------------------------------------------------*/
62 
63 class VTPsurfaceFormatCore
64 {
65 protected:
66 
67  // Protected Static Member Functions
68 
69  //- Extract format options (default format INLINE_BASE64)
70  static vtk::outputOptions formatOptions
71  (
72  const dictionary& dict,
73  vtk::outputOptions opts = vtk::formatType::INLINE_BASE64
74  );
75 
76  //- Write header information with points
77  static void writeHeader
78  (
80  const UList<point>& pts,
81  const label nFaces
82  );
83 
84  //- Write footer
85  static void writeFooter(vtk::formatter& format);
86 
87  //- Write regions (zones) information as CellData
88  static void writeCellData
89  (
91  const UList<surfZone>& zones
92  );
93 
94  //- Write regions (zones) information as CellData
95  static void writeCellData
96  (
98  const labelUList& zoneIds
99  );
100 };
101 
102 
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 
105 } // End namespace fileFormats
106 } // End namespace Foam
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 #endif
111 
112 // ************************************************************************* //
Foam::vtk::outputOptions
Encapsulated combinations of output format options. This is primarily useful when defining the output...
Definition: foamVtkOutputOptions.H:59
point.H
Foam::fileFormats::VTPsurfaceFormatCore
Internal class used by the VTPsurfaceFormat. The default format is INLINE_BASE64.
Definition: VTPsurfaceFormatCore.H:77
format
word format(conversionProperties.get< word >("format"))
Foam::fileFormats::VTPsurfaceFormatCore::writeFooter
static void writeFooter(vtk::formatter &format)
Write footer.
Definition: VTPsurfaceFormatCore.C:101
Foam::fileFormats::VTPsurfaceFormatCore::writeCellData
static void writeCellData(vtk::formatter &format, const UList< surfZone > &zones)
Write regions (zones) information as CellData.
Definition: VTPsurfaceFormatCore.C:113
surfZone.H
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::vtk::formatType::INLINE_BASE64
XML inline base64, base64Formatter.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fileFormats::VTPsurfaceFormatCore::formatOptions
static vtk::outputOptions formatOptions(const dictionary &dict, vtk::outputOptions opts=vtk::formatType::INLINE_BASE64)
Extract format options (default format INLINE_BASE64)
Definition: VTPsurfaceFormatCore.C:35
foamVtkOutputOptions.H
Foam::UList
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:103
Foam::fileFormats::VTPsurfaceFormatCore::writeHeader
static void writeHeader(vtk::formatter &format, const UList< point > &pts, const label nFaces)
Write header information with points.
Definition: VTPsurfaceFormatCore.C:59
Foam::vtk::formatter
Abstract class for a VTK output stream formatter.
Definition: foamVtkFormatter.H:68