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-------------------------------------------------------------------------------
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::VTKsurfaceFormatCore
28
29Description
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
40SourceFiles
41 VTKsurfaceFormatCore.C
42
43\*---------------------------------------------------------------------------*/
44
45#ifndef VTKsurfaceFormatCore_H
46#define VTKsurfaceFormatCore_H
47
48#include "point.H"
49#include "surfZone.H"
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54namespace Foam
55{
56namespace fileFormats
57{
58
59/*---------------------------------------------------------------------------*\
60 Class fileFormats::VTKsurfaceFormatCore Declaration
61\*---------------------------------------------------------------------------*/
62
63class VTKsurfaceFormatCore
64{
65protected:
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// ************************************************************************* //
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 VTKsurfaceFormat Format is LEGACY_ASCII.
static vtk::outputOptions formatOptions(const dictionary &dict, vtk::outputOptions opts=vtk::formatType::LEGACY_ASCII)
Extract format options (default format LEGACY_ASCII)
static void writeHeader(vtk::formatter &format, const UList< point > &pts)
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...
@ LEGACY_ASCII
Legacy ASCII, legacyAsciiFormatter.
Namespace for OpenFOAM.
word format(conversionProperties.get< word >("format"))
dictionary dict