$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 00026 #ifndef BOUNDARY_INSTANTIATOR_3D_H 00027 #define BOUNDARY_INSTANTIATOR_3D_H 00028 00029 #include "core/globalDefs.h" 00030 #include "core/cell.h" 00031 #include "core/geometry3D.h" 00032 #include "boundaryCondition/boundaryCondition3D.h" 00033 #include "boundaryCondition/neumannCondition3D.h" 00034 #include "dataProcessors/dataInitializerFunctional3D.h" 00035 #include "dataProcessors/dataInitializerWrapper3D.h" 00036 #include "atomicBlock/blockLattice3D.h" 00037 #include "atomicBlock/atomicBlockOperations3D.h" 00038 #include "multiBlock/multiBlockLattice3D.h" 00039 #include "multiBlock/multiBlockOperations3D.h" 00040 00041 namespace plb { 00042 00043 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00044 class BoundaryConditionInstantiator3D : public OnLatticeBoundaryCondition3D<T,Descriptor> { 00045 public: 00046 virtual BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>* clone() const; 00047 00048 // PART I: Atomic-block version. 00049 00050 void addVelocityBoundary0N ( 00051 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00052 void addVelocityBoundary0P ( 00053 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00054 void addVelocityBoundary1N ( 00055 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00056 void addVelocityBoundary1P ( 00057 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00058 void addVelocityBoundary2N ( 00059 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00060 void addVelocityBoundary2P ( 00061 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00062 00063 void addPressureBoundary0N ( 00064 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00065 void addPressureBoundary0P ( 00066 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00067 void addPressureBoundary1N ( 00068 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00069 void addPressureBoundary1P ( 00070 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00071 void addPressureBoundary2N ( 00072 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00073 void addPressureBoundary2P ( 00074 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00075 00076 void addExternalVelocityEdge0NN ( 00077 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00078 void addExternalVelocityEdge0NP ( 00079 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00080 void addExternalVelocityEdge0PN ( 00081 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00082 void addExternalVelocityEdge0PP ( 00083 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00084 void addExternalVelocityEdge1NN ( 00085 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00086 void addExternalVelocityEdge1NP ( 00087 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00088 void addExternalVelocityEdge1PN ( 00089 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00090 void addExternalVelocityEdge1PP ( 00091 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00092 void addExternalVelocityEdge2NN ( 00093 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00094 void addExternalVelocityEdge2NP ( 00095 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00096 void addExternalVelocityEdge2PN ( 00097 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00098 void addExternalVelocityEdge2PP ( 00099 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00100 00101 void addInternalVelocityEdge0NN ( 00102 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00103 void addInternalVelocityEdge0NP ( 00104 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00105 void addInternalVelocityEdge0PN ( 00106 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00107 void addInternalVelocityEdge0PP ( 00108 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00109 void addInternalVelocityEdge1NN ( 00110 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00111 void addInternalVelocityEdge1NP ( 00112 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00113 void addInternalVelocityEdge1PN ( 00114 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00115 void addInternalVelocityEdge1PP ( 00116 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00117 void addInternalVelocityEdge2NN ( 00118 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00119 void addInternalVelocityEdge2NP ( 00120 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00121 void addInternalVelocityEdge2PN ( 00122 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00123 void addInternalVelocityEdge2PP ( 00124 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00125 00126 void addExternalVelocityCornerNNN ( 00127 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00128 void addExternalVelocityCornerNNP ( 00129 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00130 void addExternalVelocityCornerNPN ( 00131 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00132 void addExternalVelocityCornerNPP ( 00133 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00134 void addExternalVelocityCornerPNN ( 00135 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00136 void addExternalVelocityCornerPNP ( 00137 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00138 void addExternalVelocityCornerPPN ( 00139 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00140 void addExternalVelocityCornerPPP ( 00141 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00142 00143 void addInternalVelocityCornerNNN ( 00144 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00145 void addInternalVelocityCornerNNP ( 00146 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00147 void addInternalVelocityCornerNPN ( 00148 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00149 void addInternalVelocityCornerNPP ( 00150 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00151 void addInternalVelocityCornerPNN ( 00152 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00153 void addInternalVelocityCornerPNP ( 00154 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00155 void addInternalVelocityCornerPPN ( 00156 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00157 void addInternalVelocityCornerPPP ( 00158 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00159 00160 // PART II: Multi-block version. 00161 00162 void addVelocityBoundary0N ( 00163 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00164 void addVelocityBoundary0P ( 00165 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00166 void addVelocityBoundary1N ( 00167 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00168 void addVelocityBoundary1P ( 00169 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00170 void addVelocityBoundary2N ( 00171 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00172 void addVelocityBoundary2P ( 00173 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00174 00175 void addPressureBoundary0N ( 00176 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00177 void addPressureBoundary0P ( 00178 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00179 void addPressureBoundary1N ( 00180 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00181 void addPressureBoundary1P ( 00182 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00183 void addPressureBoundary2N ( 00184 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00185 void addPressureBoundary2P ( 00186 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00187 00188 void addExternalVelocityEdge0NN ( 00189 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00190 void addExternalVelocityEdge0NP ( 00191 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00192 void addExternalVelocityEdge0PN ( 00193 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00194 void addExternalVelocityEdge0PP ( 00195 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00196 void addExternalVelocityEdge1NN ( 00197 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00198 void addExternalVelocityEdge1NP ( 00199 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00200 void addExternalVelocityEdge1PN ( 00201 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00202 void addExternalVelocityEdge1PP ( 00203 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00204 void addExternalVelocityEdge2NN ( 00205 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00206 void addExternalVelocityEdge2NP ( 00207 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00208 void addExternalVelocityEdge2PN ( 00209 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00210 void addExternalVelocityEdge2PP ( 00211 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00212 00213 void addInternalVelocityEdge0NN ( 00214 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00215 void addInternalVelocityEdge0NP ( 00216 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00217 void addInternalVelocityEdge0PN ( 00218 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00219 void addInternalVelocityEdge0PP ( 00220 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00221 void addInternalVelocityEdge1NN ( 00222 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00223 void addInternalVelocityEdge1NP ( 00224 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00225 void addInternalVelocityEdge1PN ( 00226 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00227 void addInternalVelocityEdge1PP ( 00228 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00229 void addInternalVelocityEdge2NN ( 00230 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00231 void addInternalVelocityEdge2NP ( 00232 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00233 void addInternalVelocityEdge2PN ( 00234 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00235 void addInternalVelocityEdge2PP ( 00236 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00237 00238 void addExternalVelocityCornerNNN ( 00239 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00240 void addExternalVelocityCornerNNP ( 00241 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00242 void addExternalVelocityCornerNPN ( 00243 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00244 void addExternalVelocityCornerNPP ( 00245 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00246 void addExternalVelocityCornerPNN ( 00247 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00248 void addExternalVelocityCornerPNP ( 00249 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00250 void addExternalVelocityCornerPPN ( 00251 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00252 void addExternalVelocityCornerPPP ( 00253 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00254 00255 void addInternalVelocityCornerNNN ( 00256 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00257 void addInternalVelocityCornerNNP ( 00258 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00259 void addInternalVelocityCornerNPN ( 00260 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00261 void addInternalVelocityCornerNPP ( 00262 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00263 void addInternalVelocityCornerPNN ( 00264 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00265 void addInternalVelocityCornerPNP ( 00266 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00267 void addInternalVelocityCornerPPN ( 00268 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00269 void addInternalVelocityCornerPPP ( 00270 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00271 00272 private: 00273 // PART I: Atomic-block version. 00274 00275 template<int direction, int orientation> 00276 void addVelocityBoundary ( 00277 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00278 template<int direction, int orientation> 00279 void addPressureBoundary ( 00280 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00281 template<int plane, int normal1, int normal2> 00282 void addExternalVelocityEdge ( 00283 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00284 template<int plane, int normal1, int normal2> 00285 void addInternalVelocityEdge ( 00286 Box3D domain, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00287 template<int normalX, int normalY, int normalZ> 00288 void addExternalVelocityCorner ( 00289 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00290 template<int normalX, int normalY, int normalZ> 00291 void addInternalVelocityCorner ( 00292 plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00293 00294 // PART II: Multi-block version. 00295 00296 template<int direction, int orientation> 00297 void addVelocityBoundary ( 00298 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00299 template<int direction, int orientation> 00300 void addPressureBoundary ( 00301 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00302 template<int plane, int normal1, int normal2> 00303 void addExternalVelocityEdge ( 00304 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00305 template<int plane, int normal1, int normal2> 00306 void addInternalVelocityEdge ( 00307 Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00308 template<int normalX, int normalY, int normalZ> 00309 void addExternalVelocityCorner ( 00310 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00311 template<int normalX, int normalY, int normalZ> 00312 void addInternalVelocityCorner ( 00313 plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ); 00314 }; 00315 00316 00318 00319 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00320 BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>* 00321 BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>::clone() const 00322 { 00323 return new BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>(*this); 00324 } 00325 00326 // PART I: Atomic-block version. 00327 00328 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00329 template<int direction, int orientation> 00330 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00331 addVelocityBoundary( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00332 boundary::BcType bcType ) 00333 { 00334 PLB_PRECONDITION( domain.x0==domain.x1 || domain.y0==domain.y1 || domain.z0==domain.z1 ); 00335 00336 // Convert (direction,orientation) description of the normal vector into a (normalX,normalY,normalZ) 00337 // description, as it is requried by the data processor for Neumann boundaries. 00338 enum { 00339 normalX = (direction==0) ? orientation : 0, 00340 normalY = (direction==1) ? orientation : 0, 00341 normalZ = (direction==2) ? orientation : 0 00342 }; 00343 00344 // Instantiate the dynamics of the boundary as a composite dynamics, based on the one currently 00345 // residing on the lattice. 00346 setCompositeDynamics ( 00347 lattice, domain, 00348 BoundaryManager::template getVelocityBoundaryDynamics<direction,orientation> ( 00349 new NoDynamics<T,Descriptor> ) ); 00350 00351 // In case an outflow condition is used, start by instantiating a data processor which copies 00352 // all velocity values from the previous lattice cell. 00353 if (bcType==boundary::outflow || bcType==boundary::neumann) { 00354 integrateProcessingFunctional ( 00355 new CopyVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 00356 domain, lattice ); 00357 } 00358 00359 // In case a freeslip condition is used, start by instantiating a data processor which copies 00360 // the tangential velocity values from the previous lattice cell. 00361 else if (bcType==boundary::freeslip) { 00362 integrateProcessingFunctional ( 00363 new CopyTangentialVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 00364 domain, lattice ); 00365 } 00366 00367 // In case a normal outflow condition is used, start by instantiating a data processor which copies 00368 // the normal velocity values from the previous lattice cell, and sets the other ones to zero. 00369 else if (bcType==boundary::normalOutflow) { 00370 integrateProcessingFunctional ( 00371 new CopyNormalVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 00372 domain, lattice ); 00373 } 00374 00375 // If the boundary condition has a non-local component, instantiate a corresponding data processor. 00376 BoxProcessingFunctional3D_L<T,Descriptor>* functional 00377 = BoundaryManager::template getVelocityBoundaryFunctional<direction,orientation>(); 00378 if (functional) { 00379 integrateProcessingFunctional(functional, domain, lattice); 00380 } 00381 } 00382 00383 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00384 template<int direction, int orientation> 00385 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00386 addPressureBoundary( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00387 boundary::BcType bcType ) 00388 { 00389 PLB_PRECONDITION( domain.x0==domain.x1 || domain.y0==domain.y1 || domain.z0==domain.z1 ); 00390 00391 // Convert (direction,orientation) description of the normal vector into a (normalX,normalY,normalZ) 00392 // description, as it is requried by the data processor for Neumann boundaries. 00393 enum { 00394 normalX = (direction==0) ? orientation : 0, 00395 normalY = (direction==1) ? orientation : 0, 00396 normalZ = (direction==2) ? orientation : 0 00397 }; 00398 00399 // Instantiate the dynamics of the boundary as a composite dynamics, based on the one currently 00400 // residing on the lattice. 00401 setCompositeDynamics ( 00402 lattice, domain, 00403 BoundaryManager::template getPressureBoundaryDynamics<direction,orientation> ( 00404 new NoDynamics<T,Descriptor> ) ); 00405 00406 // In case a Neumann condition is used, start by instantiating a data processor which copies 00407 // the density value from the previous lattice cell. 00408 if (bcType==boundary::neumann) { 00409 integrateProcessingFunctional ( 00410 new CopyDensityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 00411 domain, lattice ); 00412 } 00413 00414 // If the boundary condition has a non-local component, instantiate a corresponding data processor. 00415 BoxProcessingFunctional3D_L<T,Descriptor>* functional 00416 = BoundaryManager::template getPressureBoundaryFunctional<direction,orientation>(); 00417 if (functional) { 00418 integrateProcessingFunctional(functional, domain, lattice); 00419 } 00420 } 00421 00422 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00423 template<int plane, int normal1, int normal2> 00424 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00425 addExternalVelocityEdge( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00426 boundary::BcType bcType ) 00427 { 00428 PLB_PRECONDITION( 00429 ( domain.x0==domain.x1 && domain.y0==domain.y1 ) || 00430 ( domain.x0==domain.x1 && domain.z0==domain.z1 ) || 00431 ( domain.y0==domain.y1 && domain.z0==domain.z1 ) ); 00432 00433 // Convert (plane,normal1,normal2) description of the normal vector into a (normalX,normalY,normalZ) 00434 // description, as it is requried by the data processor for Neumann boundaries. 00435 enum { 00436 normalX = plane==0 ? 0 : (plane==1 ? normal2 : normal1), 00437 normalY = plane==1 ? 0 : (plane==2 ? normal2 : normal1), 00438 normalZ = plane==2 ? 0 : (plane==0 ? normal2 : normal1) 00439 }; 00440 00441 setCompositeDynamics ( 00442 lattice, domain, 00443 BoundaryManager::template getExternalVelocityEdgeDynamics<plane,normal1,normal2> ( 00444 new NoDynamics<T,Descriptor> ) ); 00445 00446 if (bcType==boundary::neumann || bcType==boundary::outflow) { 00447 integrateProcessingFunctional ( 00448 new CopyVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 00449 domain, lattice ); 00450 } 00451 else 00452 if (bcType==boundary::freeslip) { 00453 integrateProcessingFunctional ( 00454 new CopyTangentialVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 00455 domain, lattice ); 00456 } 00457 else 00458 if (bcType==boundary::normalOutflow) { 00459 integrateProcessingFunctional ( 00460 new CopyNormalVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 00461 domain, lattice ); 00462 } 00463 00464 BoxProcessingFunctional3D_L<T,Descriptor>* functional 00465 = BoundaryManager::template getExternalVelocityEdgeFunctional<plane,normal1,normal2>(); 00466 if (functional) { 00467 integrateProcessingFunctional(functional, domain, lattice); 00468 } 00469 } 00470 00471 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00472 template<int plane, int normal1, int normal2> 00473 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00474 addInternalVelocityEdge( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00475 boundary::BcType bcType ) 00476 { 00477 PLB_PRECONDITION( 00478 ( domain.x0==domain.x1 && domain.y0==domain.y1 ) || 00479 ( domain.x0==domain.x1 && domain.z0==domain.z1 ) || 00480 ( domain.y0==domain.y1 && domain.z0==domain.z1 ) ); 00481 00482 // Convert (plane,normal1,normal2) description of the normal vector into a (normalX,normalY,normalZ) 00483 // description, as it is requried by the data processor for Neumann boundaries. 00484 enum { 00485 normalX = plane==0 ? 0 : (plane==1 ? normal2 : normal1), 00486 normalY = plane==1 ? 0 : (plane==2 ? normal2 : normal1), 00487 normalZ = plane==2 ? 0 : (plane==0 ? normal2 : normal1) 00488 }; 00489 00490 setCompositeDynamics ( 00491 lattice, domain, 00492 BoundaryManager::template getInternalVelocityEdgeDynamics<plane,normal1,normal2> ( 00493 new NoDynamics<T,Descriptor> ) ); 00494 00495 if (bcType==boundary::neumann || bcType==boundary::outflow) { 00496 integrateProcessingFunctional ( 00497 new CopyVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 00498 domain, lattice ); 00499 } 00500 else 00501 if (bcType==boundary::freeslip) { 00502 integrateProcessingFunctional ( 00503 new CopyTangentialVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 00504 domain, lattice ); 00505 } 00506 else 00507 if (bcType==boundary::normalOutflow) { 00508 integrateProcessingFunctional ( 00509 new CopyNormalVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 00510 domain, lattice ); 00511 } 00512 00513 BoxProcessingFunctional3D_L<T,Descriptor>* functional 00514 = BoundaryManager::template getInternalVelocityEdgeFunctional<plane,normal1,normal2>(); 00515 if (functional) { 00516 integrateProcessingFunctional(functional, domain, lattice); 00517 } 00518 } 00519 00520 00521 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00522 template<int xNormal, int yNormal, int zNormal> 00523 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00524 addExternalVelocityCorner( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00525 boundary::BcType bcType ) 00526 { 00527 setCompositeDynamics ( 00528 lattice, Box3D(x,x, y,y, z,z), 00529 BoundaryManager::template getExternalVelocityCornerDynamics<xNormal,yNormal,zNormal> ( 00530 new NoDynamics<T,Descriptor> ) ); 00531 00532 if (bcType==boundary::neumann || bcType==boundary::outflow) { 00533 integrateProcessingFunctional ( 00534 new CopyVelocityFunctional3D<T,Descriptor, xNormal,yNormal,zNormal>, 00535 Box3D(x,x, y,y, z,z), lattice ); 00536 } 00537 else 00538 if (bcType==boundary::freeslip) { 00539 integrateProcessingFunctional ( 00540 new CopyTangentialVelocityFunctional3D<T,Descriptor, xNormal,yNormal,zNormal>, 00541 Box3D(x,x, y,y, z,z), lattice ); 00542 } 00543 else 00544 if (bcType==boundary::normalOutflow) { 00545 integrateProcessingFunctional ( 00546 new CopyNormalVelocityFunctional3D<T,Descriptor, xNormal,yNormal,zNormal>, 00547 Box3D(x,x, y,y, z,z), lattice ); 00548 } 00549 00550 BoxProcessingFunctional3D_L<T,Descriptor>* functional 00551 = BoundaryManager::template getExternalVelocityCornerFunctional<xNormal,yNormal,zNormal>(); 00552 if (functional) { 00553 integrateProcessingFunctional(functional, Box3D(x,x, y,y, z,z), lattice); 00554 } 00555 } 00556 00557 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00558 template<int xNormal, int yNormal, int zNormal> 00559 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00560 addInternalVelocityCorner( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00561 boundary::BcType bcType ) 00562 { 00563 setCompositeDynamics ( 00564 lattice, Box3D(x,x, y,y, z,z), 00565 BoundaryManager::template getInternalVelocityCornerDynamics<xNormal,yNormal,zNormal> ( 00566 new NoDynamics<T,Descriptor> ) ); 00567 00568 if (bcType==boundary::neumann || bcType==boundary::outflow) { 00569 integrateProcessingFunctional ( 00570 new CopyVelocityFunctional3D<T,Descriptor, xNormal,yNormal,zNormal>, 00571 Box3D(x,x, y,y, z,z), lattice ); 00572 } 00573 00574 if (bcType==boundary::freeslip) { 00575 integrateProcessingFunctional ( 00576 new CopyTangentialVelocityFunctional3D<T,Descriptor, xNormal,yNormal,zNormal>, 00577 Box3D(x,x, y,y, z,z), lattice ); 00578 } 00579 00580 if (bcType==boundary::normalOutflow) { 00581 integrateProcessingFunctional ( 00582 new CopyNormalVelocityFunctional3D<T,Descriptor, xNormal,yNormal,zNormal>, 00583 Box3D(x,x, y,y, z,z), lattice ); 00584 } 00585 00586 BoxProcessingFunctional3D_L<T,Descriptor>* functional 00587 = BoundaryManager::template getInternalVelocityCornerFunctional<xNormal,yNormal,zNormal>(); 00588 if (functional) { 00589 integrateProcessingFunctional(functional, Box3D(x,x, y,y, z,z), lattice); 00590 } 00591 } 00592 00593 00594 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00595 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00596 addVelocityBoundary0N( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00597 boundary::BcType bcType ) 00598 { 00599 addVelocityBoundary<0,-1>(domain, lattice, bcType); 00600 } 00601 00602 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00603 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00604 addVelocityBoundary0P( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00605 boundary::BcType bcType ) 00606 { 00607 addVelocityBoundary<0,1>(domain, lattice, bcType); 00608 } 00609 00610 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00611 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00612 addVelocityBoundary1N( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00613 boundary::BcType bcType ) 00614 { 00615 addVelocityBoundary<1,-1>(domain, lattice, bcType); 00616 } 00617 00618 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00619 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00620 addVelocityBoundary1P( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00621 boundary::BcType bcType ) 00622 { 00623 addVelocityBoundary<1, 1>(domain, lattice, bcType); 00624 } 00625 00626 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00627 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00628 addVelocityBoundary2N( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00629 boundary::BcType bcType ) 00630 { 00631 addVelocityBoundary<2,-1>(domain, lattice, bcType); 00632 } 00633 00634 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00635 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00636 addVelocityBoundary2P( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00637 boundary::BcType bcType ) 00638 { 00639 addVelocityBoundary<2, 1>(domain, lattice, bcType); 00640 } 00641 00642 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00643 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00644 addPressureBoundary0N( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00645 boundary::BcType bcType ) 00646 { 00647 addPressureBoundary<0,-1>(domain, lattice, bcType); 00648 } 00649 00650 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00651 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00652 addPressureBoundary0P( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00653 boundary::BcType bcType ) 00654 { 00655 addPressureBoundary<0,1>(domain, lattice, bcType); 00656 } 00657 00658 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00659 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00660 addPressureBoundary1N( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00661 boundary::BcType bcType ) 00662 { 00663 addPressureBoundary<1,-1>(domain, lattice, bcType); 00664 } 00665 00666 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00667 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00668 addPressureBoundary1P( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00669 boundary::BcType bcType ) 00670 { 00671 addPressureBoundary<1, 1>(domain, lattice, bcType); 00672 } 00673 00674 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00675 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00676 addPressureBoundary2N( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00677 boundary::BcType bcType ) 00678 { 00679 addPressureBoundary<2,-1>(domain, lattice, bcType); 00680 } 00681 00682 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00683 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00684 addPressureBoundary2P( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00685 boundary::BcType bcType ) 00686 { 00687 addPressureBoundary<2, 1>(domain, lattice, bcType); 00688 } 00689 00690 00691 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00692 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00693 addExternalVelocityEdge0NN( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00694 boundary::BcType bcType ) 00695 { 00696 addExternalVelocityEdge<0,-1,-1>(domain, lattice, bcType); 00697 } 00698 00699 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00700 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00701 addExternalVelocityEdge0NP( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00702 boundary::BcType bcType ) 00703 { 00704 addExternalVelocityEdge<0,-1, 1>(domain, lattice, bcType); 00705 } 00706 00707 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00708 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00709 addExternalVelocityEdge0PN( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00710 boundary::BcType bcType ) 00711 { 00712 addExternalVelocityEdge<0, 1,-1>(domain, lattice, bcType); 00713 } 00714 00715 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00716 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00717 addExternalVelocityEdge0PP( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00718 boundary::BcType bcType ) 00719 { 00720 addExternalVelocityEdge<0, 1, 1>(domain, lattice, bcType); 00721 } 00722 00723 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00724 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00725 addExternalVelocityEdge1NN( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00726 boundary::BcType bcType ) 00727 { 00728 addExternalVelocityEdge<1,-1,-1>(domain, lattice, bcType); 00729 } 00730 00731 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00732 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00733 addExternalVelocityEdge1NP( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00734 boundary::BcType bcType ) 00735 { 00736 addExternalVelocityEdge<1,-1, 1>(domain, lattice, bcType); 00737 } 00738 00739 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00740 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00741 addExternalVelocityEdge1PN( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00742 boundary::BcType bcType ) 00743 { 00744 addExternalVelocityEdge<1, 1,-1>(domain, lattice, bcType); 00745 } 00746 00747 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00748 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00749 addExternalVelocityEdge1PP( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00750 boundary::BcType bcType ) 00751 { 00752 addExternalVelocityEdge<1, 1, 1>(domain, lattice, bcType); 00753 } 00754 00755 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00756 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00757 addExternalVelocityEdge2NN( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00758 boundary::BcType bcType ) 00759 { 00760 addExternalVelocityEdge<2,-1,-1>(domain, lattice, bcType); 00761 } 00762 00763 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00764 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00765 addExternalVelocityEdge2NP( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00766 boundary::BcType bcType ) 00767 { 00768 addExternalVelocityEdge<2,-1, 1>(domain, lattice, bcType); 00769 } 00770 00771 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00772 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00773 addExternalVelocityEdge2PN( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00774 boundary::BcType bcType ) 00775 { 00776 addExternalVelocityEdge<2, 1,-1>(domain, lattice, bcType); 00777 } 00778 00779 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00780 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00781 addExternalVelocityEdge2PP( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00782 boundary::BcType bcType ) 00783 { 00784 addExternalVelocityEdge<2, 1, 1>(domain, lattice, bcType); 00785 } 00786 00787 00788 00789 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00790 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00791 addInternalVelocityEdge0NN( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00792 boundary::BcType bcType ) 00793 { 00794 addInternalVelocityEdge<0,-1,-1>(domain, lattice, bcType); 00795 } 00796 00797 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00798 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00799 addInternalVelocityEdge0NP( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00800 boundary::BcType bcType ) 00801 { 00802 addInternalVelocityEdge<0,-1, 1>(domain, lattice, bcType); 00803 } 00804 00805 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00806 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00807 addInternalVelocityEdge0PN( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00808 boundary::BcType bcType ) 00809 { 00810 addInternalVelocityEdge<0, 1,-1>(domain, lattice, bcType); 00811 } 00812 00813 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00814 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00815 addInternalVelocityEdge0PP( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00816 boundary::BcType bcType ) 00817 { 00818 addInternalVelocityEdge<0, 1, 1>(domain, lattice, bcType); 00819 } 00820 00821 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00822 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00823 addInternalVelocityEdge1NN( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00824 boundary::BcType bcType ) 00825 { 00826 addInternalVelocityEdge<1,-1,-1>(domain, lattice, bcType); 00827 } 00828 00829 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00830 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00831 addInternalVelocityEdge1NP( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00832 boundary::BcType bcType ) 00833 { 00834 addInternalVelocityEdge<1,-1, 1>(domain, lattice, bcType); 00835 } 00836 00837 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00838 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00839 addInternalVelocityEdge1PN( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00840 boundary::BcType bcType ) 00841 { 00842 addInternalVelocityEdge<1, 1,-1>(domain, lattice, bcType); 00843 } 00844 00845 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00846 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00847 addInternalVelocityEdge1PP( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00848 boundary::BcType bcType ) 00849 { 00850 addInternalVelocityEdge<1, 1, 1>(domain, lattice, bcType); 00851 } 00852 00853 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00854 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00855 addInternalVelocityEdge2NN( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00856 boundary::BcType bcType ) 00857 { 00858 addInternalVelocityEdge<2,-1,-1>(domain, lattice, bcType); 00859 } 00860 00861 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00862 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00863 addInternalVelocityEdge2NP( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00864 boundary::BcType bcType ) 00865 { 00866 addInternalVelocityEdge<2,-1, 1>(domain, lattice, bcType); 00867 } 00868 00869 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00870 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00871 addInternalVelocityEdge2PN( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00872 boundary::BcType bcType ) 00873 { 00874 addInternalVelocityEdge<2, 1,-1>(domain, lattice, bcType); 00875 } 00876 00877 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00878 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00879 addInternalVelocityEdge2PP( Box3D domain, BlockLattice3D<T,Descriptor>& lattice, 00880 boundary::BcType bcType ) 00881 { 00882 addInternalVelocityEdge<2, 1, 1>(domain, lattice, bcType); 00883 } 00884 00885 00886 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00887 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00888 addExternalVelocityCornerNNN( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00889 boundary::BcType bcType ) 00890 { 00891 addExternalVelocityCorner<-1,-1,-1>(x,y,z, lattice, bcType); 00892 } 00893 00894 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00895 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00896 addExternalVelocityCornerNNP( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00897 boundary::BcType bcType ) 00898 { 00899 addExternalVelocityCorner<-1,-1, 1>(x,y,z, lattice, bcType); 00900 } 00901 00902 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00903 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00904 addExternalVelocityCornerNPN( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00905 boundary::BcType bcType ) 00906 { 00907 addExternalVelocityCorner<-1, 1,-1>(x,y,z, lattice, bcType); 00908 } 00909 00910 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00911 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00912 addExternalVelocityCornerNPP( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00913 boundary::BcType bcType ) 00914 { 00915 addExternalVelocityCorner<-1, 1, 1>(x,y,z, lattice, bcType); 00916 } 00917 00918 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00919 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00920 addExternalVelocityCornerPNN( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00921 boundary::BcType bcType ) 00922 { 00923 addExternalVelocityCorner< 1,-1,-1>(x,y,z, lattice, bcType); 00924 } 00925 00926 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00927 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00928 addExternalVelocityCornerPNP( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00929 boundary::BcType bcType ) 00930 { 00931 addExternalVelocityCorner< 1,-1, 1>(x,y,z, lattice, bcType); 00932 } 00933 00934 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00935 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00936 addExternalVelocityCornerPPN( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00937 boundary::BcType bcType ) 00938 { 00939 addExternalVelocityCorner< 1, 1,-1>(x,y,z, lattice, bcType); 00940 } 00941 00942 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00943 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00944 addExternalVelocityCornerPPP( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00945 boundary::BcType bcType ) 00946 { 00947 addExternalVelocityCorner< 1, 1, 1>(x,y,z, lattice, bcType); 00948 } 00949 00950 00951 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00952 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00953 addInternalVelocityCornerNNN( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00954 boundary::BcType bcType ) 00955 { 00956 addInternalVelocityCorner<-1,-1,-1>(x,y,z, lattice, bcType); 00957 } 00958 00959 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00960 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00961 addInternalVelocityCornerNNP( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00962 boundary::BcType bcType ) 00963 { 00964 addInternalVelocityCorner<-1,-1, 1>(x,y,z, lattice, bcType); 00965 } 00966 00967 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00968 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00969 addInternalVelocityCornerNPN( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00970 boundary::BcType bcType ) 00971 { 00972 addInternalVelocityCorner<-1, 1,-1>(x,y,z, lattice, bcType); 00973 } 00974 00975 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00976 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00977 addInternalVelocityCornerNPP( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00978 boundary::BcType bcType ) 00979 { 00980 addInternalVelocityCorner<-1, 1, 1>(x,y,z, lattice, bcType); 00981 } 00982 00983 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00984 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00985 addInternalVelocityCornerPNN( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00986 boundary::BcType bcType ) 00987 { 00988 addInternalVelocityCorner< 1,-1,-1>(x,y,z, lattice, bcType); 00989 } 00990 00991 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 00992 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 00993 addInternalVelocityCornerPNP( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 00994 boundary::BcType bcType ) 00995 { 00996 addInternalVelocityCorner< 1,-1, 1>(x,y,z, lattice, bcType); 00997 } 00998 00999 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01000 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01001 addInternalVelocityCornerPPN( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 01002 boundary::BcType bcType ) 01003 { 01004 addInternalVelocityCorner< 1, 1,-1>(x,y,z, lattice, bcType); 01005 } 01006 01007 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01008 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01009 addInternalVelocityCornerPPP( plint x, plint y, plint z, BlockLattice3D<T,Descriptor>& lattice, 01010 boundary::BcType bcType ) 01011 { 01012 addInternalVelocityCorner< 1, 1, 1>(x,y,z, lattice, bcType); 01013 } 01014 01015 // PART II: Multi-block version. 01016 01017 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01018 template<int direction, int orientation> 01019 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01020 addVelocityBoundary( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01021 boundary::BcType bcType ) 01022 { 01023 PLB_PRECONDITION( domain.x0==domain.x1 || domain.y0==domain.y1 || domain.z0==domain.z1 ); 01024 01025 // Convert (direction,orientation) description of the normal vector into a (normalX,normalY,normalZ) 01026 // description, as it is requried by the data processor for Neumann boundaries. 01027 enum { 01028 normalX = (direction==0) ? orientation : 0, 01029 normalY = (direction==1) ? orientation : 0, 01030 normalZ = (direction==2) ? orientation : 0 01031 }; 01032 01033 // Instantiate the dynamics of the boundary as a composite dynamics, based on the one currently 01034 // residing on the lattice. 01035 setCompositeDynamics ( 01036 lattice, domain, 01037 BoundaryManager::template getVelocityBoundaryDynamics<direction,orientation> ( 01038 new NoDynamics<T,Descriptor> ) ); 01039 01040 // In case an outflow condition is used, start by instantiating a data processor which copies 01041 // all velocity values from the previous lattice cell. 01042 if (bcType==boundary::outflow || bcType==boundary::neumann) { 01043 integrateProcessingFunctional ( 01044 new CopyVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 01045 domain, lattice ); 01046 } 01047 01048 // In case a freeslip condition is used, start by instantiating a data processor which copies 01049 // the tangential velocity values from the previous lattice cell. 01050 else if (bcType==boundary::freeslip) { 01051 integrateProcessingFunctional ( 01052 new CopyTangentialVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 01053 domain, lattice ); 01054 } 01055 01056 // In case a normal outflow condition is used, start by instantiating a data processor which copies 01057 // the normal velocity values from the previous lattice cell, and sets the other ones to zero. 01058 else if (bcType==boundary::normalOutflow) { 01059 integrateProcessingFunctional ( 01060 new CopyNormalVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 01061 domain, lattice ); 01062 } 01063 01064 // If the boundary condition has a non-local component, instantiate a corresponding data processor. 01065 BoxProcessingFunctional3D_L<T,Descriptor>* functional 01066 = BoundaryManager::template getVelocityBoundaryFunctional<direction,orientation>(); 01067 if (functional) { 01068 integrateProcessingFunctional(functional, domain, lattice); 01069 } 01070 } 01071 01072 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01073 template<int direction, int orientation> 01074 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01075 addPressureBoundary( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01076 boundary::BcType bcType ) 01077 { 01078 PLB_PRECONDITION( domain.x0==domain.x1 || domain.y0==domain.y1 || domain.z0==domain.z1 ); 01079 01080 // Convert (direction,orientation) description of the normal vector into a (normalX,normalY,normalZ) 01081 // description, as it is requried by the data processor for Neumann boundaries. 01082 enum { 01083 normalX = (direction==0) ? orientation : 0, 01084 normalY = (direction==1) ? orientation : 0, 01085 normalZ = (direction==2) ? orientation : 0 01086 }; 01087 01088 // Instantiate the dynamics of the boundary as a composite dynamics, based on the one currently 01089 // residing on the lattice. 01090 setCompositeDynamics ( 01091 lattice, domain, 01092 BoundaryManager::template getPressureBoundaryDynamics<direction,orientation> ( 01093 new NoDynamics<T,Descriptor> ) ); 01094 01095 // In case a Neumann condition is used, start by instantiating a data processor which copies 01096 // the density value from the previous lattice cell. 01097 if (bcType==boundary::neumann) { 01098 integrateProcessingFunctional ( 01099 new CopyDensityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 01100 domain, lattice ); 01101 } 01102 01103 // If the boundary condition has a non-local component, instantiate a corresponding data processor. 01104 BoxProcessingFunctional3D_L<T,Descriptor>* functional 01105 = BoundaryManager::template getPressureBoundaryFunctional<direction,orientation>(); 01106 if (functional) { 01107 integrateProcessingFunctional(functional, domain, lattice); 01108 } 01109 } 01110 01111 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01112 template<int plane, int normal1, int normal2> 01113 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01114 addExternalVelocityEdge( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01115 boundary::BcType bcType ) 01116 { 01117 PLB_PRECONDITION( 01118 ( domain.x0==domain.x1 && domain.y0==domain.y1 ) || 01119 ( domain.x0==domain.x1 && domain.z0==domain.z1 ) || 01120 ( domain.y0==domain.y1 && domain.z0==domain.z1 ) ); 01121 01122 // Convert (plane,normal1,normal2) description of the normal vector into a (normalX,normalY,normalZ) 01123 // description, as it is requried by the data processor for Neumann boundaries. 01124 enum { 01125 normalX = plane==0 ? 0 : (plane==1 ? normal2 : normal1), 01126 normalY = plane==1 ? 0 : (plane==2 ? normal2 : normal1), 01127 normalZ = plane==2 ? 0 : (plane==0 ? normal2 : normal1) 01128 }; 01129 01130 setCompositeDynamics ( 01131 lattice, domain, 01132 BoundaryManager::template getExternalVelocityEdgeDynamics<plane,normal1,normal2> ( 01133 new NoDynamics<T,Descriptor> ) ); 01134 01135 if (bcType==boundary::neumann || bcType==boundary::outflow) { 01136 integrateProcessingFunctional ( 01137 new CopyVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 01138 domain, lattice ); 01139 } 01140 else 01141 if (bcType==boundary::freeslip) { 01142 integrateProcessingFunctional ( 01143 new CopyTangentialVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 01144 domain, lattice ); 01145 } 01146 else 01147 if (bcType==boundary::normalOutflow) { 01148 integrateProcessingFunctional ( 01149 new CopyNormalVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 01150 domain, lattice ); 01151 } 01152 01153 BoxProcessingFunctional3D_L<T,Descriptor>* functional 01154 = BoundaryManager::template getExternalVelocityEdgeFunctional<plane,normal1,normal2>(); 01155 if (functional) { 01156 integrateProcessingFunctional(functional, domain, lattice); 01157 } 01158 } 01159 01160 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01161 template<int plane, int normal1, int normal2> 01162 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01163 addInternalVelocityEdge( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01164 boundary::BcType bcType ) 01165 { 01166 PLB_PRECONDITION( 01167 ( domain.x0==domain.x1 && domain.y0==domain.y1 ) || 01168 ( domain.x0==domain.x1 && domain.z0==domain.z1 ) || 01169 ( domain.y0==domain.y1 && domain.z0==domain.z1 ) ); 01170 01171 // Convert (plane,normal1,normal2) description of the normal vector into a (normalX,normalY,normalZ) 01172 // description, as it is requried by the data processor for Neumann boundaries. 01173 enum { 01174 normalX = plane==0 ? 0 : (plane==1 ? normal2 : normal1), 01175 normalY = plane==1 ? 0 : (plane==2 ? normal2 : normal1), 01176 normalZ = plane==2 ? 0 : (plane==0 ? normal2 : normal1) 01177 }; 01178 01179 setCompositeDynamics ( 01180 lattice, domain, 01181 BoundaryManager::template getInternalVelocityEdgeDynamics<plane,normal1,normal2> ( 01182 new NoDynamics<T,Descriptor> ) ); 01183 01184 if (bcType==boundary::neumann || bcType==boundary::outflow) { 01185 integrateProcessingFunctional ( 01186 new CopyVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 01187 domain, lattice ); 01188 } 01189 else 01190 if (bcType==boundary::freeslip) { 01191 integrateProcessingFunctional ( 01192 new CopyTangentialVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 01193 domain, lattice ); 01194 } 01195 else 01196 if (bcType==boundary::normalOutflow) { 01197 integrateProcessingFunctional ( 01198 new CopyNormalVelocityFunctional3D<T,Descriptor, normalX, normalY, normalZ>, 01199 domain, lattice ); 01200 } 01201 01202 BoxProcessingFunctional3D_L<T,Descriptor>* functional 01203 = BoundaryManager::template getInternalVelocityEdgeFunctional<plane,normal1,normal2>(); 01204 if (functional) { 01205 integrateProcessingFunctional(functional, domain, lattice); 01206 } 01207 } 01208 01209 01210 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01211 template<int xNormal, int yNormal, int zNormal> 01212 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01213 addExternalVelocityCorner( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01214 boundary::BcType bcType ) 01215 { 01216 setCompositeDynamics ( 01217 lattice, Box3D(x,x, y,y, z,z), 01218 BoundaryManager::template getExternalVelocityCornerDynamics<xNormal,yNormal,zNormal> ( 01219 new NoDynamics<T,Descriptor> ) ); 01220 01221 if (bcType==boundary::neumann || bcType==boundary::outflow) { 01222 integrateProcessingFunctional ( 01223 new CopyVelocityFunctional3D<T,Descriptor, xNormal,yNormal,zNormal>, 01224 Box3D(x,x, y,y, z,z), lattice ); 01225 } 01226 else 01227 if (bcType==boundary::freeslip) { 01228 integrateProcessingFunctional ( 01229 new CopyTangentialVelocityFunctional3D<T,Descriptor, xNormal,yNormal,zNormal>, 01230 Box3D(x,x, y,y, z,z), lattice ); 01231 } 01232 else 01233 if (bcType==boundary::normalOutflow) { 01234 integrateProcessingFunctional ( 01235 new CopyNormalVelocityFunctional3D<T,Descriptor, xNormal,yNormal,zNormal>, 01236 Box3D(x,x, y,y, z,z), lattice ); 01237 } 01238 01239 BoxProcessingFunctional3D_L<T,Descriptor>* functional 01240 = BoundaryManager::template getExternalVelocityCornerFunctional<xNormal,yNormal,zNormal>(); 01241 if (functional) { 01242 integrateProcessingFunctional(functional, Box3D(x,x, y,y, z,z), lattice ); 01243 } 01244 } 01245 01246 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01247 template<int xNormal, int yNormal, int zNormal> 01248 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01249 addInternalVelocityCorner( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01250 boundary::BcType bcType ) 01251 { 01252 setCompositeDynamics ( 01253 lattice, Box3D(x,x, y,y, z,z), 01254 BoundaryManager::template getInternalVelocityCornerDynamics<xNormal,yNormal,zNormal> ( 01255 new NoDynamics<T,Descriptor> ) ); 01256 01257 if (bcType==boundary::neumann || bcType==boundary::outflow) { 01258 integrateProcessingFunctional ( 01259 new CopyVelocityFunctional3D<T,Descriptor, xNormal,yNormal,zNormal>, 01260 Box3D(x,x, y,y, z,z), lattice ); 01261 } 01262 01263 if (bcType==boundary::freeslip) { 01264 integrateProcessingFunctional ( 01265 new CopyTangentialVelocityFunctional3D<T,Descriptor, xNormal,yNormal,zNormal>, 01266 Box3D(x,x, y,y, z,z), lattice ); 01267 } 01268 01269 if (bcType==boundary::normalOutflow) { 01270 integrateProcessingFunctional ( 01271 new CopyNormalVelocityFunctional3D<T,Descriptor, xNormal,yNormal,zNormal>, 01272 Box3D(x,x, y,y, z,z), lattice ); 01273 } 01274 01275 BoxProcessingFunctional3D_L<T,Descriptor>* functional 01276 = BoundaryManager::template getInternalVelocityCornerFunctional<xNormal,yNormal,zNormal>(); 01277 if (functional) { 01278 integrateProcessingFunctional(functional, Box3D(x,x, y,y, z,z), lattice ); 01279 } 01280 } 01281 01282 01283 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01284 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01285 addVelocityBoundary0N( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01286 boundary::BcType bcType ) 01287 { 01288 addVelocityBoundary<0,-1>(domain, lattice, bcType); 01289 } 01290 01291 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01292 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01293 addVelocityBoundary0P( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01294 boundary::BcType bcType ) 01295 { 01296 addVelocityBoundary<0,1>(domain, lattice, bcType); 01297 } 01298 01299 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01300 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01301 addVelocityBoundary1N( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01302 boundary::BcType bcType ) 01303 { 01304 addVelocityBoundary<1,-1>(domain, lattice, bcType); 01305 } 01306 01307 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01308 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01309 addVelocityBoundary1P( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01310 boundary::BcType bcType ) 01311 { 01312 addVelocityBoundary<1, 1>(domain, lattice, bcType); 01313 } 01314 01315 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01316 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01317 addVelocityBoundary2N( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01318 boundary::BcType bcType ) 01319 { 01320 addVelocityBoundary<2,-1>(domain, lattice, bcType); 01321 } 01322 01323 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01324 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01325 addVelocityBoundary2P( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01326 boundary::BcType bcType ) 01327 { 01328 addVelocityBoundary<2, 1>(domain, lattice, bcType); 01329 } 01330 01331 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01332 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01333 addPressureBoundary0N( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01334 boundary::BcType bcType ) 01335 { 01336 addPressureBoundary<0,-1>(domain, lattice, bcType); 01337 } 01338 01339 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01340 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01341 addPressureBoundary0P( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01342 boundary::BcType bcType ) 01343 { 01344 addPressureBoundary<0,1>(domain, lattice, bcType); 01345 } 01346 01347 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01348 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01349 addPressureBoundary1N( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01350 boundary::BcType bcType ) 01351 { 01352 addPressureBoundary<1,-1>(domain, lattice, bcType); 01353 } 01354 01355 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01356 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01357 addPressureBoundary1P( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01358 boundary::BcType bcType ) 01359 { 01360 addPressureBoundary<1, 1>(domain, lattice, bcType); 01361 } 01362 01363 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01364 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01365 addPressureBoundary2N( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01366 boundary::BcType bcType ) 01367 { 01368 addPressureBoundary<2,-1>(domain, lattice, bcType); 01369 } 01370 01371 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01372 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01373 addPressureBoundary2P( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01374 boundary::BcType bcType ) 01375 { 01376 addPressureBoundary<2, 1>(domain, lattice, bcType); 01377 } 01378 01379 01380 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01381 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01382 addExternalVelocityEdge0NN( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01383 boundary::BcType bcType ) 01384 { 01385 addExternalVelocityEdge<0,-1,-1>(domain, lattice, bcType); 01386 } 01387 01388 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01389 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01390 addExternalVelocityEdge0NP( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01391 boundary::BcType bcType ) 01392 { 01393 addExternalVelocityEdge<0,-1, 1>(domain, lattice, bcType); 01394 } 01395 01396 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01397 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01398 addExternalVelocityEdge0PN( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01399 boundary::BcType bcType ) 01400 { 01401 addExternalVelocityEdge<0, 1,-1>(domain, lattice, bcType); 01402 } 01403 01404 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01405 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01406 addExternalVelocityEdge0PP( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01407 boundary::BcType bcType ) 01408 { 01409 addExternalVelocityEdge<0, 1, 1>(domain, lattice, bcType); 01410 } 01411 01412 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01413 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01414 addExternalVelocityEdge1NN( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01415 boundary::BcType bcType ) 01416 { 01417 addExternalVelocityEdge<1,-1,-1>(domain, lattice, bcType); 01418 } 01419 01420 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01421 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01422 addExternalVelocityEdge1NP( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01423 boundary::BcType bcType ) 01424 { 01425 addExternalVelocityEdge<1,-1, 1>(domain, lattice, bcType); 01426 } 01427 01428 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01429 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01430 addExternalVelocityEdge1PN( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01431 boundary::BcType bcType ) 01432 { 01433 addExternalVelocityEdge<1, 1,-1>(domain, lattice, bcType); 01434 } 01435 01436 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01437 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01438 addExternalVelocityEdge1PP( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01439 boundary::BcType bcType ) 01440 { 01441 addExternalVelocityEdge<1, 1, 1>(domain, lattice, bcType); 01442 } 01443 01444 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01445 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01446 addExternalVelocityEdge2NN( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01447 boundary::BcType bcType ) 01448 { 01449 addExternalVelocityEdge<2,-1,-1>(domain, lattice, bcType); 01450 } 01451 01452 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01453 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01454 addExternalVelocityEdge2NP( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01455 boundary::BcType bcType ) 01456 { 01457 addExternalVelocityEdge<2,-1, 1>(domain, lattice, bcType); 01458 } 01459 01460 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01461 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01462 addExternalVelocityEdge2PN( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01463 boundary::BcType bcType ) 01464 { 01465 addExternalVelocityEdge<2, 1,-1>(domain, lattice, bcType); 01466 } 01467 01468 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01469 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01470 addExternalVelocityEdge2PP( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01471 boundary::BcType bcType ) 01472 { 01473 addExternalVelocityEdge<2, 1, 1>(domain, lattice, bcType); 01474 } 01475 01476 01477 01478 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01479 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01480 addInternalVelocityEdge0NN( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01481 boundary::BcType bcType ) 01482 { 01483 addInternalVelocityEdge<0,-1,-1>(domain, lattice, bcType); 01484 } 01485 01486 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01487 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01488 addInternalVelocityEdge0NP( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01489 boundary::BcType bcType ) 01490 { 01491 addInternalVelocityEdge<0,-1, 1>(domain, lattice, bcType); 01492 } 01493 01494 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01495 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01496 addInternalVelocityEdge0PN( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01497 boundary::BcType bcType ) 01498 { 01499 addInternalVelocityEdge<0, 1,-1>(domain, lattice, bcType); 01500 } 01501 01502 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01503 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01504 addInternalVelocityEdge0PP( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01505 boundary::BcType bcType ) 01506 { 01507 addInternalVelocityEdge<0, 1, 1>(domain, lattice, bcType); 01508 } 01509 01510 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01511 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01512 addInternalVelocityEdge1NN( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01513 boundary::BcType bcType ) 01514 { 01515 addInternalVelocityEdge<1,-1,-1>(domain, lattice, bcType); 01516 } 01517 01518 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01519 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01520 addInternalVelocityEdge1NP( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01521 boundary::BcType bcType ) 01522 { 01523 addInternalVelocityEdge<1,-1, 1>(domain, lattice, bcType); 01524 } 01525 01526 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01527 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01528 addInternalVelocityEdge1PN( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01529 boundary::BcType bcType ) 01530 { 01531 addInternalVelocityEdge<1, 1,-1>(domain, lattice, bcType); 01532 } 01533 01534 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01535 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01536 addInternalVelocityEdge1PP( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01537 boundary::BcType bcType ) 01538 { 01539 addInternalVelocityEdge<1, 1, 1>(domain, lattice, bcType); 01540 } 01541 01542 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01543 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01544 addInternalVelocityEdge2NN( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01545 boundary::BcType bcType ) 01546 { 01547 addInternalVelocityEdge<2,-1,-1>(domain, lattice, bcType); 01548 } 01549 01550 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01551 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01552 addInternalVelocityEdge2NP( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01553 boundary::BcType bcType ) 01554 { 01555 addInternalVelocityEdge<2,-1, 1>(domain, lattice, bcType); 01556 } 01557 01558 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01559 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01560 addInternalVelocityEdge2PN( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01561 boundary::BcType bcType ) 01562 { 01563 addInternalVelocityEdge<2, 1,-1>(domain, lattice, bcType); 01564 } 01565 01566 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01567 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01568 addInternalVelocityEdge2PP( Box3D domain, MultiBlockLattice3D<T,Descriptor>& lattice, 01569 boundary::BcType bcType ) 01570 { 01571 addInternalVelocityEdge<2, 1, 1>(domain, lattice, bcType); 01572 } 01573 01574 01575 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01576 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01577 addExternalVelocityCornerNNN( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01578 boundary::BcType bcType ) 01579 { 01580 addExternalVelocityCorner<-1,-1,-1>(x,y,z, lattice, bcType); 01581 } 01582 01583 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01584 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01585 addExternalVelocityCornerNNP( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01586 boundary::BcType bcType ) 01587 { 01588 addExternalVelocityCorner<-1,-1, 1>(x,y,z, lattice, bcType); 01589 } 01590 01591 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01592 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01593 addExternalVelocityCornerNPN( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01594 boundary::BcType bcType ) 01595 { 01596 addExternalVelocityCorner<-1, 1,-1>(x,y,z, lattice, bcType); 01597 } 01598 01599 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01600 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01601 addExternalVelocityCornerNPP( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01602 boundary::BcType bcType ) 01603 { 01604 addExternalVelocityCorner<-1, 1, 1>(x,y,z, lattice, bcType); 01605 } 01606 01607 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01608 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01609 addExternalVelocityCornerPNN( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01610 boundary::BcType bcType ) 01611 { 01612 addExternalVelocityCorner< 1,-1,-1>(x,y,z, lattice, bcType); 01613 } 01614 01615 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01616 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01617 addExternalVelocityCornerPNP( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01618 boundary::BcType bcType ) 01619 { 01620 addExternalVelocityCorner< 1,-1, 1>(x,y,z, lattice, bcType); 01621 } 01622 01623 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01624 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01625 addExternalVelocityCornerPPN( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01626 boundary::BcType bcType ) 01627 { 01628 addExternalVelocityCorner< 1, 1,-1>(x,y,z, lattice, bcType); 01629 } 01630 01631 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01632 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01633 addExternalVelocityCornerPPP( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01634 boundary::BcType bcType ) 01635 { 01636 addExternalVelocityCorner< 1, 1, 1>(x,y,z, lattice, bcType); 01637 } 01638 01639 01640 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01641 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01642 addInternalVelocityCornerNNN( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01643 boundary::BcType bcType ) 01644 { 01645 addInternalVelocityCorner<-1,-1,-1>(x,y,z, lattice, bcType); 01646 } 01647 01648 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01649 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01650 addInternalVelocityCornerNNP( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01651 boundary::BcType bcType ) 01652 { 01653 addInternalVelocityCorner<-1,-1, 1>(x,y,z, lattice, bcType); 01654 } 01655 01656 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01657 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01658 addInternalVelocityCornerNPN( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01659 boundary::BcType bcType ) 01660 { 01661 addInternalVelocityCorner<-1, 1,-1>(x,y,z, lattice, bcType); 01662 } 01663 01664 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01665 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01666 addInternalVelocityCornerNPP( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01667 boundary::BcType bcType ) 01668 { 01669 addInternalVelocityCorner<-1, 1, 1>(x,y,z, lattice, bcType); 01670 } 01671 01672 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01673 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01674 addInternalVelocityCornerPNN( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01675 boundary::BcType bcType ) 01676 { 01677 addInternalVelocityCorner< 1,-1,-1>(x,y,z, lattice, bcType); 01678 } 01679 01680 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01681 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01682 addInternalVelocityCornerPNP( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01683 boundary::BcType bcType ) 01684 { 01685 addInternalVelocityCorner< 1,-1, 1>(x,y,z, lattice, bcType); 01686 } 01687 01688 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01689 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01690 addInternalVelocityCornerPPN( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01691 boundary::BcType bcType ) 01692 { 01693 addInternalVelocityCorner< 1, 1,-1>(x,y,z, lattice, bcType); 01694 } 01695 01696 template<typename T, template<typename U> class Descriptor, class BoundaryManager> 01697 void BoundaryConditionInstantiator3D<T,Descriptor,BoundaryManager>:: 01698 addInternalVelocityCornerPPP( plint x, plint y, plint z, MultiBlockLattice3D<T,Descriptor>& lattice, 01699 boundary::BcType bcType ) 01700 { 01701 addInternalVelocityCorner< 1, 1, 1>(x,y,z, lattice, bcType); 01702 } 01703 01704 } // namespace plb 01705 01706 #endif
1.6.3
1.6.3