$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_2D_H 00037 #define NEAREST_NEIGHBOR_LATTICES_2D_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 D2Q9Constants 00063 { 00064 enum { d = 2, q = 9 }; 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 }; 00073 00074 template <typename T> struct D2Q9DescriptorBase 00075 : public D2Q9Constants<T>, public DefaultRoundOffPolicy<T> 00076 { 00077 typedef D2Q9DescriptorBase<T> BaseDescriptor; 00078 enum { numPop=D2Q9Constants<T>::q }; 00079 }; 00080 00081 template <typename T> struct D2Q9Descriptor 00082 : public D2Q9DescriptorBase<T>, public NoExternalFieldBase 00083 { 00084 static const char name[]; 00085 }; 00086 00087 template <typename T> struct ForcedD2Q9Descriptor 00088 : public D2Q9DescriptorBase<T>, public Force2dDescriptorBase 00089 { 00090 static const char name[]; 00091 }; 00092 00093 template <typename T> struct RhoBarJD2Q9Descriptor 00094 : public D2Q9DescriptorBase<T>, public RhoBarJdescriptorBase2D 00095 { 00096 static const char name[]; 00097 }; 00098 00099 template <typename T> struct VelocityD2Q9Descriptor 00100 : public D2Q9DescriptorBase<T>, public Velocity2dDescriptorBase 00101 { 00102 static const char name[]; 00103 }; 00104 00105 template <typename T> struct Tau1_D2Q9DescriptorBase 00106 : public D2Q9Constants<T>, public DefaultRoundOffPolicy<T> 00107 { 00108 typedef D2Q9DescriptorBase<T> BaseDescriptor; 00109 enum { numPop=0 }; 00110 }; 00111 00112 template <typename T> struct Tau1_D2Q9Descriptor 00113 : public Tau1_D2Q9DescriptorBase<T>, public RhoBarJdescriptorBase2D 00114 { 00115 static const char name[]; 00116 }; 00117 00118 } // namespace descriptors 00119 00120 } // namespace plb 00121 00122 #endif // NEAREST_NEIGHBOR_LATTICES_2D_H
1.6.3
1.6.3