$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 #ifndef FINITE_DIFFERENCE_BOUNDARY_PROCESSOR_3D_H 00026 #define FINITE_DIFFERENCE_BOUNDARY_PROCESSOR_3D_H 00027 00028 #include "core/globalDefs.h" 00029 #include "atomicBlock/dataProcessingFunctional3D.h" 00030 #include "atomicBlock/blockLattice3D.h" 00031 00032 namespace plb { 00033 00039 template<typename T, template<typename U> class Descriptor, int direction, int orientation> 00040 class PlaneFdBoundaryFunctional3D : public BoxProcessingFunctional3D_L<T,Descriptor> 00041 { 00042 public: 00043 virtual void process(Box3D domain, BlockLattice3D<T,Descriptor>& lattice); 00044 virtual PlaneFdBoundaryFunctional3D<T,Descriptor,direction,orientation>* clone() const; 00045 virtual void getTypeOfModification(std::vector<modif::ModifT>& modified) const { 00046 modified[0] = modif::staticVariables; 00047 } 00048 virtual int getStaticId() const { return staticId; } 00049 static const int staticId; 00050 public: 00051 static void processCell(plint iX, plint iY, plint iZ, BlockLattice3D<T,Descriptor>& lattice); 00052 private: 00053 template<int deriveDirection> 00054 static void interpolateGradients ( 00055 BlockLattice3D<T,Descriptor> const& block, 00056 Array<T,Descriptor<T>::d>& velDeriv, plint iX, plint iY, plint iZ ); 00057 }; 00058 00064 template<typename T, template<typename U> class Descriptor, 00065 int plane, int normal1, int normal2> 00066 class OuterVelocityEdgeFunctional3D : public BoxProcessingFunctional3D_L<T,Descriptor> { 00067 public: 00068 enum { direction1 = (plane+1)%3, direction2 = (plane+2)%3 }; 00069 public: 00070 virtual void process(Box3D domain, BlockLattice3D<T,Descriptor>& lattice); 00071 virtual OuterVelocityEdgeFunctional3D<T,Descriptor,plane,normal1,normal2>* clone() const; 00072 virtual void getTypeOfModification(std::vector<modif::ModifT>& modified) const { 00073 modified[0] = modif::staticVariables; 00074 } 00075 virtual int getStaticId() const { return staticId; } 00076 static const int staticId; 00077 public: 00078 static void processCell(plint iX, plint iY, plint iZ, BlockLattice3D<T,Descriptor>& lattice); 00079 private: 00080 static T getNeighborRho(plint x, plint y, plint z, plint step1, plint step2, 00081 BlockLattice3D<T,Descriptor> const& lattice); 00082 template<int deriveDirection, int orientation> 00083 static void interpolateGradients ( 00084 BlockLattice3D<T,Descriptor> const& lattice, 00085 Array<T,Descriptor<T>::d>& velDeriv, plint iX, plint iY, plint iZ ); 00086 }; 00087 00088 template<typename T, template<typename U> class Descriptor, 00089 int xNormal, int yNormal, int zNormal> 00090 class OuterVelocityCornerFunctional3D : public BoxProcessingFunctional3D_L<T,Descriptor> 00091 { 00092 public: 00093 virtual void process(Box3D domain, BlockLattice3D<T,Descriptor>& lattice); 00094 virtual OuterVelocityCornerFunctional3D<T,Descriptor,xNormal,yNormal,zNormal>* clone() const; 00095 virtual void getTypeOfModification(std::vector<modif::ModifT>& modified) const { 00096 modified[0] = modif::staticVariables; 00097 } 00098 virtual int getStaticId() const { return staticId; } 00099 public: 00100 static void processCell(plint iX, plint iY, plint iZ, BlockLattice3D<T,Descriptor>& lattice); 00101 static const int staticId; 00102 }; 00103 00104 } // namespace plb 00105 00106 #endif // FINITE_DIFFERENCE_BOUNDARY_PROCESSOR_3D_H
1.6.3
1.6.3