$treeview $search $mathjax
Palabos  Version 1.1
$projectbrief
$projectbrief
$searchbox

extendedNeighborhoodLattices3D.hh

Go to the documentation of this file.
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 
00028 #ifndef EXTENDED_NEIGHBORHOOD_LATTICES_3D_HH
00029 #define EXTENDED_NEIGHBORHOOD_LATTICES_3D_HH
00030 
00031 #include "latticeBoltzmann/nearestNeighborLattices3D.h"
00032 
00033 namespace plb {
00034 
00035 namespace descriptors {
00036     
00037     // D3Q121 ////////////////////////////////////////////////////////////
00038     
00039     template<typename T>
00040     const T D3Q121Constants<T>::invD = (T)1 / (T) d;
00041     
00042     template<typename T>
00043     const int D3Q121Constants<T>::vicinity = 3;
00044     
00045     template<typename T>
00046     const int D3Q121Constants<T>::c[D3Q121Constants<T>::q][D3Q121Constants<T>::d] =
00047     {
00048         {0, 0, 0}, 
00049         {-3, -3, -3}, {-3, -3, 3}, {-3, -2, 0}, {-3, -1, -1}, {-3, -1, 1}, 
00050         {-3, 0, -2}, {-3, 0, 0}, {-3, 0, 2}, {-3, 1, -1}, {-3, 1, 1}, 
00051         {-3, 2, 0}, {-3, 3, -3}, {-3, 3, 3}, {-2, -3, 0}, {-2, -2, -2}, 
00052         {-2, -2, 0}, {-2, -2, 2}, {-2, -1, 0}, {-2, 0, -3}, {-2, 0, -2}, 
00053         {-2, 0, -1}, {-2, 0, 1}, {-2, 0, 2}, {-2, 0, 3}, {-2, 1, 0}, 
00054         {-2, 2, -2}, {-2, 2, 0}, {-2, 2, 2}, {-2, 3, 0}, {-1, -3, -1}, 
00055         {-1, -3, 1}, {-1, -2, 0}, {-1, -1, -3}, {-1, -1, -1}, {-1, -1, 1}, 
00056         {-1, -1, 3}, {-1, 0, -2}, {-1, 0, 0}, {-1, 0, 2}, {-1, 1, -3}, 
00057         {-1, 1, -1}, {-1, 1, 1}, {-1, 1, 3}, {-1, 2, 0}, {-1, 3, -1}, 
00058         {-1, 3, 1}, {0, -3, -2}, {0, -3, 0}, {0, -3, 2}, {0, -2, -3}, 
00059         {0, -2, -2}, {0, -2, -1}, {0, -2, 1}, {0, -2, 2}, {0, -2, 3}, 
00060         {0, -1, -2}, {0, -1, 0}, {0, -1, 2}, {0, 0, -3}, {0, 0, -1}, 
00061         {3, 3, 3}, {3, 3, -3}, {3, 2, 0}, {3, 1, 1}, {3, 1, -1}, 
00062         {3, 0, 2}, {3, 0, 0}, {3, 0, -2}, {3, -1, 1}, {3, -1, -1}, 
00063         {3, -2, 0}, {3, -3, 3}, {3, -3, -3}, {2, 3, 0}, {2, 2, 2}, 
00064         {2, 2, 0}, {2, 2, -2}, {2, 1, 0}, {2, 0, 3}, {2, 0, 2}, 
00065         {2, 0, 1}, {2, 0, -1}, {2, 0, -2}, {2, 0, -3}, {2, -1, 0}, 
00066         {2, -2, 2}, {2, -2, 0}, {2, -2, -2}, {2, -3, 0}, {1, 3, 1}, 
00067         {1, 3, -1}, {1, 2, 0}, {1, 1, 3}, {1, 1, 1}, {1, 1, -1}, 
00068         {1, 1, -3}, {1, 0, 2}, {1, 0, 0}, {1, 0, -2}, {1, -1, 3}, 
00069         {1, -1, 1}, {1, -1, -1}, {1, -1, -3}, {1, -2, 0}, {1, -3, 1}, 
00070         {1, -3, -1}, {0, 3, 2}, {0, 3, 0}, {0, 3, -2}, {0, 2, 3}, 
00071         {0, 2, 2}, {0, 2, 1}, {0, 2, -1}, {0, 2, -2}, {0, 2, -3}, 
00072         {0, 1, 2}, {0, 1, 0}, {0, 1, -2}, {0, 0, 3}, {0, 0, 1}, 
00073     };
00074 
00075 
00076     
00077     template<typename T>
00078     const int D3Q121Constants<T>::cNormSqr[D3Q121Constants<T>::q] =
00079     {
00080         0, 
00081         27, 27, 13, 11, 11, 13, 9, 13, 11, 11, 13, 
00082         27, 27, 13, 12, 8, 12, 5, 13, 8, 5, 5, 8, 
00083         13, 5, 12, 8, 12, 13, 11, 11, 5, 11, 3, 3, 
00084         11, 5, 1, 5, 11, 3, 3, 11, 5, 11, 11, 
00085         13, 9, 13, 13, 8, 5, 5, 8, 13, 5, 1, 
00086         5, 9, 1, 27, 27, 13, 11, 11, 13, 9, 13, 
00087         11, 11, 13, 27, 27, 13, 12, 8, 12, 5, 
00088         13, 8, 5, 5, 8, 13, 5, 12, 8, 12, 13, 
00089         11, 11, 5, 11, 3, 3, 11, 5, 1, 5, 11, 
00090         3, 3, 11, 5, 11, 11, 13, 9, 13, 13, 
00091         8, 5, 5, 8, 13, 5, 1, 5, 9, 1, 
00092     };
00093     
00094     template<typename T>
00095     const T D3Q121Constants<T>::t[D3Q121Constants<T>::q] =
00096     {
00097         3.059162202948600642469372949253824201326e-02, 
00098         6.928750896386028525506511533901772605647e-07, 
00099         6.928750896386028525506511533901772605647e-07, 
00100         1.431862411548029405509826922297073180664e-05, 
00101         1.068340024593910949171102482709870577810e-04, 
00102         1.068340024593910949171102482709870577810e-04, 
00103         1.431862411548029405509826922297073180664e-05, 
00104         3.247475270880738129679305570682130634477e-04, 
00105         1.431862411548029405509826922297073180664e-05, 
00106         1.068340024593910949171102482709870577810e-04, 
00107         1.068340024593910949171102482709870577810e-04, 
00108         1.431862411548029405509826922297073180664e-05, 
00109         6.928750896386028525506511533901772605647e-07, 
00110         6.928750896386028525506511533901772605647e-07, 
00111         1.431862411548029405509826922297073180664e-05, 
00112         1.810217515763742375901616857556491604089e-04, 
00113         4.281835936810840661857590214080748494426e-04, 
00114         1.810217515763742375901616857556491604089e-04, 
00115         6.111023366833424322414921694060723126594e-03, 
00116         1.431862411548029405509826922297073180664e-05, 
00117         4.281835936810840661857590214080748494426e-04, 
00118         6.111023366833424322414921694060723126594e-03, 
00119         6.111023366833424322414921694060723126594e-03, 
00120         4.281835936810840661857590214080748494426e-04, 
00121         1.431862411548029405509826922297073180664e-05, 
00122         6.111023366833424322414921694060723126594e-03, 
00123         1.810217515763742375901616857556491604089e-04, 
00124         4.281835936810840661857590214080748494426e-04, 
00125         1.810217515763742375901616857556491604089e-04, 
00126         1.431862411548029405509826922297073180664e-05, 
00127         1.068340024593910949171102482709870577810e-04, 
00128         1.068340024593910949171102482709870577810e-04, 
00129         6.111023366833424322414921694060723126594e-03, 
00130         1.068340024593910949171102482709870577810e-04, 
00131         2.752500532563812386479902897409233864522e-02, 
00132         2.752500532563812386479902897409233864522e-02, 
00133         1.068340024593910949171102482709870577810e-04, 
00134         6.111023366833424322414921694060723126594e-03, 
00135         9.851595103726339186467408722380536926020e-02, 
00136         6.111023366833424322414921694060723126594e-03, 
00137         1.068340024593910949171102482709870577810e-04, 
00138         2.752500532563812386479902897409233864522e-02, 
00139         2.752500532563812386479902897409233864522e-02, 
00140         1.068340024593910949171102482709870577810e-04, 
00141         6.111023366833424322414921694060723126594e-03, 
00142         1.068340024593910949171102482709870577810e-04, 
00143         1.068340024593910949171102482709870577810e-04, 
00144         1.431862411548029405509826922297073180664e-05, 
00145         3.247475270880738129679305570682130634477e-04, 
00146         1.431862411548029405509826922297073180664e-05, 
00147         1.431862411548029405509826922297073180664e-05, 
00148         4.281835936810840661857590214080748494426e-04, 
00149         6.111023366833424322414921694060723126594e-03, 
00150         6.111023366833424322414921694060723126594e-03, 
00151         4.281835936810840661857590214080748494426e-04, 
00152         1.431862411548029405509826922297073180664e-05, 
00153         6.111023366833424322414921694060723126594e-03, 
00154         9.851595103726339186467408722380536926020e-02, 
00155         6.111023366833424322414921694060723126594e-03, 
00156         3.247475270880738129679305570682130634477e-04, 
00157         9.851595103726339186467408722380536926020e-02, 
00158         6.928750896386028525506511533901772605647e-07, 
00159         6.928750896386028525506511533901772605647e-07, 
00160         1.431862411548029405509826922297073180664e-05, 
00161         1.068340024593910949171102482709870577810e-04, 
00162         1.068340024593910949171102482709870577810e-04, 
00163         1.431862411548029405509826922297073180664e-05, 
00164         3.247475270880738129679305570682130634477e-04, 
00165         1.431862411548029405509826922297073180664e-05, 
00166         1.068340024593910949171102482709870577810e-04, 
00167         1.068340024593910949171102482709870577810e-04, 
00168         1.431862411548029405509826922297073180664e-05, 
00169         6.928750896386028525506511533901772605647e-07, 
00170         6.928750896386028525506511533901772605647e-07, 
00171         1.431862411548029405509826922297073180664e-05, 
00172         1.810217515763742375901616857556491604089e-04, 
00173         4.281835936810840661857590214080748494426e-04, 
00174         1.810217515763742375901616857556491604089e-04, 
00175         6.111023366833424322414921694060723126594e-03, 
00176         1.431862411548029405509826922297073180664e-05, 
00177         4.281835936810840661857590214080748494426e-04, 
00178         6.111023366833424322414921694060723126594e-03, 
00179         6.111023366833424322414921694060723126594e-03, 
00180         4.281835936810840661857590214080748494426e-04, 
00181         1.431862411548029405509826922297073180664e-05, 
00182         6.111023366833424322414921694060723126594e-03, 
00183         1.810217515763742375901616857556491604089e-04, 
00184         4.281835936810840661857590214080748494426e-04, 
00185         1.810217515763742375901616857556491604089e-04, 
00186         1.431862411548029405509826922297073180664e-05, 
00187         1.068340024593910949171102482709870577810e-04, 
00188         1.068340024593910949171102482709870577810e-04, 
00189         6.111023366833424322414921694060723126594e-03, 
00190         1.068340024593910949171102482709870577810e-04, 
00191         2.752500532563812386479902897409233864522e-02, 
00192         2.752500532563812386479902897409233864522e-02, 
00193         1.068340024593910949171102482709870577810e-04, 
00194         6.111023366833424322414921694060723126594e-03, 
00195         9.851595103726339186467408722380536926020e-02, 
00196         6.111023366833424322414921694060723126594e-03, 
00197         1.068340024593910949171102482709870577810e-04, 
00198         2.752500532563812386479902897409233864522e-02, 
00199         2.752500532563812386479902897409233864522e-02, 
00200         1.068340024593910949171102482709870577810e-04, 
00201         6.111023366833424322414921694060723126594e-03, 
00202         1.068340024593910949171102482709870577810e-04, 
00203         1.068340024593910949171102482709870577810e-04, 
00204         1.431862411548029405509826922297073180664e-05, 
00205         3.247475270880738129679305570682130634477e-04, 
00206         1.431862411548029405509826922297073180664e-05, 
00207         1.431862411548029405509826922297073180664e-05, 
00208         4.281835936810840661857590214080748494426e-04, 
00209         6.111023366833424322414921694060723126594e-03, 
00210         6.111023366833424322414921694060723126594e-03, 
00211         4.281835936810840661857590214080748494426e-04, 
00212         1.431862411548029405509826922297073180664e-05, 
00213         6.111023366833424322414921694060723126594e-03, 
00214         9.851595103726339186467408722380536926020e-02, 
00215         6.111023366833424322414921694060723126594e-03, 
00216         3.247475270880738129679305570682130634477e-04, 
00217         9.851595103726339186467408722380536926020e-02 
00218     };
00219 
00220     
00221     template<typename T>
00222     const T D3Q121Constants<T>::cs2 = 1./ ( 1.19697977039307435897238846385* 1.19697977039307435897238846385);
00223     
00224     template<typename T>
00225     const T D3Q121Constants<T>::invCs2 =  1.19697977039307435897238846385* 1.19697977039307435897238846385;
00226     
00227     template<typename T>
00228     const char D3Q121Descriptor<T>::name[] = "D3Q121";
00229     
00230     template<typename T>
00231     const char ForcedD3Q121Descriptor<T>::name[] = "ForcedD3Q121";
00232 
00233 }  // namespace descriptors
00234 
00235 }  // namespace plb
00236 
00237 #endif