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

boundaryCondition2D.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 
00027 #ifndef BOUNDARY_CONDITION_2D_H
00028 #define BOUNDARY_CONDITION_2D_H
00029 
00030 #include "core/globalDefs.h"
00031 #include "boundaryCondition/boundaryCondition.h"
00032 #include "boundaryCondition/finiteDifferenceBoundaryProcessor2D.h"
00033 #include "core/dynamics.h"
00034 
00035 namespace plb {
00036 
00037 template<typename T, template<typename U> class Descriptor> class BlockLattice2D;
00038 template<typename T, template<typename U> class Descriptor> class MultiBlockLattice2D;
00039 
00040 template<typename T, template<typename U> class Descriptor>
00041 class OnLatticeBoundaryCondition2D {
00042 public:
00043     virtual ~OnLatticeBoundaryCondition2D() { }
00044     virtual OnLatticeBoundaryCondition2D<T,Descriptor>* clone() const =0;
00045 
00046     // PART I: Atomic-block version.
00047     
00048     virtual void addVelocityBoundary0N( Box2D domain, BlockLattice2D<T,Descriptor>& lattice,
00049                                         boundary::BcType bcType=boundary::dirichlet ) =0;
00050     virtual void addVelocityBoundary0P( Box2D domain, BlockLattice2D<T,Descriptor>& lattice,
00051                                         boundary::BcType bcType=boundary::dirichlet ) =0;
00052     virtual void addVelocityBoundary1N( Box2D domain, BlockLattice2D<T,Descriptor>& lattice,
00053                                         boundary::BcType bcType=boundary::dirichlet ) =0;
00054     virtual void addVelocityBoundary1P( Box2D domain, BlockLattice2D<T,Descriptor>& lattice,
00055                                         boundary::BcType bcType=boundary::dirichlet ) =0;
00056 
00057     virtual void addPressureBoundary0N( Box2D domain, BlockLattice2D<T,Descriptor>& lattice,
00058                                         boundary::BcType bcType=boundary::dirichlet ) =0;
00059     virtual void addPressureBoundary0P( Box2D domain, BlockLattice2D<T,Descriptor>& lattice,
00060                                         boundary::BcType bcType=boundary::dirichlet ) =0;
00061     virtual void addPressureBoundary1N( Box2D domain, BlockLattice2D<T,Descriptor>& lattice,
00062                                         boundary::BcType bcType=boundary::dirichlet ) =0;
00063     virtual void addPressureBoundary1P( Box2D domain, BlockLattice2D<T,Descriptor>& lattice,
00064                                         boundary::BcType bcType=boundary::dirichlet ) =0;
00065 
00066     virtual void addExternalVelocityCornerNN( plint x, plint y, BlockLattice2D<T,Descriptor>& lattice,
00067                                               boundary::BcType bcType=boundary::dirichlet ) =0;
00068     virtual void addExternalVelocityCornerNP( plint x, plint y, BlockLattice2D<T,Descriptor>& lattice,
00069                                               boundary::BcType bcType=boundary::dirichlet ) =0;
00070     virtual void addExternalVelocityCornerPN( plint x, plint y, BlockLattice2D<T,Descriptor>& lattice,
00071                                               boundary::BcType bcType=boundary::dirichlet ) =0;
00072     virtual void addExternalVelocityCornerPP( plint x, plint y, BlockLattice2D<T,Descriptor>& lattice,
00073                                               boundary::BcType bcType=boundary::dirichlet ) =0;
00074 
00075     virtual void addInternalVelocityCornerNN( plint x, plint y, BlockLattice2D<T,Descriptor>& lattice,
00076                                               boundary::BcType bcType=boundary::dirichlet ) =0;
00077     virtual void addInternalVelocityCornerNP( plint x, plint y, BlockLattice2D<T,Descriptor>& lattice,
00078                                               boundary::BcType bcType=boundary::dirichlet ) =0;
00079     virtual void addInternalVelocityCornerPN( plint x, plint y, BlockLattice2D<T,Descriptor>& lattice,
00080                                               boundary::BcType bcType=boundary::dirichlet ) =0;
00081     virtual void addInternalVelocityCornerPP( plint x, plint y, BlockLattice2D<T,Descriptor>& lattice,
00082                                               boundary::BcType bcType=boundary::dirichlet ) =0;
00083 
00086     void setVelocityConditionOnBlockBoundaries( BlockLattice2D<T,Descriptor>& lattice,
00087                                                 boundary::BcType bcType=boundary::dirichlet );
00088 
00091 
00095     void setVelocityConditionOnBlockBoundaries( BlockLattice2D<T,Descriptor>& lattice,
00096                                                 Box2D applicationDomain,
00097                                                 boundary::BcType bcType=boundary::dirichlet );
00098 
00101     void setVelocityConditionOnBlockBoundaries( BlockLattice2D<T,Descriptor>& lattice,
00102                                                 Box2D block, Box2D applicationDomain,
00103                                                 boundary::BcType bcType=boundary::dirichlet );
00104 
00106 
00109     void setPressureConditionOnBlockBoundaries( BlockLattice2D<T,Descriptor>& lattice,
00110                                                 boundary::BcType bcType=boundary::dirichlet );
00111 
00114 
00120     void setPressureConditionOnBlockBoundaries( BlockLattice2D<T,Descriptor>& lattice,
00121                                                 Box2D applicationDomain,
00122                                                 boundary::BcType bcType=boundary::dirichlet );
00123 
00126 
00129     void setPressureConditionOnBlockBoundaries( BlockLattice2D<T,Descriptor>& lattice,
00130                                                 Box2D block, Box2D applicationDomain,
00131                                                 boundary::BcType bcType=boundary::dirichlet );
00132 
00133 
00134     // PART II: Multi-block version.
00135 
00136     virtual void addVelocityBoundary0N( Box2D domain, MultiBlockLattice2D<T,Descriptor>& lattice,
00137                                         boundary::BcType bcType=boundary::dirichlet ) =0;
00138     virtual void addVelocityBoundary0P( Box2D domain, MultiBlockLattice2D<T,Descriptor>& lattice,
00139                                         boundary::BcType bcType=boundary::dirichlet ) =0;
00140     virtual void addVelocityBoundary1N( Box2D domain, MultiBlockLattice2D<T,Descriptor>& lattice,
00141                                         boundary::BcType bcType=boundary::dirichlet ) =0;
00142     virtual void addVelocityBoundary1P( Box2D domain, MultiBlockLattice2D<T,Descriptor>& lattice,
00143                                         boundary::BcType bcType=boundary::dirichlet ) =0;
00144 
00145     virtual void addPressureBoundary0N( Box2D domain, MultiBlockLattice2D<T,Descriptor>& lattice,
00146                                         boundary::BcType bcType=boundary::dirichlet ) =0;
00147     virtual void addPressureBoundary0P( Box2D domain, MultiBlockLattice2D<T,Descriptor>& lattice,
00148                                         boundary::BcType bcType=boundary::dirichlet ) =0;
00149     virtual void addPressureBoundary1N( Box2D domain, MultiBlockLattice2D<T,Descriptor>& lattice,
00150                                         boundary::BcType bcType=boundary::dirichlet ) =0;
00151     virtual void addPressureBoundary1P( Box2D domain, MultiBlockLattice2D<T,Descriptor>& lattice,
00152                                         boundary::BcType bcType=boundary::dirichlet ) =0;
00153 
00154     virtual void addExternalVelocityCornerNN( plint x, plint y, MultiBlockLattice2D<T,Descriptor>& lattice,
00155                                               boundary::BcType bcType=boundary::dirichlet ) =0;
00156     virtual void addExternalVelocityCornerNP( plint x, plint y, MultiBlockLattice2D<T,Descriptor>& lattice,
00157                                               boundary::BcType bcType=boundary::dirichlet ) =0;
00158     virtual void addExternalVelocityCornerPN( plint x, plint y, MultiBlockLattice2D<T,Descriptor>& lattice,
00159                                               boundary::BcType bcType=boundary::dirichlet ) =0;
00160     virtual void addExternalVelocityCornerPP( plint x, plint y, MultiBlockLattice2D<T,Descriptor>& lattice,
00161                                               boundary::BcType bcType=boundary::dirichlet ) =0;
00162 
00163     virtual void addInternalVelocityCornerNN( plint x, plint y, MultiBlockLattice2D<T,Descriptor>& lattice,
00164                                               boundary::BcType bcType=boundary::dirichlet ) =0;
00165     virtual void addInternalVelocityCornerNP( plint x, plint y, MultiBlockLattice2D<T,Descriptor>& lattice,
00166                                               boundary::BcType bcType=boundary::dirichlet ) =0;
00167     virtual void addInternalVelocityCornerPN( plint x, plint y, MultiBlockLattice2D<T,Descriptor>& lattice,
00168                                               boundary::BcType bcType=boundary::dirichlet ) =0;
00169     virtual void addInternalVelocityCornerPP( plint x, plint y, MultiBlockLattice2D<T,Descriptor>& lattice,
00170                                               boundary::BcType bcType=boundary::dirichlet ) =0;
00171 
00172 
00175     void setVelocityConditionOnBlockBoundaries( MultiBlockLattice2D<T,Descriptor>& lattice,
00176                                                 boundary::BcType bcType=boundary::dirichlet );
00177 
00180 
00184     void setVelocityConditionOnBlockBoundaries( MultiBlockLattice2D<T,Descriptor>& lattice,
00185                                                 Box2D applicationDomain,
00186                                                 boundary::BcType bcType=boundary::dirichlet );
00187 
00190     void setVelocityConditionOnBlockBoundaries( MultiBlockLattice2D<T,Descriptor>& lattice,
00191                                                 Box2D block, Box2D applicationDomain,
00192                                                 boundary::BcType bcType=boundary::dirichlet );
00193 
00195 
00198     void setPressureConditionOnBlockBoundaries( MultiBlockLattice2D<T,Descriptor>& lattice,
00199                                                 boundary::BcType bcType=boundary::dirichlet );
00200 
00203 
00209     void setPressureConditionOnBlockBoundaries( MultiBlockLattice2D<T,Descriptor>& lattice,
00210                                                 Box2D applicationDomain,
00211                                                 boundary::BcType bcType=boundary::dirichlet );
00212 
00215 
00218     void setPressureConditionOnBlockBoundaries( MultiBlockLattice2D<T,Descriptor>& lattice,
00219                                                 Box2D block, Box2D applicationDomain,
00220                                                 boundary::BcType bcType=boundary::dirichlet );
00221 
00222 };
00223 
00224 
00226 
00228 template<typename T, template<typename U> class Descriptor>
00229 OnLatticeBoundaryCondition2D<T,Descriptor>* createLocalBoundaryCondition2D();
00230 
00232 template<typename T, template<typename U> class Descriptor>
00233 OnLatticeBoundaryCondition2D<T,Descriptor>* createDynamicsBasedLocalBoundaryCondition2D();
00234 
00236 template<typename T, template<typename U> class Descriptor>
00237 OnLatticeBoundaryCondition2D<T,Descriptor>* createEquilibriumBoundaryCondition2D();
00238 
00240 template<typename T, template<typename U> class Descriptor>
00241 OnLatticeBoundaryCondition2D<T,Descriptor>* createInterpBoundaryCondition2D();
00242 
00243 }  // namespace plb
00244 
00245 #endif  // BOUNDARY_CONDITION_2D_H