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-------------------------------------------------------------------------------
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
26Class
27 Foam::fileFormats::VTPsurfaceFormatCore
28
29Description
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
40SourceFiles
41 VTPsurfaceFormatCore.C
42
43\*---------------------------------------------------------------------------*/
44
45#ifndef VTPsurfaceFormatCore_H
46#define VTPsurfaceFormatCore_H
47
48#include "point.H"
49#include "surfZone.H"
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54namespace Foam
55{
56namespace fileFormats
57{
58
59/*---------------------------------------------------------------------------*\
60 Class fileFormats::VTPsurfaceFormatCore Declaration
61\*---------------------------------------------------------------------------*/
62
63class VTPsurfaceFormatCore
64{
65protected:
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// ************************************************************************* //
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: UList.H:94
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Internal class used by the VTPsurfaceFormat. The default format is INLINE_BASE64.
static vtk::outputOptions formatOptions(const dictionary &dict, vtk::outputOptions opts=vtk::formatType::INLINE_BASE64)
Extract format options (default format INLINE_BASE64)
static void writeFooter(vtk::formatter &format)
Write footer.
static void writeHeader(vtk::formatter &format, const UList< point > &pts, const label nFaces)
Write header information with points.
static void writeCellData(vtk::formatter &format, const UList< surfZone > &zones)
Write regions (zones) information as CellData.
Abstract class for a VTK output stream formatter.
Encapsulated combinations of output format options. This is primarily useful when defining the output...
const labelList nFaces(UPstream::listGatherValues< label >(aMesh.nFaces()))
@ INLINE_BASE64
XML inline base64, base64Formatter.
Namespace for OpenFOAM.
word format(conversionProperties.get< word >("format"))
dictionary dict