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::pointFieldReconstructor 00026 00027 Description 00028 Point field reconstructor. 00029 00030 SourceFiles 00031 pointFieldReconstructor.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef pointFieldReconstructor_H 00036 #define pointFieldReconstructor_H 00037 00038 #include <OpenFOAM/pointMesh.H> 00039 #include <OpenFOAM/pointFields.H> 00040 #include <OpenFOAM/pointPatchFieldMapperPatchRef.H> 00041 #include <OpenFOAM/IOobjectList.H> 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 /*---------------------------------------------------------------------------*\ 00049 Class pointFieldReconstructor Declaration 00050 \*---------------------------------------------------------------------------*/ 00051 00052 class pointFieldReconstructor 00053 { 00054 // Private data 00055 00056 //- Reconstructed mesh reference 00057 const pointMesh& mesh_; 00058 00059 //- List of processor meshes 00060 const PtrList<pointMesh>& procMeshes_; 00061 00062 //- List of processor point addressing lists 00063 const PtrList<labelIOList>& pointProcAddressing_; 00064 00065 //- List of processor boundary addressing lists 00066 const PtrList<labelIOList>& boundaryProcAddressing_; 00067 00068 //- Point patch addressing 00069 labelListListList patchPointAddressing_; 00070 00071 00072 // Private Member Functions 00073 00074 //- Disallow default bitwise copy construct 00075 pointFieldReconstructor 00076 ( 00077 const pointFieldReconstructor& 00078 ); 00079 00080 //- Disallow default bitwise assignment 00081 void operator=(const pointFieldReconstructor&); 00082 00083 00084 public: 00085 00086 class pointPatchFieldReconstructor 00087 : 00088 public pointPatchFieldMapper 00089 { 00090 label size_; 00091 00092 public: 00093 00094 // Constructors 00095 00096 //- Construct given size 00097 pointPatchFieldReconstructor(const label size) 00098 : 00099 size_(size) 00100 {} 00101 00102 00103 // Member functions 00104 00105 label size() const 00106 { 00107 return size_; 00108 } 00109 00110 bool direct() const 00111 { 00112 return true; 00113 } 00114 00115 const unallocLabelList& directAddressing() const 00116 { 00117 return unallocLabelList::null(); 00118 } 00119 }; 00120 00121 00122 // Constructors 00123 00124 //- Construct from components 00125 pointFieldReconstructor 00126 ( 00127 const pointMesh& mesh, 00128 const PtrList<pointMesh>& procMeshes, 00129 const PtrList<labelIOList>& pointProcAddressing, 00130 const PtrList<labelIOList>& boundaryProcAddressing 00131 ); 00132 00133 00134 // Member Functions 00135 00136 //- Reconstruct field 00137 template<class Type> 00138 tmp<GeometricField<Type, pointPatchField, pointMesh> > 00139 reconstructField(const IOobject& fieldIoObject); 00140 00141 //- Reconstruct and write all fields 00142 template<class Type> 00143 void reconstructFields(const IOobjectList& objects); 00144 }; 00145 00146 00147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00148 00149 } // End namespace Foam 00150 00151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00152 00153 #ifdef NoRepository 00154 # include "pointFieldReconstructorReconstructFields.C" 00155 #endif 00156 00157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00158 00159 #endif 00160 00161 // ************************ vim: set sw=4 sts=4 et: ************************ //