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

foamFileSurfaceWriter.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::foamFileSurfaceWriter
00026 
00027 Description
00028     A surfaceWriter for foamFiles
00029 
00030 SourceFiles
00031     foamFileSurfaceWriter.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef foamFileSurfaceWriter_H
00036 #define foamFileSurfaceWriter_H
00037 
00038 #include <sampling/surfaceWriter.H>
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 /*---------------------------------------------------------------------------*\
00046                    Class foamFileSurfaceWriter Declaration
00047 \*---------------------------------------------------------------------------*/
00048 
00049 template<class Type>
00050 class foamFileSurfaceWriter
00051 :
00052     public surfaceWriter<Type>
00053 {
00054 
00055 public:
00056 
00057     //- Runtime type information
00058     TypeName("foamFile");
00059 
00060 
00061     // Constructors
00062 
00063         //- Construct null
00064         foamFileSurfaceWriter();
00065 
00066 
00067     // Destructor
00068 
00069         virtual ~foamFileSurfaceWriter();
00070 
00071 
00072     // Member Functions
00073 
00074         //- Return true if the surface format supports separate files
00075         virtual bool separateFiles()
00076         {
00077             return true;
00078         }
00079 
00080         //- Write geometry to file.
00081         virtual void write
00082         (
00083             const fileName& outputDir,
00084             const fileName& surfaceName,
00085             const pointField& points,
00086             const faceList& faces,
00087             const bool verbose = false
00088         ) const;
00089 
00090         //- Writes single surface to file.
00091         virtual void write
00092         (
00093             const fileName& outputDir,
00094             const fileName& surfaceName,
00095             const pointField& points,
00096             const faceList& faces,
00097             const fileName& fieldName,
00098             const Field<Type>& values,
00099             const bool verbose = false
00100         ) const;
00101 };
00102 
00103 
00104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00105 
00106 } // End namespace Foam
00107 
00108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00109 
00110 #ifdef NoRepository
00111 #   include "foamFileSurfaceWriter.C"
00112 #endif
00113 
00114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00115 
00116 #endif
00117 
00118 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines