initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / sampling / sampledSurface / writers / raw / rawSurfaceWriter.H
blobfc9fc0804ad3af8663f5377d5d92ce97f628be88
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::rawSurfaceWriter
28 Description
30 SourceFiles
31     rawSurfaceWriter.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef rawSurfaceWriter_H
36 #define rawSurfaceWriter_H
38 #include "surfaceWriter.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 namespace Foam
45 /*---------------------------------------------------------------------------*\
46                            Class raw Declaration
47 \*---------------------------------------------------------------------------*/
49 template<class Type>
50 class rawSurfaceWriter
52     public surfaceWriter<Type>
54     // Private Member Functions
56         static void writeGeometry
57         (
58             const pointField& points,
59             const label pointI,
60             Ostream& os
61         );
63         static void writeGeometry
64         (
65             const pointField& points,
66             const faceList& faces,
67             const label faceI,
68             Ostream& os
69         );
71         static void writeData
72         (
73             const fileName& fieldName,
74             const pointField& points,
75             const faceList& faces,
76             const scalarField& values,
77             Ostream& os
78         );
80         static void writeData
81         (
82             const fileName& fieldName,
83             const pointField& points,
84             const faceList& faces,
85             const vectorField& values,
86             Ostream& os
87         );
89         static void writeData
90         (
91             const fileName& fieldName,
92             const pointField& points,
93             const faceList& faces,
94             const sphericalTensorField& values,
95             Ostream& os
96         );
98         static void writeData
99         (
100             const fileName& fieldName,
101             const pointField& points,
102             const faceList& faces,
103             const symmTensorField& values,
104             Ostream& os
105         );
107         static void writeData
108         (
109             const fileName& fieldName,
110             const pointField& points,
111             const faceList& faces,
112             const tensorField& values,
113             Ostream& os
114         );
117 public:
119     //- Runtime type information
120     TypeName("raw");
123     // Constructors
125         //- Construct null
126         rawSurfaceWriter();
129     // Destructor
131         virtual ~rawSurfaceWriter();
134     // Member Functions
136         // Write
138         //- Write geometry to file.
139         virtual void write
140         (
141             const fileName& outputDir,
142             const fileName& surfaceName,
143             const pointField& points,
144             const faceList& faces,
145             const bool verbose = false
146         ) const;
148         //- Writes single surface to file.
149         virtual void write
150         (
151             const fileName& outputDir,
152             const fileName& surfaceName,
153             const pointField& points,
154             const faceList& faces,
155             const fileName& fieldName,
156             const Field<Type>& values,
157             const bool verbose = false
158         ) const;
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 } // End namespace Foam
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 #ifdef NoRepository
169 #   include "rawSurfaceWriter.C"
170 #endif
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 #endif
176 // ************************************************************************* //