initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / sampling / sampledSurface / writers / dx / dx.H
blobcccf64e3cf3f74a25ed3c3948a2453d67c197e25
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 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::dx
28 Description
30 SourceFiles
31     dx.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef dx_H
36 #define dx_H
38 #include "surfaceWriter.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 namespace Foam
45 /*---------------------------------------------------------------------------*\
46                            Class dx Declaration
47 \*---------------------------------------------------------------------------*/
49 template<class Type>
50 class dx
52     public surfaceWriter<Type>
55     // Private Member Functions
57         void writeDXGeometry
58         (
59             const pointField& points,
60             const faceList& faces,
61             Ostream& os
62         ) const;
64         void writeDXData
65         (
66             const pointField& points,
67             const scalarField& values,
68             Ostream& os
69         ) const;
71         void writeDXData
72         (
73             const pointField& points,
74             const vectorField& values,
75             Ostream& os
76         ) const;
78         void writeDXData
79         (
80             const pointField& points,
81             const sphericalTensorField& values,
82             Ostream& os
83         ) const;
85         void writeDXData
86         (
87             const pointField& points,
88             const symmTensorField& values,
89             Ostream& os
90         ) const;
92         void writeDXData
93         (
94             const pointField& points,
95             const tensorField& values,
96             Ostream& os
97         ) const;
99         void writeDXTrailer(Ostream& os) const;
101 public:
103     //- Runtime type information
104     TypeName("dx");
107     // Constructors
109         //- Construct null
110         dx();
113     // Destructor
115         virtual ~dx();
118     // Member Functions
120         // Write
122         //- Writes single surface to file.
123         virtual void write
124         (
125             const fileName& samplePath,
126             const fileName& timeDir,
127             const fileName& surfaceName,
128             const pointField& points,
129             const faceList& faces,
130             const fileName& fieldName,
131             const Field<Type>& values,
132             const bool verbose = false
133         ) const;
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 } // End namespace Foam
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 #ifdef NoRepository
144 #   include "dx.C"
145 #endif
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 #endif
151 // ************************************************************************* //