$treeview $search $mathjax
|
Palabos
Version 1.1
$projectbrief
|
$projectbrief
|
$searchbox |
00001 /* This file is part of the Palabos library. 00002 * 00003 * Copyright (C) 2011 FlowKit Sarl 00004 * Avenue de Chailly 23 00005 * 1012 Lausanne, Switzerland 00006 * E-mail contact: contact@flowkit.com 00007 * 00008 * The most recent release of Palabos can be downloaded at 00009 * <http://www.palabos.org/> 00010 * 00011 * The library Palabos is free software: you can redistribute it and/or 00012 * modify it under the terms of the GNU Affero General Public License as 00013 * published by the Free Software Foundation, either version 3 of the 00014 * License, or (at your option) any later version. 00015 * 00016 * The library is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Affero General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Affero General Public License 00022 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00023 */ 00024 00025 /* Main author: Orestis Malaspinas 00026 */ 00027 00031 #ifndef ADVECTION_DIFFUSION_BOUNDARY_CONDITION_3D_HH 00032 #define ADVECTION_DIFFUSION_BOUNDARY_CONDITION_3D_HH 00033 00034 #include "complexDynamics/advectionDiffusionBoundaries.h" 00035 #include "complexDynamics/advectionDiffusionBoundaryCondition3D.h" 00036 #include "complexDynamics/advectionDiffusionBoundaryInstantiator3D.h" 00037 00038 namespace plb { 00039 00040 template<typename T, template<typename U> class Descriptor> 00041 void OnLatticeAdvectionDiffusionBoundaryCondition3D<T,Descriptor>::setTemperatureConditionOnBlockBoundaries ( 00042 BlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ) 00043 { 00044 plint nx = lattice.getNx(); 00045 plint ny = lattice.getNy(); 00046 plint nz = lattice.getNz(); 00047 00048 addTemperatureBoundary0N(Box3D( 0, 0, 1,ny-2, 1,nz-2), lattice, bcType); 00049 addTemperatureBoundary0P(Box3D(nx-1,nx-1, 1,ny-2, 1,nz-2), lattice, bcType); 00050 addTemperatureBoundary1N(Box3D( 1,nx-2, 0, 0, 1,nz-2), lattice, bcType); 00051 addTemperatureBoundary1P(Box3D( 1,nx-2,ny-1,ny-1, 1,nz-2), lattice, bcType); 00052 addTemperatureBoundary2N(Box3D( 1,nx-2, 1,ny-2, 0, 0), lattice, bcType); 00053 addTemperatureBoundary2P(Box3D( 1,nx-2, 1,ny-2,nz-1,nz-1), lattice, bcType); 00054 00055 addTemperatureEdge0NN(Box3D( 1,nx-2, 0, 0, 0, 0), lattice, bcType); 00056 addTemperatureEdge0NP(Box3D( 1,nx-2, 0, 0,nz-1,nz-1), lattice, bcType); 00057 addTemperatureEdge0PN(Box3D( 1,nx-2,ny-1,ny-1, 0, 0), lattice, bcType); 00058 addTemperatureEdge0PP(Box3D( 1,nx-2,ny-1,ny-1,nz-1,nz-1), lattice, bcType); 00059 00060 addTemperatureEdge1NN(Box3D( 0, 0, 1,ny-2, 0, 0), lattice, bcType); 00061 addTemperatureEdge1NP(Box3D(nx-1,nx-1, 1,ny-2, 0, 0), lattice, bcType); 00062 addTemperatureEdge1PN(Box3D( 0, 0, 1,ny-2,nz-1,nz-1), lattice, bcType); 00063 addTemperatureEdge1PP(Box3D(nx-1,nx-1, 1,ny-2,nz-1,nz-1), lattice, bcType); 00064 00065 addTemperatureEdge2NN(Box3D( 0, 0, 0, 0, 1,nz-2), lattice, bcType); 00066 addTemperatureEdge2NP(Box3D( 0, 0,ny-1,ny-1, 1,nz-2), lattice, bcType); 00067 addTemperatureEdge2PN(Box3D(nx-1,nx-1, 0, 0, 1,nz-2), lattice, bcType); 00068 addTemperatureEdge2PP(Box3D(nx-1,nx-1,ny-1,ny-1, 1,nz-2), lattice, bcType); 00069 00070 addTemperatureCornerNNN( 0, 0, 0, lattice, bcType); 00071 addTemperatureCornerNNP( 0, 0,nz-1, lattice, bcType); 00072 addTemperatureCornerNPN( 0,ny-1, 0, lattice, bcType); 00073 addTemperatureCornerNPP( 0,ny-1,nz-1, lattice, bcType); 00074 addTemperatureCornerPNN(nx-1, 0, 0, lattice, bcType); 00075 addTemperatureCornerPNP(nx-1, 0,nz-1, lattice, bcType); 00076 addTemperatureCornerPPN(nx-1,ny-1, 0, lattice, bcType); 00077 addTemperatureCornerPPP(nx-1,ny-1,nz-1, lattice, bcType); 00078 } 00079 00080 template<typename T, template<typename U> class Descriptor> 00081 void OnLatticeAdvectionDiffusionBoundaryCondition3D<T,Descriptor>::setTemperatureConditionOnBlockBoundaries ( 00082 MultiBlockLattice3D<T,Descriptor>& lattice, boundary::BcType bcType ) 00083 { 00084 plint nx = lattice.getNx(); 00085 plint ny = lattice.getNy(); 00086 plint nz = lattice.getNz(); 00087 00088 addTemperatureBoundary0N(Box3D( 0, 0, 1,ny-2, 1,nz-2), lattice, bcType); 00089 addTemperatureBoundary0P(Box3D(nx-1,nx-1, 1,ny-2, 1,nz-2), lattice, bcType); 00090 addTemperatureBoundary1N(Box3D( 1,nx-2, 0, 0, 1,nz-2), lattice, bcType); 00091 addTemperatureBoundary1P(Box3D( 1,nx-2,ny-1,ny-1, 1,nz-2), lattice, bcType); 00092 addTemperatureBoundary2N(Box3D( 1,nx-2, 1,ny-2, 0, 0), lattice, bcType); 00093 addTemperatureBoundary2P(Box3D( 1,nx-2, 1,ny-2,nz-1,nz-1), lattice, bcType); 00094 00095 addTemperatureEdge0NN(Box3D( 1,nx-2, 0, 0, 0, 0), lattice, bcType); 00096 addTemperatureEdge0NP(Box3D( 1,nx-2, 0, 0,nz-1,nz-1), lattice, bcType); 00097 addTemperatureEdge0PN(Box3D( 1,nx-2,ny-1,ny-1, 0, 0), lattice, bcType); 00098 addTemperatureEdge0PP(Box3D( 1,nx-2,ny-1,ny-1,nz-1,nz-1), lattice, bcType); 00099 00100 addTemperatureEdge1NN(Box3D( 0, 0, 1,ny-2, 0, 0), lattice, bcType); 00101 addTemperatureEdge1NP(Box3D(nx-1,nx-1, 1,ny-2, 0, 0), lattice, bcType); 00102 addTemperatureEdge1PN(Box3D( 0, 0, 1,ny-2,nz-1,nz-1), lattice, bcType); 00103 addTemperatureEdge1PP(Box3D(nx-1,nx-1, 1,ny-2,nz-1,nz-1), lattice, bcType); 00104 00105 addTemperatureEdge2NN(Box3D( 0, 0, 0, 0, 1,nz-2), lattice, bcType); 00106 addTemperatureEdge2NP(Box3D( 0, 0,ny-1,ny-1, 1,nz-2), lattice, bcType); 00107 addTemperatureEdge2PN(Box3D(nx-1,nx-1, 0, 0, 1,nz-2), lattice, bcType); 00108 addTemperatureEdge2PP(Box3D(nx-1,nx-1,ny-1,ny-1, 1,nz-2), lattice, bcType); 00109 00110 addTemperatureCornerNNN( 0, 0, 0, lattice, bcType); 00111 addTemperatureCornerNNP( 0, 0,nz-1, lattice, bcType); 00112 addTemperatureCornerNPN( 0,ny-1, 0, lattice, bcType); 00113 addTemperatureCornerNPP( 0,ny-1,nz-1, lattice, bcType); 00114 addTemperatureCornerPNN(nx-1, 0, 0, lattice, bcType); 00115 addTemperatureCornerPNP(nx-1, 0,nz-1, lattice, bcType); 00116 addTemperatureCornerPPN(nx-1,ny-1, 0, lattice, bcType); 00117 addTemperatureCornerPPP(nx-1,ny-1,nz-1, lattice, bcType); 00118 } 00119 00120 template<typename T, template<typename U> class Descriptor> 00121 class AdvectionDiffusionBoundaryManager3D { 00122 public: 00123 00124 template<int direction, int orientation> 00125 static BoundaryCompositeDynamics<T,Descriptor>* 00126 getTemperatureBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics); 00127 00128 template<int direction, int orientation> 00129 static DataProcessorGenerator3D* 00130 getTemperatureBoundaryProcessor(Box3D domain); 00131 00132 template<int plane, int normal1, int normal2> 00133 static BoundaryCompositeDynamics<T,Descriptor>* 00134 getTemperatureEdgeDynamics(Dynamics<T,Descriptor>* baseDynamics); 00135 00136 template<int plane, int normal1, int normal2> 00137 static DataProcessorGenerator3D* 00138 getTemperatureEdgeProcessor(Box3D domain); 00139 00140 template<int xNormal, int yNormal, int zNormal> 00141 static BoundaryCompositeDynamics<T,Descriptor>* 00142 getTemperatureCornerDynamics(Dynamics<T,Descriptor>* baseDynamics); 00143 template<int xNormal, int yNormal, int zNormal> 00144 static DataProcessorGenerator3D* 00145 getTemperatureCornerProcessor(plint x, plint y, plint z); 00146 00147 }; 00148 00149 00151 00152 template<typename T, template<typename U> class Descriptor> 00153 template<int direction, int orientation> 00154 BoundaryCompositeDynamics<T,Descriptor>* AdvectionDiffusionBoundaryManager3D<T,Descriptor>:: 00155 getTemperatureBoundaryDynamics(Dynamics<T,Descriptor>* baseDynamics) 00156 { 00157 return new AdvectionDiffusionBoundaryDynamics 00158 <T,Descriptor,direction,orientation>(baseDynamics); 00159 } 00160 00161 template<typename T, template<typename U> class Descriptor> 00162 template<int direction, int orientation> 00163 DataProcessorGenerator3D* 00164 AdvectionDiffusionBoundaryManager3D<T,Descriptor>:: 00165 getTemperatureBoundaryProcessor(Box3D domain) 00166 { 00167 return 0; 00168 } 00169 00170 template<typename T, template<typename U> class Descriptor> 00171 template<int plane, int normal1, int normal2> 00172 BoundaryCompositeDynamics<T,Descriptor>* 00173 AdvectionDiffusionBoundaryManager3D<T,Descriptor>:: 00174 getTemperatureEdgeDynamics(Dynamics<T,Descriptor>* baseDynamics) 00175 { 00176 return new AdvectionDiffusionEdgeDynamics3D<T,Descriptor,plane,normal1,normal2>(baseDynamics); 00177 } 00178 00179 template<typename T, template<typename U> class Descriptor> 00180 template<int plane, int normal1, int normal2> 00181 DataProcessorGenerator3D* 00182 AdvectionDiffusionBoundaryManager3D<T,Descriptor>:: 00183 getTemperatureEdgeProcessor(Box3D domain) 00184 { 00185 return 0; 00186 } 00187 00188 template<typename T, template<typename U> class Descriptor> 00189 template<int xNormal, int yNormal, int zNormal> 00190 BoundaryCompositeDynamics<T,Descriptor>* 00191 AdvectionDiffusionBoundaryManager3D<T,Descriptor>:: 00192 getTemperatureCornerDynamics(Dynamics<T,Descriptor>* baseDynamics) 00193 { 00194 return new AdvectionDiffusionCornerDynamics3D<T,Descriptor,xNormal,yNormal,zNormal>(baseDynamics); 00195 } 00196 00197 template<typename T, template<typename U> class Descriptor> 00198 template<int xNormal, int yNormal, int zNormal> 00199 DataProcessorGenerator3D* 00200 AdvectionDiffusionBoundaryManager3D<T,Descriptor>:: 00201 getTemperatureCornerProcessor(plint x, plint y, plint z) 00202 { 00203 return 0; 00204 } 00205 00206 00208 00209 template<typename T, template<typename U> class Descriptor> 00210 OnLatticeAdvectionDiffusionBoundaryCondition3D<T,Descriptor>* 00211 createLocalAdvectionDiffusionBoundaryCondition3D() 00212 { 00213 return new AdvectionDiffusionBoundaryConditionInstantiator3D<T, Descriptor, 00214 AdvectionDiffusionBoundaryManager3D<T,Descriptor> > (); 00215 } 00216 00217 } // namespace plb 00218 00219 #endif
1.6.3
1.6.3