/* This file is part of the OpenLB library
*
* Copyright (C) 2006, Orestis Malaspinas and Jonas Latt
* E-mail contact: info@openlb.net
* The most recent release of OpenLB can be downloaded at
*
*
* 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 ZOU_HE_BOUNDARY_2D_HH
#define ZOU_HE_BOUNDARY_2D_HH
#include "zouHeBoundary2D.h"
#include "zouHeDynamics.h"
#include "zouHeDynamics.hh"
#include "boundaryInstantiator2D.h"
namespace olb {
template
class ZouHeBoundaryManager2D {
public:
template static Momenta*
getVelocityBoundaryMomenta();
template static Dynamics*
getVelocityBoundaryDynamics(T omega, Momenta& momenta);
template static PostProcessorGenerator2D*
getVelocityBoundaryProcessor(int x0, int x1, int y0, int y1);
template static Momenta*
getPressureBoundaryMomenta();
template static Dynamics*
getPressureBoundaryDynamics(T omega, Momenta& momenta);
template static PostProcessorGenerator2D*
getPressureBoundaryProcessor(int x0, int x1, int y0, int y1);
template static PostProcessorGenerator2D*
getConvectionBoundaryProcessor(int x0, int x1, int y0, int y1, T* uAv = NULL);
template static Momenta*
getExternalVelocityCornerMomenta();
template static Dynamics*
getExternalVelocityCornerDynamics(T omega, Momenta& momenta);
template static PostProcessorGenerator2D*
getExternalVelocityCornerProcessor(int x, int y);
template static Momenta*
getInternalVelocityCornerMomenta();
template static Dynamics*
getInternalVelocityCornerDynamics(T omega, Momenta& momenta);
template static PostProcessorGenerator2D*
getInternalVelocityCornerProcessor(int x, int y);
};
////////// ZouHeBoundaryManager2D /////////////////////////////////////////
template
template
Momenta*
ZouHeBoundaryManager2D::getVelocityBoundaryMomenta()
{
return new BasicDirichletBM;
}
template
template
Dynamics* ZouHeBoundaryManager2D::
getVelocityBoundaryDynamics(T omega, Momenta& momenta)
{
return new ZouHeDynamics(omega, momenta);
}
template
template
PostProcessorGenerator2D*
ZouHeBoundaryManager2D::
getVelocityBoundaryProcessor(int x0, int x1, int y0, int y1)
{
return nullptr;
}
template
template
Momenta*
ZouHeBoundaryManager2D::getPressureBoundaryMomenta()
{
return new BasicDirichletBM;
}
template
template
Dynamics* ZouHeBoundaryManager2D::
getPressureBoundaryDynamics(T omega, Momenta& momenta)
{
return new ZouHeDynamics(omega, momenta);
}
template
template
PostProcessorGenerator2D*
ZouHeBoundaryManager2D::
getPressureBoundaryProcessor(int x0, int x1, int y0, int y1)
{
return nullptr;
}
template
template
PostProcessorGenerator2D*
ZouHeBoundaryManager2D::
getConvectionBoundaryProcessor(int x0, int x1, int y0, int y1, T* uAv)
{
return nullptr;
}
template
template
Momenta*
ZouHeBoundaryManager2D::getExternalVelocityCornerMomenta()
{
return new FixedVelocityBM;
}
template
template
Dynamics* ZouHeBoundaryManager2D::
getExternalVelocityCornerDynamics(T omega, Momenta& momenta)
{
return new MixinDynamics(omega, momenta);
}
template
template
PostProcessorGenerator2D*
ZouHeBoundaryManager2D::
getExternalVelocityCornerProcessor(int x, int y)
{
return new OuterVelocityCornerProcessorGenerator2D (x,y);
}
template
template
Momenta*
ZouHeBoundaryManager2D::getInternalVelocityCornerMomenta()
{
return new InnerCornerVelBM2D;
}
template
template
Dynamics* ZouHeBoundaryManager2D::
getInternalVelocityCornerDynamics(T omega, Momenta& momenta)
{
return new CombinedRLBdynamics(omega, momenta);
}
template
template
PostProcessorGenerator2D*
ZouHeBoundaryManager2D::getInternalVelocityCornerProcessor
(int x, int y)
{
return nullptr;
}
////////// Factory function //////////////////////////////////////////////////
template
OnLatticeBoundaryCondition2D* createZouHeBoundaryCondition2D(BlockLatticeStructure2D& block)
{
return new BoundaryConditionInstantiator2D <
T, DESCRIPTOR,
ZouHeBoundaryManager2D > (block);
}
} // namespace olb
#endif