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::ProcessorTopology 00026 00027 Description 00028 Determines processor-processor connection. After instantiation contains 00029 on all processors the processor-processor connection table. 00030 00031 *this[procI] gives the list of neighbouring processors. 00032 00033 SourceFiles 00034 ProcessorTopology.C 00035 00036 \*---------------------------------------------------------------------------*/ 00037 00038 #ifndef ProcessorTopology_H 00039 #define ProcessorTopology_H 00040 00041 #include <OpenFOAM/labelList.H> 00042 #include <OpenFOAM/lduSchedule.H> 00043 00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00045 00046 namespace Foam 00047 { 00048 00049 /*---------------------------------------------------------------------------*\ 00050 Class ProcessorTopology Declaration 00051 \*---------------------------------------------------------------------------*/ 00052 00053 template<class Patch, class ProcPatch> 00054 class ProcessorTopology 00055 : 00056 public labelListList 00057 { 00058 00059 private: 00060 00061 // Private data 00062 00063 //- Local map from neighbour proc to patchI. Different per processor! 00064 // -1 or patchI for connection to procID 00065 labelList procPatchMap_; 00066 00067 //- Order in which the patches should be initialised/evaluated 00068 // corresponding to the schedule 00069 lduSchedule patchSchedule_; 00070 00071 00072 // Private Member Functions 00073 00074 //- Return all neighbouring processors of this processor. Set 00075 // procPatchMap_. 00076 labelList procNeighbours(const PtrList<Patch>&); 00077 00078 public: 00079 00080 // Constructors 00081 00082 //- Construct from boundaryMesh 00083 ProcessorTopology(const PtrList<Patch>& patches); 00084 00085 00086 // Member Functions 00087 00088 //- from neighbour processor to index in boundaryMesh. Local information 00089 // (so not same over all processors) 00090 const labelList& procPatchMap() const 00091 { 00092 return procPatchMap_; 00093 } 00094 00095 //- Order in which the patches should be initialised/evaluated 00096 // corresponding to the schedule 00097 const lduSchedule& patchSchedule() const 00098 { 00099 return patchSchedule_; 00100 } 00101 }; 00102 00103 00104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00105 00106 } // End namespace Foam 00107 00108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00109 00110 #ifdef NoRepository 00111 # include "ProcessorTopology_.C" 00112 #endif 00113 00114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00115 00116 #endif 00117 00118 // ************************ vim: set sw=4 sts=4 et: ************************ //