📄 advectiondiffusionboundarycondition2d.hh
字号:
/* This file is part of the OpenLB library * * Copyright (C) 2008 Orestis Malaspinas, Andrea Parmigiani * Address: EPFL-STI-LIN Station 9, 1015 Lausanne * E-mail: orestis.malaspinas@epfl.ch * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA.*//** \file * A helper for initialising 2D boundaries -- generic implementation. */#ifndef ADVECTION_DIFFUSION_BOUNDARY_CONDITION_2D_HH#define ADVECTION_DIFFUSION_BOUNDARY_CONDITION_2D_HH#include "advectionDiffusionBoundaries.h"#include "advectionDiffusionBoundaries.hh"#include "advectionDiffusionBoundaryCondition2D.h"#include "advectionDiffusionBoundaryInstantiator2D.h"namespace olb {template<typename T, template<typename U> class Lattice, class MixinDynamics>class AdvectionDiffusionBoundaryManager2D {public: template<int direction, int orientation> static Momenta<T,Lattice>* getTemperatureBoundaryMomenta(); template<int direction, int orientation> static Dynamics<T,Lattice>* getTemperatureBoundaryDynamics(T omega, Momenta<T,Lattice>& momenta); template<int direction, int orientation> static PostProcessorGenerator2D<T,Lattice>* getTemperatureBoundaryProcessor(int x0, int x1, int y0, int y1); template<int xNormal, int yNormal> static Momenta<T,Lattice>* getTemperatureCornerMomenta(); template<int xNormal, int yNormal> static Dynamics<T,Lattice>* getTemperatureCornerDynamics(T omega, Momenta<T,Lattice>& momenta); template<int xNormal, int yNormal> static PostProcessorGenerator2D<T,Lattice>* getTemperatureCornerProcessor(int x, int y);};////////// AdvectionDiffusionBoundaryManager2D /////////////////////////////////////////template<typename T, template<typename U> class Lattice, class MixinDynamics>template<int direction, int orientation>Momenta<T,Lattice>* AdvectionDiffusionBoundaryManager2D<T,Lattice,MixinDynamics>::getTemperatureBoundaryMomenta(){ return new EquilibriumBM<T,Lattice>;}template<typename T, template<typename U> class Lattice, class MixinDynamics>template<int direction, int orientation>Dynamics<T,Lattice>* AdvectionDiffusionBoundaryManager2D<T,Lattice,MixinDynamics>:: getTemperatureBoundaryDynamics(T omega, Momenta<T,Lattice>& momenta){ return new AdvectionDiffusionBoundariesDynamics<T,Lattice,MixinDynamics,direction,orientation>(omega, momenta);}template<typename T, template<typename U> class Lattice, class MixinDynamics>template<int direction, int orientation>PostProcessorGenerator2D<T,Lattice>* AdvectionDiffusionBoundaryManager2D<T,Lattice,MixinDynamics>:: getTemperatureBoundaryProcessor(int x0, int x1, int y0, int y1){ return 0;}//================== Corners ================================template<typename T, template<typename U> class Lattice, class MixinDynamics>template<int xNormal, int yNormal>Momenta<T,Lattice>* AdvectionDiffusionBoundaryManager2D<T,Lattice,MixinDynamics>::getTemperatureCornerMomenta(){ return new EquilibriumBM<T,Lattice>;}template<typename T, template<typename U> class Lattice, class MixinDynamics>template<int xNormal, int yNormal>Dynamics<T,Lattice>* AdvectionDiffusionBoundaryManager2D<T,Lattice,MixinDynamics>:: getTemperatureCornerDynamics(T omega, Momenta<T,Lattice>& momenta){ return new AdvectionDiffusionCornerDynamics2D<T,Lattice,MixinDynamics,xNormal,yNormal>(omega, momenta);}template<typename T, template<typename U> class Lattice, class MixinDynamics>template<int xNormal, int yNormal>PostProcessorGenerator2D<T,Lattice>* AdvectionDiffusionBoundaryManager2D<T,Lattice,MixinDynamics>:: getTemperatureCornerProcessor(int x, int y){ return 0;}////////// Factory functions //////////////////////////////////////////////////template<typename T, template<typename U> class Lattice, typename MixinDynamics>OnLatticeAdvectionDiffusionBoundaryCondition2D<T,Lattice>* createAdvectionDiffusionBoundaryCondition2D(BlockStructure2D<T,Lattice>& block){ return new AdvectionDiffusionBoundaryConditionInstantiator2D<T, Lattice, AdvectionDiffusionBoundaryManager2D<T,Lattice, MixinDynamics> > (block);}} // namespace olb#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -