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

shanChenLattices3D.h

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 
00025 /* The original version of this file was written by Orestis Malaspinas
00026  * and Andrea Parmigiani.
00027  */
00028 
00032 #ifndef SHAN_CHEN_LATTICES_3D_H
00033 #define SHAN_CHEN_LATTICES_3D_H
00034 
00035 #include "core/globalDefs.h"
00036 #include "latticeBoltzmann/nearestNeighborLattices3D.h"
00037 
00038 namespace plb {
00039 
00040 namespace descriptors {
00041 
00043     struct DensityMomentumNoForceExternals3D {
00044         static const int numScalars = 4;
00045         static const int numSpecies = 2;
00046 
00047         static const int densityBeginsAt  = 0;
00048         static const int sizeOfDensity    = 1;
00049 
00050         static const int momentumBeginsAt = 1;
00051         static const int sizeOfMomentum   = 3;
00052 
00053         static const int forceBeginsAt    = 0;
00054         static const int sizeOfForce      = 0;
00055     };
00056 
00058     struct DensityMomentumForceExternals3D {
00059         static const int numScalars = 7;
00060         static const int numSpecies = 3;
00061 
00062         static const int densityBeginsAt  = 0;
00063         static const int sizeOfDensity    = 1;
00064 
00065         static const int momentumBeginsAt = 1;
00066         static const int sizeOfMomentum   = 3;
00067 
00068         static const int forceBeginsAt    = 4;
00069         static const int sizeOfForce      = 3;
00070     };
00071 
00072     struct ShanChenExternalBase3D {
00073         typedef DensityMomentumNoForceExternals3D ExternalField;
00074     };
00075 
00076     struct ForcedShanChenExternalBase3D {
00077         typedef DensityMomentumForceExternals3D ExternalField;
00078     };
00079 
00081     template <typename T>
00082     struct ShanChenD3Q19Descriptor
00083         : public D3Q19DescriptorBase<T>, public ShanChenExternalBase3D
00084     {
00085         static const char name[];
00086     };
00087 
00088     template<typename T>
00089     const char ShanChenD3Q19Descriptor<T>::name[] = "ShanChenD3Q19";
00090 
00092     template <typename T>
00093     struct ForcedShanChenD3Q19Descriptor
00094         : public D3Q19DescriptorBase<T>, public ForcedShanChenExternalBase3D
00095     {
00096         static const char name[];
00097     };
00098 
00099     template<typename T>
00100     const char ForcedShanChenD3Q19Descriptor<T>::name[] = "ForcedShanChenD3Q19";
00101 
00102 }  // namespace descriptors
00103 
00104 }  // namespace plb
00105 
00106 #endif  // SHAN_CHEN_LATTICES_3D_H