OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

rawSurfaceWriter.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::rawSurfaceWriter
00027 
00028 Description
00029 
00030 SourceFiles
00031     rawSurfaceWriter.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef rawSurfaceWriter_H
00036 #define rawSurfaceWriter_H
00037 
00038 #include "surfaceWriter.H"
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 /*---------------------------------------------------------------------------*\
00046                            Class raw Declaration
00047 \*---------------------------------------------------------------------------*/
00048 
00049 template<class Type>
00050 class rawSurfaceWriter
00051 :
00052     public surfaceWriter<Type>
00053 {
00054     // Private Member Functions
00055 
00056         static void writeGeometry
00057         (
00058             const pointField& points,
00059             const label pointI,
00060             Ostream& os
00061         );
00062 
00063         static void writeGeometry
00064         (
00065             const pointField& points,
00066             const faceList& faces,
00067             const label faceI,
00068             Ostream& os
00069         );
00070 
00071         static void writeData
00072         (
00073             const fileName& fieldName,
00074             const pointField& points,
00075             const faceList& faces,
00076             const scalarField& values,
00077             Ostream& os
00078         );
00079 
00080         static void writeData
00081         (
00082             const fileName& fieldName,
00083             const pointField& points,
00084             const faceList& faces,
00085             const vectorField& values,
00086             Ostream& os
00087         );
00088 
00089         static void writeData
00090         (
00091             const fileName& fieldName,
00092             const pointField& points,
00093             const faceList& faces,
00094             const sphericalTensorField& values,
00095             Ostream& os
00096         );
00097 
00098         static void writeData
00099         (
00100             const fileName& fieldName,
00101             const pointField& points,
00102             const faceList& faces,
00103             const symmTensorField& values,
00104             Ostream& os
00105         );
00106 
00107         static void writeData
00108         (
00109             const fileName& fieldName,
00110             const pointField& points,
00111             const faceList& faces,
00112             const tensorField& values,
00113             Ostream& os
00114         );
00115 
00116 
00117 public:
00118 
00119     //- Runtime type information
00120     TypeName("raw");
00121 
00122 
00123     // Constructors
00124 
00125         //- Construct null
00126         rawSurfaceWriter();
00127 
00128 
00129     // Destructor
00130 
00131         virtual ~rawSurfaceWriter();
00132 
00133 
00134     // Member Functions
00135 
00136         // Write
00137 
00138         //- Write geometry to file.
00139         virtual void write
00140         (
00141             const fileName& outputDir,
00142             const fileName& surfaceName,
00143             const pointField& points,
00144             const faceList& faces,
00145             const bool verbose = false
00146         ) const;
00147 
00148         //- Writes single surface to file.
00149         virtual void write
00150         (
00151             const fileName& outputDir,
00152             const fileName& surfaceName,
00153             const pointField& points,
00154             const faceList& faces,
00155             const fileName& fieldName,
00156             const Field<Type>& values,
00157             const bool verbose = false
00158         ) const;
00159 };
00160 
00161 
00162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00163 
00164 } // End namespace Foam
00165 
00166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00167 
00168 #ifdef NoRepository
00169 #   include "rawSurfaceWriter.C"
00170 #endif
00171 
00172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00173 
00174 #endif
00175 
00176 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd