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::processorMeshes 00026 00027 Description 00028 Container for processor mesh addressing. 00029 00030 SourceFiles 00031 processorMeshes.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef processorMeshes_H 00036 #define processorMeshes_H 00037 00038 #include <OpenFOAM/PtrList.H> 00039 #include <finiteVolume/fvMesh.H> 00040 #include <OpenFOAM/IOobjectList.H> 00041 #include <OpenFOAM/labelIOList.H> 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 00049 /*---------------------------------------------------------------------------*\ 00050 Class processorMeshes Declaration 00051 \*---------------------------------------------------------------------------*/ 00052 00053 class processorMeshes 00054 { 00055 // Private data 00056 00057 //- Processor databases 00058 PtrList<Time>& databases_; 00059 00060 const word meshName_; 00061 00062 //- List of processor meshes 00063 PtrList<fvMesh> meshes_; 00064 00065 //- List of processor point addressing lists 00066 PtrList<labelIOList> pointProcAddressing_; 00067 00068 //- List of processor face addressing lists 00069 PtrList<labelIOList> faceProcAddressing_; 00070 00071 //- List of processor cell addressing lists 00072 PtrList<labelIOList> cellProcAddressing_; 00073 00074 //- List of processor boundary addressing lists 00075 PtrList<labelIOList> boundaryProcAddressing_; 00076 00077 00078 // Private Member Functions 00079 00080 //- Read all meshes 00081 void read(); 00082 00083 //- Disallow default bitwise copy construct 00084 processorMeshes(const processorMeshes&); 00085 00086 //- Disallow default bitwise assignment 00087 void operator=(const processorMeshes&); 00088 00089 00090 public: 00091 00092 // Constructors 00093 00094 //- Construct from components 00095 processorMeshes(PtrList<Time>& databases, const word& meshName); 00096 00097 00098 // Member Functions 00099 00100 //- Update the meshes based on the mesh files saved in 00101 // time directories 00102 fvMesh::readUpdateState readUpdate(); 00103 00104 //- Reconstruct point position after motion in parallel 00105 void reconstructPoints(fvMesh& mesh); 00106 00107 PtrList<fvMesh>& meshes() 00108 { 00109 return meshes_; 00110 } 00111 const PtrList<labelIOList>& pointProcAddressing() const 00112 { 00113 return pointProcAddressing_; 00114 } 00115 PtrList<labelIOList>& faceProcAddressing() 00116 { 00117 return faceProcAddressing_; 00118 } 00119 const PtrList<labelIOList>& cellProcAddressing() const 00120 { 00121 return cellProcAddressing_; 00122 } 00123 const PtrList<labelIOList>& boundaryProcAddressing() const 00124 { 00125 return boundaryProcAddressing_; 00126 } 00127 00128 00129 }; 00130 00131 00132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00133 00134 } // End namespace Foam 00135 00136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00137 00138 #endif 00139 00140 // ************************ vim: set sw=4 sts=4 et: ************************ //