$treeview $search $mathjax
|
Palabos
Version 1.1
$projectbrief
|
$projectbrief
|
$searchbox |
00001 /* This file is part of the Palabos library. 00002 * 00003 * Copyright (C) 2011 FlowKit Sarl 00004 * Avenue de Chailly 23 00005 * 1012 Lausanne, Switzerland 00006 * E-mail contact: contact@flowkit.com 00007 * 00008 * The most recent release of Palabos can be downloaded at 00009 * <http://www.palabos.org/> 00010 * 00011 * The library Palabos is free software: you can redistribute it and/or 00012 * modify it under the terms of the GNU Affero General Public License as 00013 * published by the Free Software Foundation, either version 3 of the 00014 * License, or (at your option) any later version. 00015 * 00016 * The library is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Affero General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Affero General Public License 00022 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00023 */ 00024 00025 /* Main author: Orestis Malaspinas 00026 */ 00027 00029 #ifndef ADVECTION_DIFFUSION_BOUNDARY_INSTANTIATOR_3D_H 00030 #define ADVECTION_DIFFUSION_BOUNDARY_INSTANTIATOR_3D_H 00031 00032 #include "core/globalDefs.h" 00033 #include "core/cell.h" 00034 #include "core/geometry3D.h" 00035 #include "dataProcessors/dataInitializerFunctional3D.h" 00036 #include "complexDynamics/advectionDiffusionBoundaryCondition3D.h" 00037 00038 namespace plb { 00039 00040 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00041 class AdvectionDiffusionBoundaryConditionInstantiator3D : 00042 public OnLatticeAdvectionDiffusionBoundaryCondition3D<T,Descriptor> { 00043 public: 00044 AdvectionDiffusionBoundaryConditionInstantiator3D(); 00045 00046 void addTemperatureBoundary0N ( 00047 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00048 boundary::BcType bcType ); 00049 void addTemperatureBoundary0P ( 00050 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00051 boundary::BcType bcType=boundary::dirichlet ); 00052 void addTemperatureBoundary1N ( 00053 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00054 boundary::BcType bcType ); 00055 void addTemperatureBoundary1P ( 00056 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00057 boundary::BcType bcType ); 00058 void addTemperatureBoundary2N ( 00059 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00060 boundary::BcType bcType ); 00061 void addTemperatureBoundary2P ( 00062 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00063 boundary::BcType bcType ); 00064 00065 void addTemperatureEdge0NN ( 00066 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00067 boundary::BcType bcType ); 00068 void addTemperatureEdge0NP ( 00069 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00070 boundary::BcType bcType ); 00071 void addTemperatureEdge0PN ( 00072 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00073 boundary::BcType bcType ); 00074 void addTemperatureEdge0PP ( 00075 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00076 boundary::BcType bcType ); 00077 void addTemperatureEdge1NN ( 00078 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00079 boundary::BcType bcType ); 00080 void addTemperatureEdge1NP ( 00081 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00082 boundary::BcType bcType ); 00083 void addTemperatureEdge1PN ( 00084 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00085 boundary::BcType bcType ); 00086 void addTemperatureEdge1PP ( 00087 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00088 boundary::BcType bcType ); 00089 void addTemperatureEdge2NN ( 00090 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00091 boundary::BcType bcType ); 00092 void addTemperatureEdge2NP ( 00093 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00094 boundary::BcType bcType ); 00095 void addTemperatureEdge2PN ( 00096 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00097 boundary::BcType bcType ); 00098 void addTemperatureEdge2PP ( 00099 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00100 boundary::BcType bcType ); 00101 00102 void addTemperatureCornerNNN ( 00103 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00104 boundary::BcType bcType ); 00105 void addTemperatureCornerNNP ( 00106 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00107 boundary::BcType bcType ); 00108 void addTemperatureCornerNPN ( 00109 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00110 boundary::BcType bcType ); 00111 void addTemperatureCornerNPP ( 00112 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00113 boundary::BcType bcType ); 00114 void addTemperatureCornerPNN ( 00115 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00116 boundary::BcType bcType ); 00117 void addTemperatureCornerPNP ( 00118 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00119 boundary::BcType bcType ); 00120 void addTemperatureCornerPPN ( 00121 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00122 boundary::BcType bcType ); 00123 void addTemperatureCornerPPP ( 00124 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00125 boundary::BcType bcType ); 00126 00127 00128 void addTemperatureBoundary0N ( 00129 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00130 boundary::BcType bcType ); 00131 void addTemperatureBoundary0P ( 00132 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00133 boundary::BcType bcType ); 00134 void addTemperatureBoundary1N ( 00135 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00136 boundary::BcType bcType ); 00137 void addTemperatureBoundary1P ( 00138 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00139 boundary::BcType bcType ); 00140 void addTemperatureBoundary2N ( 00141 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00142 boundary::BcType bcType ); 00143 void addTemperatureBoundary2P ( 00144 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00145 boundary::BcType bcType ); 00146 00147 void addTemperatureEdge0NN ( 00148 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00149 boundary::BcType bcType ); 00150 void addTemperatureEdge0NP ( 00151 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00152 boundary::BcType bcType ); 00153 void addTemperatureEdge0PN ( 00154 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00155 boundary::BcType bcType ); 00156 void addTemperatureEdge0PP ( 00157 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00158 boundary::BcType bcType ); 00159 void addTemperatureEdge1NN ( 00160 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00161 boundary::BcType bcType ); 00162 void addTemperatureEdge1NP ( 00163 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00164 boundary::BcType bcType ); 00165 void addTemperatureEdge1PN ( 00166 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00167 boundary::BcType bcType ); 00168 void addTemperatureEdge1PP ( 00169 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00170 boundary::BcType bcType ); 00171 void addTemperatureEdge2NN ( 00172 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00173 boundary::BcType bcType ); 00174 void addTemperatureEdge2NP ( 00175 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00176 boundary::BcType bcType ); 00177 void addTemperatureEdge2PN ( 00178 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00179 boundary::BcType bcType ); 00180 void addTemperatureEdge2PP ( 00181 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00182 boundary::BcType bcType ); 00183 00184 void addTemperatureCornerNNN ( 00185 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00186 boundary::BcType bcType ); 00187 void addTemperatureCornerNNP ( 00188 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00189 boundary::BcType bcType ); 00190 void addTemperatureCornerNPN ( 00191 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00192 boundary::BcType bcType ); 00193 void addTemperatureCornerNPP ( 00194 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00195 boundary::BcType bcType ); 00196 void addTemperatureCornerPNN ( 00197 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00198 boundary::BcType bcType ); 00199 void addTemperatureCornerPNP ( 00200 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00201 boundary::BcType bcType ); 00202 void addTemperatureCornerPPN ( 00203 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00204 boundary::BcType bcType ); 00205 void addTemperatureCornerPPP ( 00206 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00207 boundary::BcType bcType ); 00208 00209 private: 00210 template<int direction, int orientation> 00211 void addTemperatureBoundary ( 00212 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00213 boundary::BcType bcType ); 00214 template<int plane, int normal1, int normal2> 00215 void addTemperatureEdge ( 00216 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00217 boundary::BcType bcType ); 00218 template<int normalX, int normalY, int normalZ> 00219 void addTemperatureCorner ( 00220 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00221 boundary::BcType bcType ); 00222 00223 template<int direction, int orientation> 00224 void addTemperatureBoundary ( 00225 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00226 boundary::BcType bcType ); 00227 template<int plane, int normal1, int normal2> 00228 void addTemperatureEdge ( 00229 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00230 boundary::BcType bcType ); 00231 template<int normalX, int normalY, int normalZ> 00232 void addTemperatureCorner ( 00233 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00234 boundary::BcType bcType ); 00235 }; 00236 00237 00239 00240 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00241 AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00242 AdvectionDiffusionBoundaryConditionInstantiator3D() 00243 { } 00244 00245 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00246 template<int direction, int orientation> 00247 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00248 addTemperatureBoundary(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00249 boundary::BcType bcType) 00250 { 00251 PLB_PRECONDITION( domain.x0==domain.x1 || domain.y0==domain.y1 || domain.z0==domain.z1 ); 00252 00253 setCompositeDynamics ( 00254 lattice, domain, 00255 BoundaryManager::template getTemperatureBoundaryDynamics<direction,orientation>(new NoDynamics<T,Descriptor>) ); 00256 00257 // In case an outflow condition is used, start by instantiating a data processor which copies 00258 // all velocity values from the previous lattice cell. 00259 if (bcType==boundary::neumann) { 00260 integrateProcessingFunctional ( 00261 new FlatAdiabaticBoundaryFunctional3D<T,Descriptor, direction, orientation>, 00262 domain, lattice ); 00263 } 00264 00265 DataProcessorGenerator3D* generator 00266 = BoundaryManager::template getTemperatureBoundaryProcessor<direction,orientation>(domain); 00267 if (generator) { 00268 addInternalProcessor(*generator, lattice); 00269 delete generator; 00270 } 00271 } 00272 00273 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00274 template<int plane, int normal1, int normal2> 00275 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00276 addTemperatureEdge(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00277 boundary::BcType bcType) 00278 { 00279 PLB_PRECONDITION( 00280 ( domain.x0==domain.x1 && domain.y0==domain.y1 ) || 00281 ( domain.x0==domain.x1 && domain.z0==domain.z1 ) || 00282 ( domain.y0==domain.y1 && domain.z0==domain.z1 ) ); 00283 00284 setCompositeDynamics ( 00285 lattice, domain, 00286 BoundaryManager::template getTemperatureEdgeDynamics<plane,normal1,normal2>(new NoDynamics<T,Descriptor>) ); 00287 00288 DataProcessorGenerator3D* generator 00289 = BoundaryManager::template getTemperatureEdgeProcessor<plane,normal1,normal2>(domain); 00290 if (generator) { 00291 addInternalProcessor(*generator, lattice); 00292 delete generator; 00293 } 00294 } 00295 00296 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00297 template<int xNormal, int yNormal, int zNormal> 00298 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00299 addTemperatureCorner(plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00300 boundary::BcType bcType) 00301 { 00302 setCompositeDynamics ( 00303 lattice, Box3D(x,x, y,y, z,z), 00304 BoundaryManager::template getTemperatureCornerDynamics<xNormal,yNormal,zNormal>(new NoDynamics<T,Descriptor>) ); 00305 00306 DataProcessorGenerator3D* generator 00307 = BoundaryManager::template getTemperatureCornerProcessor<xNormal,yNormal,zNormal>(x, y, z); 00308 if (generator) { 00309 addInternalProcessor(*generator, lattice); 00310 delete generator; 00311 } 00312 } 00313 00314 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00315 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00316 addTemperatureBoundary0N(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00317 boundary::BcType bcType) 00318 { 00319 addTemperatureBoundary<0,-1>(domain, lattice, bcType); 00320 } 00321 00322 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00323 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00324 addTemperatureBoundary0P(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00325 boundary::BcType bcType) 00326 { 00327 addTemperatureBoundary<0,1>(domain, lattice, bcType); 00328 } 00329 00330 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00331 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00332 addTemperatureBoundary1N(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00333 boundary::BcType bcType) 00334 { 00335 addTemperatureBoundary<1,-1>(domain, lattice, bcType); 00336 } 00337 00338 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00339 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00340 addTemperatureBoundary1P(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00341 boundary::BcType bcType) 00342 { 00343 addTemperatureBoundary<1, 1>(domain, lattice, bcType); 00344 } 00345 00346 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00347 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00348 addTemperatureBoundary2N(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00349 boundary::BcType bcType) 00350 { 00351 addTemperatureBoundary<2,-1>(domain, lattice, bcType); 00352 } 00353 00354 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00355 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00356 addTemperatureBoundary2P(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00357 boundary::BcType bcType) 00358 { 00359 addTemperatureBoundary<2, 1>(domain, lattice, bcType); 00360 } 00361 00362 00363 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00364 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00365 addTemperatureEdge0NN(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00366 boundary::BcType bcType) 00367 { 00368 addTemperatureEdge<0,-1,-1>(domain, lattice, bcType); 00369 } 00370 00371 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00372 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00373 addTemperatureEdge0NP(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00374 boundary::BcType bcType) 00375 { 00376 addTemperatureEdge<0,-1, 1>(domain, lattice, bcType); 00377 } 00378 00379 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00380 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00381 addTemperatureEdge0PN(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00382 boundary::BcType bcType) 00383 { 00384 addTemperatureEdge<0, 1,-1>(domain, lattice, bcType); 00385 } 00386 00387 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00388 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00389 addTemperatureEdge0PP(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00390 boundary::BcType bcType) 00391 { 00392 addTemperatureEdge<0, 1, 1>(domain, lattice, bcType); 00393 } 00394 00395 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00396 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00397 addTemperatureEdge1NN(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00398 boundary::BcType bcType) 00399 { 00400 addTemperatureEdge<1,-1,-1>(domain, lattice, bcType); 00401 } 00402 00403 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00404 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00405 addTemperatureEdge1NP(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00406 boundary::BcType bcType) 00407 { 00408 addTemperatureEdge<1,-1, 1>(domain, lattice, bcType); 00409 } 00410 00411 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00412 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00413 addTemperatureEdge1PN(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00414 boundary::BcType bcType) 00415 { 00416 addTemperatureEdge<1, 1,-1>(domain, lattice, bcType); 00417 } 00418 00419 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00420 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00421 addTemperatureEdge1PP(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00422 boundary::BcType bcType) 00423 { 00424 addTemperatureEdge<1, 1, 1>(domain, lattice, bcType); 00425 } 00426 00427 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00428 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00429 addTemperatureEdge2NN(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00430 boundary::BcType bcType) 00431 { 00432 addTemperatureEdge<2,-1,-1>(domain, lattice, bcType); 00433 } 00434 00435 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00436 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00437 addTemperatureEdge2NP(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00438 boundary::BcType bcType) 00439 { 00440 addTemperatureEdge<2,-1, 1>(domain, lattice, bcType); 00441 } 00442 00443 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00444 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00445 addTemperatureEdge2PN(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00446 boundary::BcType bcType) 00447 { 00448 addTemperatureEdge<2, 1,-1>(domain, lattice, bcType); 00449 } 00450 00451 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00452 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00453 addTemperatureEdge2PP(Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00454 boundary::BcType bcType) 00455 { 00456 addTemperatureEdge<2, 1, 1>(domain, lattice, bcType); 00457 } 00458 00459 00460 00461 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00462 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00463 addTemperatureCornerNNN(plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00464 boundary::BcType bcType) 00465 { 00466 addTemperatureCorner<-1,-1,-1>(x,y,z, lattice, bcType); 00467 } 00468 00469 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00470 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00471 addTemperatureCornerNNP(plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00472 boundary::BcType bcType) 00473 { 00474 addTemperatureCorner<-1,-1, 1>(x,y,z, lattice, bcType); 00475 } 00476 00477 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00478 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00479 addTemperatureCornerNPN(plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00480 boundary::BcType bcType) 00481 { 00482 addTemperatureCorner<-1, 1,-1>(x,y,z, lattice, bcType); 00483 } 00484 00485 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00486 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00487 addTemperatureCornerNPP(plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00488 boundary::BcType bcType) 00489 { 00490 addTemperatureCorner<-1, 1, 1>(x,y,z, lattice, bcType); 00491 } 00492 00493 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00494 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00495 addTemperatureCornerPNN(plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00496 boundary::BcType bcType) 00497 { 00498 addTemperatureCorner< 1,-1,-1>(x,y,z, lattice, bcType); 00499 } 00500 00501 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00502 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00503 addTemperatureCornerPNP(plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00504 boundary::BcType bcType) 00505 { 00506 addTemperatureCorner< 1,-1, 1>(x,y,z, lattice, bcType); 00507 } 00508 00509 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00510 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00511 addTemperatureCornerPPN(plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00512 boundary::BcType bcType) 00513 { 00514 addTemperatureCorner< 1, 1,-1>(x,y,z, lattice, bcType); 00515 } 00516 00517 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00518 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00519 addTemperatureCornerPPP(plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00520 boundary::BcType bcType) 00521 { 00522 addTemperatureCorner< 1, 1, 1>(x,y,z, lattice, bcType); 00523 } 00524 00525 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00526 template<int direction, int orientation> 00527 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00528 addTemperatureBoundary(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00529 boundary::BcType bcType) 00530 { 00531 PLB_PRECONDITION( domain.x0==domain.x1 || domain.y0==domain.y1 || domain.z0==domain.z1 ); 00532 00533 setCompositeDynamics ( 00534 lattice, domain, 00535 BoundaryManager::template getTemperatureBoundaryDynamics<direction,orientation>(new NoDynamics<T,Descriptor>) ); 00536 00537 DataProcessorGenerator3D* generator 00538 = BoundaryManager::template getTemperatureBoundaryProcessor<direction,orientation>(domain); 00539 if (generator) { 00540 addInternalProcessor(*generator, lattice); 00541 delete generator; 00542 } 00543 } 00544 00545 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00546 template<int plane, int normal1, int normal2> 00547 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00548 addTemperatureEdge(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00549 boundary::BcType bcType) 00550 { 00551 PLB_PRECONDITION( 00552 ( domain.x0==domain.x1 && domain.y0==domain.y1 ) || 00553 ( domain.x0==domain.x1 && domain.z0==domain.z1 ) || 00554 ( domain.y0==domain.y1 && domain.z0==domain.z1 ) ); 00555 00556 setCompositeDynamics ( 00557 lattice, domain, 00558 BoundaryManager::template getTemperatureEdgeDynamics<plane,normal1,normal2>(new NoDynamics<T,Descriptor>) ); 00559 00560 DataProcessorGenerator3D* generator 00561 = BoundaryManager::template getTemperatureEdgeProcessor<plane,normal1,normal2>(domain); 00562 if (generator) { 00563 addInternalProcessor(*generator, lattice); 00564 delete generator; 00565 } 00566 } 00567 00568 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00569 template<int xNormal, int yNormal, int zNormal> 00570 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00571 addTemperatureCorner(plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00572 boundary::BcType bcType) 00573 { 00574 setCompositeDynamics ( 00575 lattice, Box3D(x,x, y,y, z,z), 00576 BoundaryManager::template getTemperatureCornerDynamics<xNormal,yNormal,zNormal>(new NoDynamics<T,Descriptor>) ); 00577 00578 DataProcessorGenerator3D* generator 00579 = BoundaryManager::template getTemperatureCornerProcessor<xNormal,yNormal,zNormal>(x, y, z); 00580 if (generator) { 00581 addInternalProcessor(*generator, lattice); 00582 delete generator; 00583 } 00584 } 00585 00586 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00587 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00588 addTemperatureBoundary0N(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00589 boundary::BcType bcType) 00590 { 00591 addTemperatureBoundary<0,-1>(domain, lattice, bcType); 00592 } 00593 00594 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00595 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00596 addTemperatureBoundary0P(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00597 boundary::BcType bcType) 00598 { 00599 addTemperatureBoundary<0,1>(domain, lattice, bcType); 00600 } 00601 00602 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00603 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00604 addTemperatureBoundary1N(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00605 boundary::BcType bcType) 00606 { 00607 addTemperatureBoundary<1,-1>(domain, lattice, bcType); 00608 } 00609 00610 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00611 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00612 addTemperatureBoundary1P(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00613 boundary::BcType bcType) 00614 { 00615 addTemperatureBoundary<1, 1>(domain, lattice, bcType); 00616 } 00617 00618 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00619 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00620 addTemperatureBoundary2N(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00621 boundary::BcType bcType) 00622 { 00623 addTemperatureBoundary<2,-1>(domain, lattice, bcType); 00624 } 00625 00626 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00627 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00628 addTemperatureBoundary2P(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00629 boundary::BcType bcType) 00630 { 00631 addTemperatureBoundary<2, 1>(domain, lattice, bcType); 00632 } 00633 00634 00635 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00636 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00637 addTemperatureEdge0NN(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00638 boundary::BcType bcType) 00639 { 00640 addTemperatureEdge<0,-1,-1>(domain, lattice, bcType); 00641 } 00642 00643 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00644 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00645 addTemperatureEdge0NP(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00646 boundary::BcType bcType) 00647 { 00648 addTemperatureEdge<0,-1, 1>(domain, lattice, bcType); 00649 } 00650 00651 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00652 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00653 addTemperatureEdge0PN(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00654 boundary::BcType bcType) 00655 { 00656 addTemperatureEdge<0, 1,-1>(domain, lattice, bcType); 00657 } 00658 00659 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00660 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00661 addTemperatureEdge0PP(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00662 boundary::BcType bcType) 00663 { 00664 addTemperatureEdge<0, 1, 1>(domain, lattice, bcType); 00665 } 00666 00667 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00668 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00669 addTemperatureEdge1NN(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00670 boundary::BcType bcType) 00671 { 00672 addTemperatureEdge<1,-1,-1>(domain, lattice, bcType); 00673 } 00674 00675 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00676 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00677 addTemperatureEdge1NP(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00678 boundary::BcType bcType) 00679 { 00680 addTemperatureEdge<1,-1, 1>(domain, lattice, bcType); 00681 } 00682 00683 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00684 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00685 addTemperatureEdge1PN(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00686 boundary::BcType bcType) 00687 { 00688 addTemperatureEdge<1, 1,-1>(domain, lattice, bcType); 00689 } 00690 00691 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00692 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00693 addTemperatureEdge1PP(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00694 boundary::BcType bcType) 00695 { 00696 addTemperatureEdge<1, 1, 1>(domain, lattice, bcType); 00697 } 00698 00699 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00700 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00701 addTemperatureEdge2NN(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00702 boundary::BcType bcType) 00703 { 00704 addTemperatureEdge<2,-1,-1>(domain, lattice, bcType); 00705 } 00706 00707 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00708 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00709 addTemperatureEdge2NP(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00710 boundary::BcType bcType) 00711 { 00712 addTemperatureEdge<2,-1, 1>(domain, lattice, bcType); 00713 } 00714 00715 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00716 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00717 addTemperatureEdge2PN(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00718 boundary::BcType bcType) 00719 { 00720 addTemperatureEdge<2, 1,-1>(domain, lattice, bcType); 00721 } 00722 00723 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00724 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00725 addTemperatureEdge2PP(Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 00726 boundary::BcType bcType) 00727 { 00728 addTemperatureEdge<2, 1, 1>(domain, lattice, bcType); 00729 } 00730 00731 00732 00733 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00734 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00735 addTemperatureCornerNNN(plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00736 boundary::BcType bcType) 00737 { 00738 addTemperatureCorner<-1,-1,-1>(x,y,z, lattice, bcType); 00739 } 00740 00741 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00742 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00743 addTemperatureCornerNNP(plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00744 boundary::BcType bcType) 00745 { 00746 addTemperatureCorner<-1,-1, 1>(x,y,z, lattice, bcType); 00747 } 00748 00749 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00750 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00751 addTemperatureCornerNPN(plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00752 boundary::BcType bcType) 00753 { 00754 addTemperatureCorner<-1, 1,-1>(x,y,z, lattice, bcType); 00755 } 00756 00757 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00758 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00759 addTemperatureCornerNPP(plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00760 boundary::BcType bcType) 00761 { 00762 addTemperatureCorner<-1, 1, 1>(x,y,z, lattice, bcType); 00763 } 00764 00765 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00766 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00767 addTemperatureCornerPNN(plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00768 boundary::BcType bcType) 00769 { 00770 addTemperatureCorner< 1,-1,-1>(x,y,z, lattice, bcType); 00771 } 00772 00773 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00774 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00775 addTemperatureCornerPNP(plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00776 boundary::BcType bcType) 00777 { 00778 addTemperatureCorner< 1,-1, 1>(x,y,z, lattice, bcType); 00779 } 00780 00781 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00782 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00783 addTemperatureCornerPPN(plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00784 boundary::BcType bcType) 00785 { 00786 addTemperatureCorner< 1, 1,-1>(x,y,z, lattice, bcType); 00787 } 00788 00789 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00790 void AdvectionDiffusionBoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00791 addTemperatureCornerPPP(plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 00792 boundary::BcType bcType) 00793 { 00794 addTemperatureCorner< 1, 1, 1>(x,y,z, lattice, bcType); 00795 } 00796 00797 } // namespace plb 00798 00799 #endif
1.6.3
1.6.3