$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 00028 #ifndef BOUNDARY_CONDITION_2D_HH 00029 #define BOUNDARY_CONDITION_2D_HH 00030 00031 #include "boundaryCondition/boundaryCondition2D.h" 00032 #include "boundaryCondition/regularizedBoundaryDynamics2D.h" 00033 #include "boundaryCondition/equilibriumBoundaryDynamics.h" 00034 #include "boundaryCondition/boundaryInstantiator2D.h" 00035 #include "boundaryCondition/wrappedLocalBoundaryProcessor2D.h" 00036 #include "atomicBlock/blockLattice2D.h" 00037 #include "multiBlock/multiBlockLattice2D.h" 00038 #include "core/blockSurface2D.h" 00039 #include "core/plbDebug.h" 00040 00041 namespace plb { 00042 00043 // PART I: Atomic-block version. 00044 00045 template<typename T, template<typename U> class Descriptor> 00046 void OnLatticeBoundaryCondition2D<T,Descriptor>::setVelocityConditionOnBlockBoundaries ( 00047 BlockLattice2D<T,Descriptor>& lattice, 00048 boundary::BcType bcType ) 00049 { 00050 setVelocityConditionOnBlockBoundaries ( 00051 lattice, lattice.getBoundingBox(), bcType ); 00052 } 00053 00054 template<typename T, template<typename U> class Descriptor> 00055 void OnLatticeBoundaryCondition2D<T,Descriptor>::setVelocityConditionOnBlockBoundaries ( 00056 BlockLattice2D<T,Descriptor>& lattice, 00057 Box2D applicationDomain, 00058 boundary::BcType bcType ) 00059 { 00060 setVelocityConditionOnBlockBoundaries ( 00061 lattice, lattice.getBoundingBox(), applicationDomain, bcType ); 00062 } 00063 00064 00065 template<typename T, template<typename U> class Descriptor> 00066 void OnLatticeBoundaryCondition2D<T,Descriptor>::setVelocityConditionOnBlockBoundaries ( 00067 BlockLattice2D<T,Descriptor>& lattice, 00068 Box2D block, Box2D applicationDomain, 00069 boundary::BcType bcType ) 00070 { 00071 plint boundaryWidth = 1; 00072 BlockSurface2D surf(block, boundaryWidth); 00073 Box2D intersection; 00074 if (intersect(surf.edge0N(), applicationDomain, intersection)) { 00075 addVelocityBoundary0N(intersection, lattice, bcType); 00076 } 00077 if (intersect(surf.edge0P(), applicationDomain, intersection)) { 00078 addVelocityBoundary0P(intersection, lattice, bcType); 00079 } 00080 if (intersect(surf.edge1N(), applicationDomain, intersection)) { 00081 addVelocityBoundary1N(intersection, lattice, bcType); 00082 } 00083 if (intersect(surf.edge1P(), applicationDomain, intersection)) { 00084 addVelocityBoundary1P(intersection, lattice, bcType); 00085 } 00086 00087 if (intersect(surf.cornerNN(), applicationDomain, intersection)) { 00088 addExternalVelocityCornerNN(intersection.x0, intersection.y0, lattice, bcType); 00089 } 00090 if (intersect(surf.cornerNP(), applicationDomain, intersection)) { 00091 addExternalVelocityCornerNP(intersection.x0, intersection.y0, lattice, bcType); 00092 } 00093 if (intersect(surf.cornerPN(), applicationDomain, intersection)) { 00094 addExternalVelocityCornerPN(intersection.x0, intersection.y0, lattice, bcType); 00095 } 00096 if (intersect(surf.cornerPP(), applicationDomain, intersection)) { 00097 addExternalVelocityCornerPP(intersection.x0, intersection.y0, lattice, bcType); 00098 } 00099 } 00100 00101 template<typename T, template<typename U> class Descriptor> 00102 void OnLatticeBoundaryCondition2D<T,Descriptor>::setPressureConditionOnBlockBoundaries ( 00103 BlockLattice2D<T,Descriptor>& lattice, 00104 boundary::BcType bcType ) 00105 { 00106 setPressureConditionOnBlockBoundaries ( 00107 lattice, lattice.getBoundingBox(), bcType ); 00108 } 00109 00110 template<typename T, template<typename U> class Descriptor> 00111 void OnLatticeBoundaryCondition2D<T,Descriptor>::setPressureConditionOnBlockBoundaries ( 00112 BlockLattice2D<T,Descriptor>& lattice, 00113 Box2D applicationDomain, 00114 boundary::BcType bcType ) 00115 { 00116 setPressureConditionOnBlockBoundaries ( 00117 lattice, lattice.getBoundingBox(), applicationDomain, bcType ); 00118 } 00119 00120 00121 template<typename T, template<typename U> class Descriptor> 00122 void OnLatticeBoundaryCondition2D<T,Descriptor>::setPressureConditionOnBlockBoundaries ( 00123 BlockLattice2D<T,Descriptor>& lattice, 00124 Box2D block, Box2D applicationDomain, 00125 boundary::BcType bcType ) 00126 { 00127 plint boundaryWidth = 1; 00128 BlockSurface2D surf(block, boundaryWidth); 00129 Box2D intersection; 00130 if (intersect(surf.edge0N(), applicationDomain, intersection)) { 00131 addPressureBoundary0N(intersection, lattice, bcType); 00132 } 00133 if (intersect(surf.edge0P(), applicationDomain, intersection)) { 00134 addPressureBoundary0P(intersection, lattice, bcType); 00135 } 00136 if (intersect(surf.edge1N(), applicationDomain, intersection)) { 00137 addPressureBoundary1N(intersection, lattice, bcType); 00138 } 00139 if (intersect(surf.edge1P(), applicationDomain, intersection)) { 00140 addPressureBoundary1P(intersection, lattice, bcType); 00141 } 00142 00143 /* 00144 if (intersect(surf.cornerNN(), applicationDomain, intersection)) { 00145 PLB_ASSERT( false ); 00146 } 00147 if (intersect(surf.cornerNP(), applicationDomain, intersection)) { 00148 PLB_ASSERT( false ); 00149 } 00150 if (intersect(surf.cornerPN(), applicationDomain, intersection)) { 00151 PLB_ASSERT( false ); 00152 } 00153 if (intersect(surf.cornerPP(), applicationDomain, intersection)) { 00154 PLB_ASSERT( false ); 00155 } 00156 */ 00157 } 00158 00159 // PART II: Multi-block version. 00160 00161 template<typename T, template<typename U> class Descriptor> 00162 void OnLatticeBoundaryCondition2D<T,Descriptor>::setVelocityConditionOnBlockBoundaries ( 00163 MultiBlockLattice2D<T,Descriptor>& lattice, 00164 boundary::BcType bcType ) 00165 { 00166 setVelocityConditionOnBlockBoundaries ( 00167 lattice, lattice.getBoundingBox(), bcType ); 00168 } 00169 00170 template<typename T, template<typename U> class Descriptor> 00171 void OnLatticeBoundaryCondition2D<T,Descriptor>::setVelocityConditionOnBlockBoundaries ( 00172 MultiBlockLattice2D<T,Descriptor>& lattice, 00173 Box2D applicationDomain, 00174 boundary::BcType bcType ) 00175 { 00176 setVelocityConditionOnBlockBoundaries ( 00177 lattice, lattice.getBoundingBox(), applicationDomain, bcType ); 00178 } 00179 00180 00181 template<typename T, template<typename U> class Descriptor> 00182 void OnLatticeBoundaryCondition2D<T,Descriptor>::setVelocityConditionOnBlockBoundaries ( 00183 MultiBlockLattice2D<T,Descriptor>& lattice, 00184 Box2D block, Box2D applicationDomain, 00185 boundary::BcType bcType ) 00186 { 00187 plint boundaryWidth = 1; 00188 BlockSurface2D surf(block, boundaryWidth); 00189 Box2D intersection; 00190 if (intersect(surf.edge0N(), applicationDomain, intersection)) { 00191 addVelocityBoundary0N(intersection, lattice, bcType); 00192 } 00193 if (intersect(surf.edge0P(), applicationDomain, intersection)) { 00194 addVelocityBoundary0P(intersection, lattice, bcType); 00195 } 00196 if (intersect(surf.edge1N(), applicationDomain, intersection)) { 00197 addVelocityBoundary1N(intersection, lattice, bcType); 00198 } 00199 if (intersect(surf.edge1P(), applicationDomain, intersection)) { 00200 addVelocityBoundary1P(intersection, lattice, bcType); 00201 } 00202 00203 if (intersect(surf.cornerNN(), applicationDomain, intersection)) { 00204 addExternalVelocityCornerNN(intersection.x0, intersection.y0, lattice, bcType); 00205 } 00206 if (intersect(surf.cornerNP(), applicationDomain, intersection)) { 00207 addExternalVelocityCornerNP(intersection.x0, intersection.y0, lattice, bcType); 00208 } 00209 if (intersect(surf.cornerPN(), applicationDomain, intersection)) { 00210 addExternalVelocityCornerPN(intersection.x0, intersection.y0, lattice, bcType); 00211 } 00212 if (intersect(surf.cornerPP(), applicationDomain, intersection)) { 00213 addExternalVelocityCornerPP(intersection.x0, intersection.y0, lattice, bcType); 00214 } 00215 } 00216 00217 template<typename T, template<typename U> class Descriptor> 00218 void OnLatticeBoundaryCondition2D<T,Descriptor>::setPressureConditionOnBlockBoundaries ( 00219 MultiBlockLattice2D<T,Descriptor>& lattice, 00220 boundary::BcType bcType ) 00221 { 00222 setPressureConditionOnBlockBoundaries ( 00223 lattice, lattice.getBoundingBox(), bcType ); 00224 } 00225 00226 template<typename T, template<typename U> class Descriptor> 00227 void OnLatticeBoundaryCondition2D<T,Descriptor>::setPressureConditionOnBlockBoundaries ( 00228 MultiBlockLattice2D<T,Descriptor>& lattice, 00229 Box2D applicationDomain, 00230 boundary::BcType bcType ) 00231 { 00232 setPressureConditionOnBlockBoundaries ( 00233 lattice, lattice.getBoundingBox(), applicationDomain, bcType ); 00234 } 00235 00236 00237 template<typename T, template<typename U> class Descriptor> 00238 void OnLatticeBoundaryCondition2D<T,Descriptor>::setPressureConditionOnBlockBoundaries ( 00239 MultiBlockLattice2D<T,Descriptor>& lattice, 00240 Box2D block, Box2D applicationDomain, 00241 boundary::BcType bcType ) 00242 { 00243 plint boundaryWidth = 1; 00244 BlockSurface2D surf(block, boundaryWidth); 00245 Box2D intersection; 00246 if (intersect(surf.edge0N(), applicationDomain, intersection)) { 00247 addPressureBoundary0N(intersection, lattice, bcType); 00248 } 00249 if (intersect(surf.edge0P(), applicationDomain, intersection)) { 00250 addPressureBoundary0P(intersection, lattice, bcType); 00251 } 00252 if (intersect(surf.edge1N(), applicationDomain, intersection)) { 00253 addPressureBoundary1N(intersection, lattice, bcType); 00254 } 00255 if (intersect(surf.edge1P(), applicationDomain, intersection)) { 00256 addPressureBoundary1P(intersection, lattice, bcType); 00257 } 00258 00259 if (intersect(surf.cornerNN(), applicationDomain, intersection)) { 00260 PLB_ASSERT( false ); 00261 } 00262 if (intersect(surf.cornerNP(), applicationDomain, intersection)) { 00263 PLB_ASSERT( false ); 00264 } 00265 if (intersect(surf.cornerPN(), applicationDomain, intersection)) { 00266 PLB_ASSERT( false ); 00267 } 00268 if (intersect(surf.cornerPP(), applicationDomain, intersection)) { 00269 PLB_ASSERT( false ); 00270 } 00271 } 00272 00273 template<typename T, template<typename U> class Descriptor> 00274 class RegularizedBoundaryManager2D { 00275 public: 00276 template<int direction, int orientation> 00277 static BoundaryCompositeDynamics<T,Descriptor>* 00278 getVelocityBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics); 00279 template<int direction, int orientation> 00280 static BoxProcessingFunctional2D_L<T,Descriptor>* 00281 getVelocityBoundaryFunctional(); 00282 00283 template<int direction, int orientation> 00284 static BoundaryCompositeDynamics<T,Descriptor>* 00285 getPressureBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics); 00286 template<int direction, int orientation> 00287 static BoxProcessingFunctional2D_L<T,Descriptor>* 00288 getPressureBoundaryFunctional(); 00289 00290 template<int xNormal, int yNormal> 00291 static BoundaryCompositeDynamics<T,Descriptor>* 00292 getExternalVelocityCornerDynamics(Dynamics<T,Descriptor>* baseDynamics); 00293 template<int xNormal, int yNormal> 00294 static BoxProcessingFunctional2D_L<T,Descriptor>* 00295 getExternalVelocityCornerFunctional(); 00296 00297 template<int xNormal, int yNormal> 00298 static BoundaryCompositeDynamics<T,Descriptor>* 00299 getInternalVelocityCornerDynamics(Dynamics<T,Descriptor>* baseDynamics); 00300 template<int xNormal, int yNormal> 00301 static BoxProcessingFunctional2D_L<T,Descriptor>* 00302 getInternalVelocityCornerFunctional(); 00303 }; 00304 00305 template<typename T, template<typename U> class Descriptor> 00306 class WrappedRegularizedBoundaryManager2D { 00307 public: 00308 template<int direction, int orientation> 00309 static BoundaryCompositeDynamics<T,Descriptor>* 00310 getVelocityBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics); 00311 template<int direction, int orientation> 00312 static BoxProcessingFunctional2D_L<T,Descriptor>* 00313 getVelocityBoundaryFunctional(); 00314 00315 template<int direction, int orientation> 00316 static BoundaryCompositeDynamics<T,Descriptor>* 00317 getPressureBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics); 00318 template<int direction, int orientation> 00319 static BoxProcessingFunctional2D_L<T,Descriptor>* 00320 getPressureBoundaryFunctional(); 00321 00322 template<int xNormal, int yNormal> 00323 static BoundaryCompositeDynamics<T,Descriptor>* 00324 getExternalVelocityCornerDynamics(Dynamics<T,Descriptor>* baseDynamics); 00325 template<int xNormal, int yNormal> 00326 static BoxProcessingFunctional2D_L<T,Descriptor>* 00327 getExternalVelocityCornerFunctional(); 00328 00329 template<int xNormal, int yNormal> 00330 static BoundaryCompositeDynamics<T,Descriptor>* 00331 getInternalVelocityCornerDynamics(Dynamics<T,Descriptor>* baseDynamics); 00332 template<int xNormal, int yNormal> 00333 static BoxProcessingFunctional2D_L<T,Descriptor>* 00334 getInternalVelocityCornerFunctional(); 00335 }; 00336 00337 template<typename T, template<typename U> class Descriptor> 00338 class EquilibriumBoundaryManager2D { 00339 public: 00340 template<int direction, int orientation> 00341 static BoundaryCompositeDynamics<T,Descriptor>* 00342 getVelocityBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics); 00343 template<int direction, int orientation> 00344 static BoxProcessingFunctional2D_L<T,Descriptor>* 00345 getVelocityBoundaryFunctional(); 00346 00347 template<int direction, int orientation> 00348 static BoundaryCompositeDynamics<T,Descriptor>* 00349 getPressureBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics); 00350 template<int direction, int orientation> 00351 static BoxProcessingFunctional2D_L<T,Descriptor>* 00352 getPressureBoundaryFunctional(); 00353 00354 template<int xNormal, int yNormal> 00355 static BoundaryCompositeDynamics<T,Descriptor>* 00356 getExternalVelocityCornerDynamics(Dynamics<T,Descriptor>* baseDynamics); 00357 template<int xNormal, int yNormal> 00358 static BoxProcessingFunctional2D_L<T,Descriptor>* 00359 getExternalVelocityCornerFunctional(); 00360 00361 template<int xNormal, int yNormal> 00362 static BoundaryCompositeDynamics<T,Descriptor>* 00363 getInternalVelocityCornerDynamics(Dynamics<T,Descriptor>* baseDynamics); 00364 template<int xNormal, int yNormal> 00365 static BoxProcessingFunctional2D_L<T,Descriptor>* 00366 getInternalVelocityCornerFunctional(); 00367 }; 00368 00369 template<typename T, template<typename U> class Descriptor> 00370 class InterpolationBoundaryManager2D { 00371 public: 00372 template<int direction, int orientation> 00373 static BoundaryCompositeDynamics<T,Descriptor>* 00374 getVelocityBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics); 00375 template<int direction, int orientation> 00376 static BoxProcessingFunctional2D_L<T,Descriptor>* 00377 getVelocityBoundaryFunctional(); 00378 00379 template<int direction, int orientation> 00380 static BoundaryCompositeDynamics<T,Descriptor>* 00381 getPressureBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics); 00382 template<int direction, int orientation> 00383 static BoxProcessingFunctional2D_L<T,Descriptor>* 00384 getPressureBoundaryFunctional(); 00385 00386 template<int xNormal, int yNormal> 00387 static BoundaryCompositeDynamics<T,Descriptor>* 00388 getExternalVelocityCornerDynamics(Dynamics<T,Descriptor>* baseDynamics); 00389 template<int xNormal, int yNormal> 00390 static BoxProcessingFunctional2D_L<T,Descriptor>* 00391 getExternalVelocityCornerFunctional(); 00392 00393 template<int xNormal, int yNormal> 00394 static BoundaryCompositeDynamics<T,Descriptor>* 00395 getInternalVelocityCornerDynamics(Dynamics<T,Descriptor>* baseDynamics); 00396 template<int xNormal, int yNormal> 00397 static BoxProcessingFunctional2D_L<T,Descriptor>* 00398 getInternalVelocityCornerFunctional(); 00399 }; 00400 00401 00403 00404 template<typename T, template<typename U> class Descriptor> 00405 template<int direction, int orientation> 00406 BoundaryCompositeDynamics<T,Descriptor>* 00407 RegularizedBoundaryManager2D<T,Descriptor>:: 00408 getVelocityBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics) 00409 { 00410 return new RegularizedVelocityBoundaryDynamics 00411 <T,Descriptor,direction,orientation>(baseDynamics); 00412 } 00413 00414 template<typename T, template<typename U> class Descriptor> 00415 template<int direction, int orientation> 00416 BoxProcessingFunctional2D_L<T,Descriptor>* 00417 RegularizedBoundaryManager2D<T,Descriptor>:: 00418 getVelocityBoundaryFunctional() 00419 { 00420 return 0; 00421 } 00422 00423 template<typename T, template<typename U> class Descriptor> 00424 template<int direction, int orientation> 00425 BoundaryCompositeDynamics<T,Descriptor>* 00426 RegularizedBoundaryManager2D<T,Descriptor>:: 00427 getPressureBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics) 00428 { 00429 return new RegularizedDensityBoundaryDynamics 00430 <T,Descriptor,direction,orientation>(baseDynamics); 00431 } 00432 00433 template<typename T, template<typename U> class Descriptor> 00434 template<int direction, int orientation> 00435 BoxProcessingFunctional2D_L<T,Descriptor>* 00436 RegularizedBoundaryManager2D<T,Descriptor>:: 00437 getPressureBoundaryFunctional() 00438 { 00439 return 0; 00440 } 00441 00442 template<typename T, template<typename U> class Descriptor> 00443 template<int xNormal, int yNormal> 00444 BoundaryCompositeDynamics<T,Descriptor>* RegularizedBoundaryManager2D<T,Descriptor>:: 00445 getExternalVelocityCornerDynamics(Dynamics<T,Descriptor>* baseDynamics) 00446 { 00447 return new StoreVelocityDynamics<T,Descriptor>(baseDynamics); 00448 } 00449 00450 template<typename T, template<typename U> class Descriptor> 00451 template<int xNormal, int yNormal> 00452 BoxProcessingFunctional2D_L<T,Descriptor>* 00453 RegularizedBoundaryManager2D<T,Descriptor>:: 00454 getExternalVelocityCornerFunctional() 00455 { 00456 return new OuterVelocityCornerFunctional2D<T,Descriptor, xNormal,yNormal>; 00457 } 00458 00459 template<typename T, template<typename U> class Descriptor> 00460 template<int xNormal, int yNormal> 00461 BoundaryCompositeDynamics<T,Descriptor>* 00462 RegularizedBoundaryManager2D<T,Descriptor>:: 00463 getInternalVelocityCornerDynamics(Dynamics<T,Descriptor>* baseDynamics) 00464 { 00465 return new RegularizedVelocityInnerCornerDynamics2D<T,Descriptor, xNormal, yNormal> 00466 (baseDynamics); 00467 } 00468 00469 template<typename T, template<typename U> class Descriptor> 00470 template<int xNormal, int yNormal> 00471 BoxProcessingFunctional2D_L<T,Descriptor>* 00472 RegularizedBoundaryManager2D<T,Descriptor>::getInternalVelocityCornerFunctional() 00473 { 00474 return 0; 00475 } 00476 00477 00479 00480 template<typename T, template<typename U> class Descriptor> 00481 template<int direction, int orientation> 00482 BoundaryCompositeDynamics<T,Descriptor>* 00483 WrappedRegularizedBoundaryManager2D<T,Descriptor>:: 00484 getVelocityBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics) 00485 { 00486 bool automaticPrepareCollision = false; 00487 return new RegularizedVelocityBoundaryDynamics 00488 <T,Descriptor,direction,orientation>(baseDynamics, automaticPrepareCollision); 00489 } 00490 00491 template<typename T, template<typename U> class Descriptor> 00492 template<int direction, int orientation> 00493 BoxProcessingFunctional2D_L<T,Descriptor>* 00494 WrappedRegularizedBoundaryManager2D<T,Descriptor>:: 00495 getVelocityBoundaryFunctional() 00496 { 00497 return new WrappedLocalBoundaryFunctional2D<T,Descriptor>; 00498 } 00499 00500 template<typename T, template<typename U> class Descriptor> 00501 template<int direction, int orientation> 00502 BoundaryCompositeDynamics<T,Descriptor>* 00503 WrappedRegularizedBoundaryManager2D<T,Descriptor>:: 00504 getPressureBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics) 00505 { 00506 bool automaticPrepareCollision = false; 00507 return new RegularizedDensityBoundaryDynamics 00508 <T,Descriptor,direction,orientation>(baseDynamics,automaticPrepareCollision); 00509 } 00510 00511 template<typename T, template<typename U> class Descriptor> 00512 template<int direction, int orientation> 00513 BoxProcessingFunctional2D_L<T,Descriptor>* 00514 WrappedRegularizedBoundaryManager2D<T,Descriptor>:: 00515 getPressureBoundaryFunctional() 00516 { 00517 return new WrappedLocalBoundaryFunctional2D<T,Descriptor>; 00518 } 00519 00520 template<typename T, template<typename U> class Descriptor> 00521 template<int xNormal, int yNormal> 00522 BoundaryCompositeDynamics<T,Descriptor>* 00523 WrappedRegularizedBoundaryManager2D<T,Descriptor>:: 00524 getExternalVelocityCornerDynamics(Dynamics<T,Descriptor>* baseDynamics) 00525 { 00526 return new StoreVelocityDynamics<T,Descriptor>(baseDynamics); 00527 } 00528 00529 template<typename T, template<typename U> class Descriptor> 00530 template<int xNormal, int yNormal> 00531 BoxProcessingFunctional2D_L<T,Descriptor>* 00532 WrappedRegularizedBoundaryManager2D<T,Descriptor>:: 00533 getExternalVelocityCornerFunctional() 00534 { 00535 return new OuterVelocityCornerFunctional2D<T,Descriptor, xNormal,yNormal>; 00536 } 00537 00538 template<typename T, template<typename U> class Descriptor> 00539 template<int xNormal, int yNormal> 00540 BoundaryCompositeDynamics<T,Descriptor>* 00541 WrappedRegularizedBoundaryManager2D<T,Descriptor>:: 00542 getInternalVelocityCornerDynamics(Dynamics<T,Descriptor>* baseDynamics) 00543 { 00544 bool automaticPrepareCollision = false; 00545 return new RegularizedVelocityInnerCornerDynamics2D<T,Descriptor, xNormal, yNormal> 00546 ( baseDynamics, automaticPrepareCollision ); 00547 } 00548 00549 template<typename T, template<typename U> class Descriptor> 00550 template<int xNormal, int yNormal> 00551 BoxProcessingFunctional2D_L<T,Descriptor>* 00552 WrappedRegularizedBoundaryManager2D<T,Descriptor>::getInternalVelocityCornerFunctional() 00553 { 00554 return new WrappedLocalBoundaryFunctional2D<T,Descriptor>; 00555 } 00556 00557 00559 00560 template<typename T, template<typename U> class Descriptor> 00561 template<int direction, int orientation> 00562 BoundaryCompositeDynamics<T,Descriptor>* 00563 EquilibriumBoundaryManager2D<T,Descriptor>:: 00564 getVelocityBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics) 00565 { 00566 return new EquilibriumVelocityBoundaryDynamics 00567 <T,Descriptor,direction,orientation>(baseDynamics); 00568 } 00569 00570 template<typename T, template<typename U> class Descriptor> 00571 template<int direction, int orientation> 00572 BoxProcessingFunctional2D_L<T,Descriptor>* 00573 EquilibriumBoundaryManager2D<T,Descriptor>:: 00574 getVelocityBoundaryFunctional() 00575 { 00576 return 0; 00577 } 00578 00579 template<typename T, template<typename U> class Descriptor> 00580 template<int direction, int orientation> 00581 BoundaryCompositeDynamics<T,Descriptor>* 00582 EquilibriumBoundaryManager2D<T,Descriptor>:: 00583 getPressureBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics) 00584 { 00585 return new EquilibriumDensityBoundaryDynamics 00586 <T,Descriptor,direction,orientation>(baseDynamics); 00587 } 00588 00589 template<typename T, template<typename U> class Descriptor> 00590 template<int direction, int orientation> 00591 BoxProcessingFunctional2D_L<T,Descriptor>* 00592 EquilibriumBoundaryManager2D<T,Descriptor>:: 00593 getPressureBoundaryFunctional() 00594 { 00595 return 0; 00596 } 00597 00598 template<typename T, template<typename U> class Descriptor> 00599 template<int xNormal, int yNormal> 00600 BoundaryCompositeDynamics<T,Descriptor>* EquilibriumBoundaryManager2D<T,Descriptor>:: 00601 getExternalVelocityCornerDynamics(Dynamics<T,Descriptor>* baseDynamics) 00602 { 00603 return new StoreVelocityDynamics<T,Descriptor>(baseDynamics); 00604 } 00605 00606 template<typename T, template<typename U> class Descriptor> 00607 template<int xNormal, int yNormal> 00608 BoxProcessingFunctional2D_L<T,Descriptor>* 00609 EquilibriumBoundaryManager2D<T,Descriptor>:: 00610 getExternalVelocityCornerFunctional() 00611 { 00612 return new OuterVelocityCornerFunctional2D<T,Descriptor, xNormal,yNormal>; 00613 } 00614 00615 template<typename T, template<typename U> class Descriptor> 00616 template<int xNormal, int yNormal> 00617 BoundaryCompositeDynamics<T,Descriptor>* 00618 EquilibriumBoundaryManager2D<T,Descriptor>:: 00619 getInternalVelocityCornerDynamics(Dynamics<T,Descriptor>* baseDynamics) 00620 { 00621 return new RegularizedVelocityInnerCornerDynamics2D<T,Descriptor, xNormal, yNormal>(baseDynamics); 00622 } 00623 00624 template<typename T, template<typename U> class Descriptor> 00625 template<int xNormal, int yNormal> 00626 BoxProcessingFunctional2D_L<T,Descriptor>* 00627 EquilibriumBoundaryManager2D<T,Descriptor>::getInternalVelocityCornerFunctional() 00628 { 00629 return 0; 00630 } 00631 00632 00634 00635 template<typename T, template<typename U> class Descriptor> 00636 template<int direction, int orientation> 00637 BoundaryCompositeDynamics<T,Descriptor>* InterpolationBoundaryManager2D<T,Descriptor>:: 00638 getVelocityBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics) 00639 { 00640 return new VelocityDirichletBoundaryDynamics 00641 <T,Descriptor,direction,orientation>(baseDynamics); 00642 } 00643 00644 template<typename T, template<typename U> class Descriptor> 00645 template<int direction, int orientation> 00646 BoxProcessingFunctional2D_L<T,Descriptor>* 00647 InterpolationBoundaryManager2D<T,Descriptor>:: 00648 getVelocityBoundaryFunctional() 00649 { 00650 return new StraightFdBoundaryFunctional2D<T,Descriptor,direction,orientation>; 00651 } 00652 00653 template<typename T, template<typename U> class Descriptor> 00654 template<int direction, int orientation> 00655 BoundaryCompositeDynamics<T,Descriptor>* InterpolationBoundaryManager2D<T,Descriptor>:: 00656 getPressureBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics) 00657 { 00658 return new DensityDirichletBoundaryDynamics 00659 <T,Descriptor,direction,orientation>(baseDynamics); 00660 } 00661 00662 template<typename T, template<typename U> class Descriptor> 00663 template<int direction, int orientation> 00664 BoxProcessingFunctional2D_L<T,Descriptor>* 00665 InterpolationBoundaryManager2D<T,Descriptor>:: 00666 getPressureBoundaryFunctional() 00667 { 00668 return new StraightFdBoundaryFunctional2D<T,Descriptor,direction,orientation>; 00669 } 00670 00671 template<typename T, template<typename U> class Descriptor> 00672 template<int xNormal, int yNormal> 00673 BoundaryCompositeDynamics<T,Descriptor>* InterpolationBoundaryManager2D<T,Descriptor>:: 00674 getExternalVelocityCornerDynamics(Dynamics<T,Descriptor>* baseDynamics) 00675 { 00676 return new StoreVelocityDynamics<T,Descriptor>(baseDynamics); 00677 } 00678 00679 template<typename T, template<typename U> class Descriptor> 00680 template<int xNormal, int yNormal> 00681 BoxProcessingFunctional2D_L<T,Descriptor>* 00682 InterpolationBoundaryManager2D<T,Descriptor>::getExternalVelocityCornerFunctional() 00683 { 00684 return new OuterVelocityCornerFunctional2D<T,Descriptor, xNormal,yNormal>; 00685 } 00686 00687 template<typename T, template<typename U> class Descriptor> 00688 template<int xNormal, int yNormal> 00689 BoundaryCompositeDynamics<T,Descriptor>* InterpolationBoundaryManager2D<T,Descriptor>:: 00690 getInternalVelocityCornerDynamics(Dynamics<T,Descriptor>* baseDynamics) 00691 { 00692 return new RegularizedVelocityInnerCornerDynamics2D<T,Descriptor, xNormal, yNormal>(baseDynamics); 00693 } 00694 00695 template<typename T, template<typename U> class Descriptor> 00696 template<int xNormal, int yNormal> 00697 BoxProcessingFunctional2D_L<T,Descriptor>* 00698 InterpolationBoundaryManager2D<T,Descriptor>::getInternalVelocityCornerFunctional() 00699 { 00700 return 0; 00701 } 00702 00703 00705 00706 template<typename T, template<typename U> class Descriptor> 00707 OnLatticeBoundaryCondition2D<T,Descriptor>* createLocalBoundaryCondition2D() { 00708 // For the default boundary condition, use the wrapped version which uses 00709 // data processors. This guarantees that other data processor based 00710 // algorithms work properly on boundaries; example: grid refinement. 00711 return new BoundaryConditionInstantiator2D < 00712 T, Descriptor, 00713 WrappedRegularizedBoundaryManager2D<T,Descriptor> >; 00714 } 00715 00716 template<typename T, template<typename U> class Descriptor> 00717 OnLatticeBoundaryCondition2D<T,Descriptor>* createDynamicsBasedLocalBoundaryCondition2D() { 00718 // Purely local, no data proessors (except in external corners). 00719 return new BoundaryConditionInstantiator2D < 00720 T, Descriptor, 00721 RegularizedBoundaryManager2D<T,Descriptor> >; 00722 } 00723 00724 template<typename T, template<typename U> class Descriptor> 00725 OnLatticeBoundaryCondition2D<T,Descriptor>* createEquilibriumBoundaryCondition2D() { 00726 return new BoundaryConditionInstantiator2D < 00727 T, Descriptor, 00728 EquilibriumBoundaryManager2D<T,Descriptor> >; 00729 } 00730 00731 template<typename T, template<typename U> class Descriptor> 00732 OnLatticeBoundaryCondition2D<T,Descriptor>* createInterpBoundaryCondition2D() { 00733 return new BoundaryConditionInstantiator2D < 00734 T, Descriptor, 00735 InterpolationBoundaryManager2D<T,Descriptor > >; 00736 } 00737 00738 } // namespace plb 00739 00740 #endif // BOUNDARY_CONDITION_2D_HH
1.6.3
1.6.3