$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 00034 #ifndef ADVECTION_DIFFUSION_LATTICES_H 00035 #define ADVECTION_DIFFUSION_LATTICES_H 00036 00037 #include "core/globalDefs.h" 00038 #include "latticeBoltzmann/externalFields.h" 00039 #include "latticeBoltzmann/roundOffPolicy.h" 00040 #include <vector> 00041 00042 namespace plb { 00043 00045 00056 namespace descriptors 00057 { 00058 //===========================================================================// 00059 //=================== AdvectionDiffusion Lattice Descriptors=================// 00060 //===========================================================================// 00061 00063 template <typename T> struct D2Q5Constants 00064 { 00065 enum { d = 2, q = 5 }; 00066 static const T invD; 00067 static const int vicinity; 00068 static const int c[q][d]; 00069 static const int cNormSqr[q]; 00070 static const T t[q]; 00071 static const T cs2; 00072 static const T invCs2; 00073 }; 00074 00075 template <typename T> struct D2Q5DescriptorBase 00076 : public D2Q5Constants<T>, public DefaultRoundOffPolicy<T> 00077 { 00078 typedef D2Q5DescriptorBase<T> BaseDescriptor; 00079 enum { numPop=D2Q5Constants<T>::q }; 00080 }; 00081 00083 template <typename T> struct AdvectionDiffusionD2Q5Descriptor 00084 : public D2Q5DescriptorBase<T>, public Velocity2dDescriptorBase 00085 { 00086 static const char name[]; 00087 }; 00088 00090 template <typename T> struct D3Q7Constants { 00091 enum { d = 3, q = 7 }; 00092 static const T invD; 00093 static const int vicinity; 00094 static const int c[q][d]; 00095 static const int cNormSqr[q]; 00096 static const T t[q]; 00097 static const T cs2; 00098 static const T invCs2; 00099 }; 00100 00101 template <typename T> struct D3Q7DescriptorBase 00102 : public D3Q7Constants<T>, public DefaultRoundOffPolicy<T> 00103 { 00104 typedef D3Q7DescriptorBase<T> BaseDescriptor; 00105 enum { numPop=D3Q7Constants<T>::q }; 00106 }; 00107 00108 template <typename T> struct AdvectionDiffusionD3Q7Descriptor 00109 : public D3Q7DescriptorBase<T>, public Velocity3dBase 00110 { 00111 static const char name[]; 00112 }; 00113 00114 template <typename T> struct AdvectionDiffusionWithSourceD3Q7Descriptor 00115 : public D3Q7DescriptorBase<T>, public VelocityAndScalar3dBase 00116 { 00117 static const char name[]; 00118 }; 00119 00120 } // namespace descriptors 00121 00122 } // namespace plb 00123 00124 #endif
1.6.3
1.6.3