FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::rawSurfaceWriter
00026 
00027 Description
00028 
00029 SourceFiles
00030     rawSurfaceWriter.C
00031 
00032 \*---------------------------------------------------------------------------*/
00033 
00034 #ifndef rawSurfaceWriter_H
00035 #define rawSurfaceWriter_H
00036 
00037 #include <sampling/surfaceWriter.H>
00038 
00039 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00040 
00041 namespace Foam
00042 {
00043 
00044 /*---------------------------------------------------------------------------*\
00045                            Class raw Declaration
00046 \*---------------------------------------------------------------------------*/
00047 
00048 template<class Type>
00049 class rawSurfaceWriter
00050 :
00051     public surfaceWriter<Type>
00052 {
00053     // Private Member Functions
00054 
00055         static void writeGeometry
00056         (
00057             const pointField& points,
00058             const label pointI,
00059             Ostream& os
00060         );
00061 
00062         static void writeGeometry
00063         (
00064             const pointField& points,
00065             const faceList& faces,
00066             const label faceI,
00067             Ostream& os
00068         );
00069 
00070         static void writeData
00071         (
00072             const fileName& fieldName,
00073             const pointField& points,
00074             const faceList& faces,
00075             const scalarField& values,
00076             Ostream& os
00077         );
00078 
00079         static void writeData
00080         (
00081             const fileName& fieldName,
00082             const pointField& points,
00083             const faceList& faces,
00084             const vectorField& values,
00085             Ostream& os
00086         );
00087 
00088         static void writeData
00089         (
00090             const fileName& fieldName,
00091             const pointField& points,
00092             const faceList& faces,
00093             const sphericalTensorField& values,
00094             Ostream& os
00095         );
00096 
00097         static void writeData
00098         (
00099             const fileName& fieldName,
00100             const pointField& points,
00101             const faceList& faces,
00102             const symmTensorField& values,
00103             Ostream& os
00104         );
00105 
00106         static void writeData
00107         (
00108             const fileName& fieldName,
00109             const pointField& points,
00110             const faceList& faces,
00111             const tensorField& values,
00112             Ostream& os
00113         );
00114 
00115 
00116 public:
00117 
00118     //- Runtime type information
00119     TypeName("raw");
00120 
00121 
00122     // Constructors
00123 
00124         //- Construct null
00125         rawSurfaceWriter();
00126 
00127 
00128     // Destructor
00129 
00130         virtual ~rawSurfaceWriter();
00131 
00132 
00133     // Member Functions
00134 
00135         // Write
00136 
00137         //- Write geometry to file.
00138         virtual void write
00139         (
00140             const fileName& outputDir,
00141             const fileName& surfaceName,
00142             const pointField& points,
00143             const faceList& faces,
00144             const bool verbose = false
00145         ) const;
00146 
00147         //- Writes single surface to file.
00148         virtual void write
00149         (
00150             const fileName& outputDir,
00151             const fileName& surfaceName,
00152             const pointField& points,
00153             const faceList& faces,
00154             const fileName& fieldName,
00155             const Field<Type>& values,
00156             const bool verbose = false
00157         ) const;
00158 };
00159 
00160 
00161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00162 
00163 } // End namespace Foam
00164 
00165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00166 
00167 #ifdef NoRepository
00168 #   include <sampling/rawSurfaceWriter.C>
00169 #endif
00170 
00171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00172 
00173 #endif
00174 
00175 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines