00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 2010-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::surfaceInterpolateFields 00026 00027 Description 00028 Reads fields from the time folders and adds them to the mesh database 00029 for further post-processing. 00030 00031 SourceFiles 00032 surfaceInterpolateFields.C 00033 IOsurfaceInterpolateFields.H 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef surfaceInterpolateFields_H 00038 #define surfaceInterpolateFields_H 00039 00040 #include <OpenFOAM/OFstream.H> 00041 //#include <OpenFOAM/pointFieldFwd.H> 00042 #include <finiteVolume/surfaceFields.H> 00043 #include <OpenFOAM/Tuple2.H> 00044 00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00046 00047 namespace Foam 00048 { 00049 00050 // Forward declaration of classes 00051 class objectRegistry; 00052 class dictionary; 00053 class mapPolyMesh; 00054 00055 /*---------------------------------------------------------------------------*\ 00056 Class surfaceInterpolateFields Declaration 00057 \*---------------------------------------------------------------------------*/ 00058 00059 class surfaceInterpolateFields 00060 { 00061 protected: 00062 00063 // Protected data 00064 00065 //- Name of this set of surfaceInterpolateFields object 00066 word name_; 00067 00068 const objectRegistry& obr_; 00069 00070 //- on/off switch 00071 bool active_; 00072 00073 //- Fields to process 00074 //wordList fieldSet_; 00075 List<Tuple2<word, word> > fieldSet_; 00076 00077 //- Locally constructed fields 00078 PtrList<surfaceScalarField> ssf_; 00079 PtrList<surfaceVectorField> svf_; 00080 PtrList<surfaceSphericalTensorField> sSpheretf_; 00081 PtrList<surfaceSymmTensorField> sSymmtf_; 00082 PtrList<surfaceTensorField> stf_; 00083 00084 00085 // Protected Member Functions 00086 00087 //- Disallow default bitwise copy construct 00088 surfaceInterpolateFields(const surfaceInterpolateFields&); 00089 00090 //- Disallow default bitwise assignment 00091 void operator=(const surfaceInterpolateFields&); 00092 00093 template<class Type> 00094 void interpolateFields 00095 ( 00096 PtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >& 00097 ) const; 00098 00099 00100 public: 00101 00102 //- Runtime type information 00103 TypeName("surfaceInterpolateFields"); 00104 00105 00106 // Constructors 00107 00108 //- Construct for given objectRegistry and dictionary. 00109 // Allow the possibility to load fields from files 00110 surfaceInterpolateFields 00111 ( 00112 const word& name, 00113 const objectRegistry&, 00114 const dictionary&, 00115 const bool loadFromFiles = false 00116 ); 00117 00118 00119 //- Destructor 00120 virtual ~surfaceInterpolateFields(); 00121 00122 00123 // Member Functions 00124 00125 //- Return name of the surfaceInterpolateFields object 00126 virtual const word& name() const 00127 { 00128 return name_; 00129 } 00130 00131 //- Read the field min/max data 00132 virtual void read(const dictionary&); 00133 00134 //- Execute, currently does nothing 00135 virtual void execute(); 00136 00137 //- Execute at the final time-loop, currently does nothing 00138 virtual void end(); 00139 00140 //- Write 00141 virtual void write(); 00142 00143 //- Update for changes of mesh 00144 virtual void updateMesh(const mapPolyMesh&) 00145 {} 00146 00147 //- Update for changes of mesh 00148 virtual void movePoints(const pointField&) 00149 {} 00150 }; 00151 00152 00153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00154 00155 } // End namespace Foam 00156 00157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00158 00159 #ifdef NoRepository 00160 # include "surfaceInterpolateFieldsTemplates.C" 00161 #endif 00162 00163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00164 00165 #endif 00166 00167 // ************************ vim: set sw=4 sts=4 et: ************************ //