BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / applications / utilities / postProcessing / dataConversion / foamToVTK / lagrangianWriter.H
blob53ae51b8871847b490f003168884e44f937d0cac
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by
13     the Free Software Foundation, either version 3 of the License, or
14     (at your option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::lagrangianWriter
27 Description
28     Write fields (internal).
30 SourceFiles
31     lagrangianWriter.C
32     lagrangianWriterTemplates.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef lagrangianWriter_H
37 #define lagrangianWriter_H
39 #include "OFstream.H"
40 #include "Cloud.H"
41 #include "volFields.H"
42 #include "pointFields.H"
43 #include "vtkMesh.H"
45 using namespace Foam;
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 namespace Foam
52 class volPointInterpolation;
54 /*---------------------------------------------------------------------------*\
55                            Class lagrangianWriter Declaration
56 \*---------------------------------------------------------------------------*/
58 class lagrangianWriter
60     const vtkMesh& vMesh_;
62     const bool binary_;
64     const fileName fName_;
66     const word cloudName_;
68     std::ofstream os_;
70     label nParcels_;
73 public:
75     // Constructors
77         //- Construct from components
78         lagrangianWriter
79         (
80             const vtkMesh&,
81             const bool binary,
82             const fileName&,
83             const word&,
84             const bool dummyCloud
85         );
88     // Member Functions
90         std::ofstream& os()
91         {
92             return os_;
93         }
95         void writeParcelHeader(const label nFields);
97         //- Write IOField
98         template<class Type>
99         void writeIOField(const wordList&);
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 } // End namespace Foam
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 #ifdef NoRepository
110 #   include "lagrangianWriterTemplates.C"
111 #endif
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 #endif
118 // ************************************************************************* //