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::lagrangianWriter 00026 00027 Description 00028 Write fields (internal). 00029 00030 SourceFiles 00031 lagrangianWriter.C 00032 lagrangianWriterTemplates.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef lagrangianWriter_H 00037 #define lagrangianWriter_H 00038 00039 #include <OpenFOAM/globalPointPatch.H> 00040 #include <OpenFOAM/OFstream.H> 00041 #include <lagrangian/Cloud.H> 00042 #include <finiteVolume/volFields.H> 00043 #include <OpenFOAM/pointFields.H> 00044 #include "vtkMesh.H" 00045 00046 using namespace Foam; 00047 00048 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00049 00050 namespace Foam 00051 { 00052 00053 class volPointInterpolation; 00054 00055 /*---------------------------------------------------------------------------*\ 00056 Class lagrangianWriter Declaration 00057 \*---------------------------------------------------------------------------*/ 00058 00059 class lagrangianWriter 00060 { 00061 const vtkMesh& vMesh_; 00062 00063 const bool binary_; 00064 00065 const fileName fName_; 00066 00067 const word cloudName_; 00068 00069 std::ofstream os_; 00070 00071 label nParcels_; 00072 00073 00074 public: 00075 00076 // Constructors 00077 00078 //- Construct from components 00079 lagrangianWriter 00080 ( 00081 const vtkMesh&, 00082 const bool binary, 00083 const fileName&, 00084 const word&, 00085 const bool dummyCloud 00086 ); 00087 00088 00089 // Member Functions 00090 00091 std::ofstream& os() 00092 { 00093 return os_; 00094 } 00095 00096 void writeParcelHeader(const label nFields); 00097 00098 //- Write IOField 00099 template<class Type> 00100 void writeIOField(const wordList&); 00101 }; 00102 00103 00104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00105 00106 } // End namespace Foam 00107 00108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00109 00110 #ifdef NoRepository 00111 # include "lagrangianWriterTemplates.C" 00112 #endif 00113 00114 00115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00116 00117 #endif 00118 00119 // ************************ vim: set sw=4 sts=4 et: ************************ //