ENH: patchCloud: return pTraits<Type>::max for unfound points
[OpenFOAM-1.7.x.git] / applications / utilities / postProcessing / dataConversion / foamToVTK / lagrangianWriter.H
blob5850185e642e11a4b65b1ec1f55be8d95808805d
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
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 "globalPointPatch.H"
40 #include "OFstream.H"
41 #include "Cloud.H"
42 #include "volFields.H"
43 #include "pointFields.H"
44 #include "vtkMesh.H"
46 using namespace Foam;
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 namespace Foam
53 class volPointInterpolation;
55 /*---------------------------------------------------------------------------*\
56                            Class lagrangianWriter Declaration
57 \*---------------------------------------------------------------------------*/
59 class lagrangianWriter
61     const vtkMesh& vMesh_;
63     const bool binary_;
65     const fileName fName_;
67     const word cloudName_;
69     std::ofstream os_;
71     label nParcels_;
74 public:
76     // Constructors
78         //- Construct from components
79         lagrangianWriter
80         (
81             const vtkMesh&,
82             const bool binary,
83             const fileName&,
84             const word&,
85             const bool dummyCloud
86         );
89     // Member Functions
91         std::ofstream& os()
92         {
93             return os_;
94         }
96         void writeParcelHeader(const label nFields);
98         //- Write IOField
99         template<class Type>
100         void writeIOField(const wordList&);
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 } // End namespace Foam
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 #ifdef NoRepository
111 #   include "lagrangianWriterTemplates.C"
112 #endif
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 #endif
119 // ************************************************************************* //