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::simpleGeomDecomp 00026 00027 Description 00028 00029 SourceFiles 00030 simpleGeomDecomp.C 00031 00032 \*---------------------------------------------------------------------------*/ 00033 00034 #ifndef simpleGeomDecomp_H 00035 #define simpleGeomDecomp_H 00036 00037 #include <decompositionMethods/geomDecomp.H> 00038 00039 namespace Foam 00040 { 00041 00042 /*---------------------------------------------------------------------------*\ 00043 Class simpleGeomDecomp Declaration 00044 \*---------------------------------------------------------------------------*/ 00045 00046 class simpleGeomDecomp 00047 : 00048 public geomDecomp 00049 { 00050 // Private Member Functions 00051 00052 void assignToProcessorGroup(labelList& processorGroup, const label); 00053 00054 void assignToProcessorGroup 00055 ( 00056 labelList& processorGroup, 00057 const label nProcGroup, 00058 const labelList& indices, 00059 const scalarField& weights, 00060 const scalar summedWeights 00061 ); 00062 00063 //- Disallow default bitwise copy construct and assignment 00064 void operator=(const simpleGeomDecomp&); 00065 simpleGeomDecomp(const simpleGeomDecomp&); 00066 00067 00068 public: 00069 00070 //- Runtime type information 00071 TypeName("simple"); 00072 00073 00074 // Constructors 00075 00076 //- Construct given the decomposition dictionary 00077 simpleGeomDecomp(const dictionary& decompositionDict); 00078 00079 //- Construct given the decomposition dictionary and mesh 00080 simpleGeomDecomp 00081 ( 00082 const dictionary& decompositionDict, 00083 const polyMesh& mesh 00084 ); 00085 00086 00087 // Destructor 00088 00089 virtual ~simpleGeomDecomp() 00090 {} 00091 00092 00093 // Member Functions 00094 00095 virtual bool parallelAware() const 00096 { 00097 // simpleDecomp does not attempt to do anything across proc 00098 // boundaries 00099 return false; 00100 } 00101 00102 virtual labelList decompose 00103 ( 00104 const pointField& points 00105 ); 00106 00107 virtual labelList decompose 00108 ( 00109 const pointField& points, 00110 const scalarField& pointWeights 00111 ); 00112 00113 //- Explicitly provided connectivity 00114 virtual labelList decompose 00115 ( 00116 const labelListList& globalCellCells, 00117 const pointField& cc, 00118 const scalarField& cWeights 00119 ) 00120 { 00121 return decompose(cc, cWeights); 00122 } 00123 }; 00124 00125 00126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00127 00128 } // End namespace Foam 00129 00130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00131 00132 #endif 00133 00134 // ************************ vim: set sw=4 sts=4 et: ************************ //