GAMGAgglomeration.H
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef GAMGAgglomeration_H
00040 #define GAMGAgglomeration_H
00041
00042 #include "MeshObject.H"
00043 #include "lduPrimitiveMesh.H"
00044 #include "lduInterfacePtrsList.H"
00045 #include "primitiveFields.H"
00046 #include "runTimeSelectionTables.H"
00047
00048
00049
00050 namespace Foam
00051 {
00052
00053 class lduMesh;
00054 class lduMatrix;
00055
00056
00057
00058
00059
00060 class GAMGAgglomeration
00061 :
00062 public MeshObject<lduMesh, GAMGAgglomeration>
00063 {
00064 protected:
00065
00066
00067
00068
00069 label maxLevels_;
00070
00071
00072 label nCellsInCoarsestLevel_;
00073
00074
00075 labelList nCells_;
00076
00077
00078
00079 PtrList<labelField> restrictAddressing_;
00080
00081
00082
00083
00084
00085
00086
00087 PtrList<labelList> faceRestrictAddressing_;
00088
00089
00090 PtrList<lduPrimitiveMesh> meshLevels_;
00091
00092
00093
00094 PtrList<lduInterfacePtrsList> interfaceLevels_;
00095
00096
00097 void agglomerateLduAddressing(const label fineLevelIndex);
00098
00099
00100 void compactLevels(const label nCreatedLevels);
00101
00102
00103 bool continueAgglomerating(const label nCoarseCells) const;
00104
00105
00106
00107
00108
00109 GAMGAgglomeration(const GAMGAgglomeration&);
00110
00111
00112 void operator=(const GAMGAgglomeration&);
00113
00114
00115 public:
00116
00117
00118 TypeName("GAMGAgglomeration");
00119
00120
00121
00122
00123
00124 declareRunTimeSelectionTable
00125 (
00126 autoPtr,
00127 GAMGAgglomeration,
00128 lduMesh,
00129 (
00130 const lduMesh& mesh,
00131 const dictionary& controlDict
00132 ),
00133 (
00134 mesh,
00135 controlDict
00136 )
00137 );
00138
00139
00140
00141 declareRunTimeSelectionTable
00142 (
00143 autoPtr,
00144 GAMGAgglomeration,
00145 lduMatrix,
00146 (
00147 const lduMatrix& matrix,
00148 const dictionary& controlDict
00149 ),
00150 (
00151 matrix,
00152 controlDict
00153 )
00154 );
00155
00156
00157
00158
00159
00160 GAMGAgglomeration
00161 (
00162 const lduMesh& mesh,
00163 const dictionary& controlDict
00164 );
00165
00166
00167
00168
00169
00170 static const GAMGAgglomeration& New
00171 (
00172 const lduMesh& mesh,
00173 const dictionary& controlDict
00174 );
00175
00176
00177 static const GAMGAgglomeration& New
00178 (
00179 const lduMatrix& matrix,
00180 const dictionary& controlDict
00181 );
00182
00183
00184
00185
00186 ~GAMGAgglomeration();
00187
00188
00189
00190
00191
00192
00193 label size() const
00194 {
00195 return meshLevels_.size();
00196 }
00197
00198
00199 const lduMesh& meshLevel(const label leveli) const;
00200
00201
00202 const lduInterfacePtrsList& interfaceLevel
00203 (
00204 const label leveli
00205 ) const;
00206
00207
00208 const labelField& restrictAddressing(const label leveli) const
00209 {
00210 return restrictAddressing_[leveli];
00211 }
00212
00213
00214 const labelList& faceRestrictAddressing(const label leveli) const
00215 {
00216 return faceRestrictAddressing_[leveli];
00217 }
00218
00219
00220
00221
00222
00223 template<class Type>
00224 void restrictField
00225 (
00226 Field<Type>& cf,
00227 const Field<Type>& ff,
00228 const label fineLevelIndex
00229 ) const;
00230
00231
00232 template<class Type>
00233 void restrictFaceField
00234 (
00235 Field<Type>& cf,
00236 const Field<Type>& ff,
00237 const label fineLevelIndex
00238 ) const;
00239
00240
00241 template<class Type>
00242 void prolongField
00243 (
00244 Field<Type>& ff,
00245 const Field<Type>& cf,
00246 const label coarseLevelIndex
00247 ) const;
00248 };
00249
00250
00251
00252
00253 }
00254
00255
00256
00257 #ifdef NoRepository
00258 # include "GAMGAgglomerationTemplates.C"
00259 #endif
00260
00261
00262
00263 #endif
00264
00265
Copyright © 2000-2009 OpenCFD Ltd