VTKsurfaceFormatCore.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::VTKsurfaceFormatCore
28 
29 Description
30  Internal class used by the VTKsurfaceFormat
31  Format is LEGACY_ASCII
32 
33  \heading Output Options
34  \table
35  Property | Description | Required | Default
36  format | ascii or binary format | no | ascii
37  precision | Write precision in ascii | no | same as IOstream
38  \endtable
39 
40 SourceFiles
41  VTKsurfaceFormatCore.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef VTKsurfaceFormatCore_H
46 #define VTKsurfaceFormatCore_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::VTKsurfaceFormatCore Declaration
61 \*---------------------------------------------------------------------------*/
62 
63 class VTKsurfaceFormatCore
64 {
65 protected:
66 
67  // Protected Static Member Functions
68 
69  //- Extract format options (default format LEGACY_ASCII)
70  static vtk::outputOptions formatOptions
71  (
72  const dictionary& dict,
73  vtk::outputOptions opts = vtk::formatType::LEGACY_ASCII
74  );
75 
76  //- Write header information with points
77  static void writeHeader
78  (
80  const UList<point>& pts
81  );
82 
83  //- Write regions (zones) information as CellData
84  static void writeCellData
85  (
87  const UList<surfZone>& zones
88  );
89 
90  //- Write regions (zones) information as CellData
91  static void writeCellData
92  (
94  const labelUList& zoneIds
95  );
96 };
97 
98 
99 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100 
101 } // End namespace fileFormats
102 } // End namespace Foam
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 #endif
107 
108 // ************************************************************************* //
Foam::vtk::outputOptions
Encapsulated combinations of output format options. This is primarily useful when defining the output...
Definition: foamVtkOutputOptions.H:59
point.H
Foam::vtk::formatType::LEGACY_ASCII
Legacy ASCII, legacyAsciiFormatter.
format
word format(conversionProperties.get< word >("format"))
surfZone.H
Foam::fileFormats::VTKsurfaceFormatCore::writeCellData
static void writeCellData(vtk::formatter &format, const UList< surfZone > &zones)
Write regions (zones) information as CellData.
Definition: VTKsurfaceFormatCore.C:78
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
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fileFormats::VTKsurfaceFormatCore
Internal class used by the VTKsurfaceFormat Format is LEGACY_ASCII.
Definition: VTKsurfaceFormatCore.H:77
foamVtkOutputOptions.H
Foam::fileFormats::VTKsurfaceFormatCore::writeHeader
static void writeHeader(vtk::formatter &format, const UList< point > &pts)
Write header information with points.
Definition: VTKsurfaceFormatCore.C:59
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::vtk::formatter
Abstract class for a VTK output stream formatter.
Definition: foamVtkFormatter.H:68
Foam::fileFormats::VTKsurfaceFormatCore::formatOptions
static vtk::outputOptions formatOptions(const dictionary &dict, vtk::outputOptions opts=vtk::formatType::LEGACY_ASCII)
Extract format options (default format LEGACY_ASCII)
Definition: VTKsurfaceFormatCore.C:35