$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 00036 #ifndef NEAREST_NEIGHBOR_LATTICES_3D_H 00037 #define NEAREST_NEIGHBOR_LATTICES_3D_H 00038 00039 #include "core/globalDefs.h" 00040 #include "core/plbDebug.h" 00041 #include "latticeBoltzmann/externalFields.h" 00042 #include "latticeBoltzmann/roundOffPolicy.h" 00043 #include <vector> 00044 00045 namespace plb { 00046 00048 00059 namespace descriptors { 00060 00062 template <typename T> struct D3Q13Constants 00063 { 00064 enum { d = 3, q = 13 }; 00065 static const T invD; 00066 static const int vicinity; 00067 static const int c[q][d]; 00068 static const int cNormSqr[q]; 00069 static const T t[q]; 00070 static const T cs2; 00071 static const T invCs2; 00072 static const T lambda_e; 00073 static const T lambda_h; 00074 }; 00075 00076 template <typename T> struct D3Q13DescriptorBase 00077 : public D3Q13Constants<T>, public DefaultRoundOffPolicy<T> 00078 { 00079 typedef D3Q13DescriptorBase<T> BaseDescriptor; 00080 enum { numPop=D3Q13Constants<T>::q }; 00081 }; 00082 00084 template <typename T> struct D3Q15Constants 00085 { 00086 enum { d = 3, q = 15 }; 00087 static const T invD; 00088 static const int vicinity; 00089 static const int c[q][d]; 00090 static const int cNormSqr[q]; 00091 static const T t[q]; 00092 static const T cs2; 00093 static const T invCs2; 00094 }; 00095 00096 template <typename T> struct D3Q15DescriptorBase 00097 : public D3Q15Constants<T>, public DefaultRoundOffPolicy<T> 00098 { 00099 typedef D3Q15DescriptorBase<T> BaseDescriptor; 00100 enum { numPop=D3Q15Constants<T>::q }; 00101 }; 00102 00104 template <typename T> struct D3Q19Constants 00105 { 00106 enum { d = 3, q = 19 }; 00107 static const T invD; 00108 static const int vicinity; 00109 static const int c[q][d]; 00110 static const int cNormSqr[q]; 00111 static const T t[q]; 00112 static const T cs2; 00113 static const T invCs2; 00114 }; 00115 00116 template <typename T> struct D3Q19DescriptorBase 00117 : public D3Q19Constants<T>, public DefaultRoundOffPolicy<T> 00118 { 00119 typedef D3Q19DescriptorBase<T> BaseDescriptor; 00120 enum { numPop=D3Q19Constants<T>::q }; 00121 }; 00122 00124 template <typename T> struct D3Q27Constants 00125 { 00126 enum { d = 3, q = 27 }; 00127 static const T invD; 00128 static const int vicinity; 00129 static const int c[q][d]; 00130 static const int cNormSqr[q]; 00131 static const T t[q]; 00132 static const T cs2; 00133 static const T invCs2; 00134 }; 00135 00136 template <typename T> struct D3Q27DescriptorBase 00137 : public D3Q27Constants<T>, public DefaultRoundOffPolicy<T> 00138 { 00139 typedef D3Q27DescriptorBase<T> BaseDescriptor; 00140 enum { numPop=D3Q27Constants<T>::q }; 00141 }; 00142 00143 template <typename T> struct D3Q13Descriptor 00144 : public D3Q13DescriptorBase<T>, public NoExternalFieldBase 00145 { 00146 static const char name[]; 00147 }; 00148 00149 template <typename T> struct ForcedD3Q13Descriptor 00150 : public D3Q13DescriptorBase<T>, public Force3dDescriptorBase 00151 { 00152 static const char name[]; 00153 }; 00154 00155 template <typename T> struct D3Q15Descriptor 00156 : public D3Q15DescriptorBase<T>, public NoExternalFieldBase 00157 { 00158 static const char name[]; 00159 }; 00160 00161 template <typename T> struct ForcedD3Q15Descriptor 00162 : public D3Q15DescriptorBase<T>, public Force3dDescriptorBase 00163 { 00164 static const char name[]; 00165 }; 00166 00167 template <typename T> struct RhoBarJD3Q15Descriptor 00168 : public D3Q15DescriptorBase<T>, public RhoBarJdescriptorBase3D 00169 { 00170 static const char name[]; 00171 }; 00172 00173 template <typename T> struct ForcedRhoBarJD3Q15Descriptor 00174 : public D3Q15DescriptorBase<T>, public ForcedRhoBarJdescriptorBase3D 00175 { 00176 static const char name[]; 00177 }; 00178 00179 template <typename T> struct D3Q19Descriptor 00180 : public D3Q19DescriptorBase<T>, public NoExternalFieldBase 00181 { 00182 static const char name[]; 00183 }; 00184 00185 template <typename T> struct ForcedD3Q19Descriptor 00186 : public D3Q19DescriptorBase<T>, public Force3dDescriptorBase 00187 { 00188 static const char name[]; 00189 }; 00190 00191 template <typename T> struct RhoBarJD3Q19Descriptor 00192 : public D3Q19DescriptorBase<T>, public RhoBarJdescriptorBase3D 00193 { 00194 static const char name[]; 00195 }; 00196 00197 template <typename T> struct ForcedRhoBarJD3Q19Descriptor 00198 : public D3Q19DescriptorBase<T>, public ForcedRhoBarJdescriptorBase3D 00199 { 00200 static const char name[]; 00201 }; 00202 00203 template <typename T> struct VelocityD3Q19Descriptor 00204 : public D3Q19DescriptorBase<T>, public Velocity3dBase 00205 { 00206 static const char name[]; 00207 }; 00208 00209 template <typename T> struct D3Q27Descriptor 00210 : public D3Q27DescriptorBase<T>, public NoExternalFieldBase 00211 { 00212 static const char name[]; 00213 }; 00214 00215 template <typename T> struct ForcedD3Q27Descriptor 00216 : public D3Q27DescriptorBase<T>, public Force3dDescriptorBase 00217 { 00218 static const char name[]; 00219 }; 00220 00221 template <typename T> struct RhoBarJD3Q27Descriptor 00222 : public D3Q27DescriptorBase<T>, public RhoBarJdescriptorBase3D 00223 { 00224 static const char name[]; 00225 }; 00226 00227 template <typename T> struct ForcedRhoBarJD3Q27Descriptor 00228 : public D3Q27DescriptorBase<T>, public ForcedRhoBarJdescriptorBase3D 00229 { 00230 static const char name[]; 00231 }; 00232 00233 } // namespace descriptors 00234 00235 } // namespace plb 00236 00237 #endif // NEAREST_NEIGHBOR_LATTICES_3D_H
1.6.3
1.6.3