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

finiteDifferenceBoundaryProcessor2D.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 #ifndef FINITE_DIFFERENCE_BOUNDARY_PROCESSOR_2D_H
00026 #define FINITE_DIFFERENCE_BOUNDARY_PROCESSOR_2D_H
00027 
00028 #include "core/globalDefs.h"
00029 #include "atomicBlock/dataProcessingFunctional2D.h"
00030 #include "atomicBlock/blockLattice2D.h"
00031 
00032 namespace plb {
00033 
00039 template<typename T, template<typename U> class Descriptor, int direction, int orientation>
00040 class StraightFdBoundaryFunctional2D : public BoxProcessingFunctional2D_L<T,Descriptor> {
00041 public:
00042     virtual void process(Box2D domain, BlockLattice2D<T,Descriptor>& lattice);
00043     virtual StraightFdBoundaryFunctional2D<T,Descriptor,direction,orientation>* clone() const;
00044     virtual void getTypeOfModification(std::vector<modif::ModifT>& modified) const {
00045         modified[0] = modif::staticVariables;
00046     }
00047 public:
00048     static void processCell(plint iX, plint iY, BlockLattice2D<T,Descriptor>& lattice);
00049 private:
00050     template<int deriveDirection>
00051     static void interpolateGradients (
00052             BlockLattice2D<T,Descriptor> const& lattice,
00053             Array<T,Descriptor<T>::d>& velDeriv, plint iX, plint iY );
00054     virtual int getStaticId() const { return staticId; }
00055     static const int staticId;
00056 };
00057 
00063 template<typename T, template<typename U> class Descriptor, int xNormal, int yNormal>
00064 class OuterVelocityCornerFunctional2D : public BoxProcessingFunctional2D_L<T,Descriptor>
00065 {
00066 public:
00067     virtual void process(Box2D domain, BlockLattice2D<T,Descriptor>& lattice);
00068     virtual OuterVelocityCornerFunctional2D<T,Descriptor,xNormal,yNormal>* clone() const;
00069     virtual void getTypeOfModification(std::vector<modif::ModifT>& modified) const {
00070         modified[0] = modif::staticVariables;
00071     }
00072     virtual int getStaticId() const { return staticId; }
00073 public:
00074     static void processCell(plint iX, plint iY, BlockLattice2D<T,Descriptor>& lattice);
00075     static const int staticId;
00076 };
00077 
00078 }  // namespace plb
00079 
00080 #endif  // FINITE_DIFFERENCE_BOUNDARY_PROCESSOR_2D_H