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::MGridGenGAMGAgglomeration 00026 00027 Description 00028 Agglomerate using the MGridGen algorithm. 00029 00030 SourceFiles 00031 MGridGenGAMGAgglomeration.C 00032 MGridGenGAMGAgglomerate.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef MGridGenGAMGAgglomeration_H 00037 #define MGridGenGAMGAgglomeration_H 00038 00039 #include <finiteVolume/fvMesh.H> 00040 #include <OpenFOAM/GAMGAgglomeration.H> 00041 00042 extern "C" 00043 { 00044 # include <mgridgen.h> 00045 } 00046 00047 00048 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00049 00050 namespace Foam 00051 { 00052 00053 class fvMesh; 00054 00055 /*---------------------------------------------------------------------------*\ 00056 Class MGridGenGAMGAgglomeration Declaration 00057 \*---------------------------------------------------------------------------*/ 00058 00059 class MGridGenGAMGAgglomeration 00060 : 00061 public GAMGAgglomeration 00062 { 00063 // Private data 00064 00065 const fvMesh& fvMesh_; 00066 00067 00068 // Private Member Functions 00069 00070 //- Construct the CSR format addressing 00071 void makeCompactCellFaceAddressingAndFaceWeights 00072 ( 00073 const lduAddressing& fineAddressing, 00074 List<idxtype>& cellCells, 00075 List<idxtype>& cellCellOffsets, 00076 const vectorField& Si, 00077 List<scalar>& faceWeights 00078 ); 00079 00080 //- Calculate and return agglomeration 00081 tmp<labelField> agglomerate 00082 ( 00083 label& nCoarseCells, 00084 const label minSize, 00085 const label maxSize, 00086 const lduAddressing& fineAddressing, 00087 const scalarField& V, 00088 const vectorField& Sf, 00089 const scalarField& Sb 00090 ); 00091 00092 00093 //- Disallow default bitwise copy construct 00094 MGridGenGAMGAgglomeration(const MGridGenGAMGAgglomeration&); 00095 00096 //- Disallow default bitwise assignment 00097 void operator=(const MGridGenGAMGAgglomeration&); 00098 00099 00100 public: 00101 00102 //- Runtime type information 00103 TypeName("MGridGen"); 00104 00105 00106 // Constructors 00107 00108 //- Construct given mesh and controls 00109 MGridGenGAMGAgglomeration 00110 ( 00111 const lduMesh& mesh, 00112 const dictionary& controlDict 00113 ); 00114 }; 00115 00116 00117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00118 00119 } // End namespace Foam 00120 00121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00122 00123 #endif 00124 00125 // ************************ vim: set sw=4 sts=4 et: ************************ //