00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011
00012 #ifndef _INFLOWOUTFLOWIBC_H_
00013 #define _INFLOWOUTFLOWIBC_H_
00014
00015 #include "EBCellFAB.H"
00016 #include "EBISLayout.H"
00017 #include "EBFaceFAB.H"
00018 #include "REAL.H"
00019 #include "EBIBC.H"
00020 #include "EBIBCFactory.H"
00021 #include "LevelData.H"
00022 #include "ProblemDomain.H"
00023 #include "NeumannPoissonDomainBC.H"
00024 #include "DirichletPoissonDomainBC.H"
00025 #include "BaseEBBC.H"
00026 #include "DirichletPoissonEBBC.H"
00027 #include "ExtrapAdvectBC.H"
00028
00029 #include "NamespaceHeader.H"
00030
00032
00036 class InflowOutflowIBC: public EBIBC
00037 {
00038 public:
00040
00043 InflowOutflowIBC(int a_flowDir, Real a_inflowVel, int a_orderEBBC, bool a_doSlipWalls)
00044 {
00045 m_flowDir = a_flowDir;
00046 m_inflowVel = a_inflowVel;
00047 m_orderEBBC = a_orderEBBC;
00048 m_doSlipWalls = a_doSlipWalls;
00049 }
00050
00052 virtual ~InflowOutflowIBC()
00053 {;}
00054
00056 virtual void initializeVelocity(LevelData<EBCellFAB>& a_velocity,
00057 const DisjointBoxLayout& a_grids,
00058 const EBISLayout& a_ebisl,
00059 const ProblemDomain& a_domain,
00060 const RealVect& a_origin,
00061 const Real& a_time,
00062 const RealVect& a_dx) const ;
00063
00065 virtual void initializePressure(LevelData<EBCellFAB>& a_pressure,
00066 const DisjointBoxLayout& a_grids,
00067 const EBISLayout& a_ebisl,
00068 const ProblemDomain& a_domain,
00069 const RealVect& a_origin,
00070 const Real& a_time,
00071 const RealVect& a_dx) const ;
00072
00074 virtual void initializeScalar ( LevelData<EBCellFAB>& a_scalar,
00075 const DisjointBoxLayout& a_grids,
00076 const EBISLayout& a_ebisl,
00077 const ProblemDomain& a_domain,
00078 const RealVect& a_origin,
00079 const Real& a_time,
00080 const RealVect& a_dx) const ;
00081
00083
00086 virtual RefCountedPtr<BaseDomainBCFactory> getPressBC() const ;
00087
00089
00091 virtual RefCountedPtr<BaseDomainBCFactory> getMACVelBC() const ;
00092
00094
00098 virtual RefCountedPtr<EBPhysIBCFactory> getVelAdvectBC(int a_velComp) const ;
00099
00100
00102
00106 virtual RefCountedPtr<EBPhysIBCFactory> getScalarAdvectBC(const int& a_comp) const ;
00107
00108
00110
00112 virtual RefCountedPtr<BaseDomainBCFactory> getVelBC(int a_icomp) const ;
00113
00115
00118 virtual RefCountedPtr<BaseEBBCFactory> getVelocityEBBC(int a_velComp) const ;
00119
00120 virtual RefCountedPtr<BaseEBBCFactory> getPressureEBBC() const ;
00121
00122 protected:
00123 int m_flowDir;
00124 Real m_inflowVel;
00125 int m_orderEBBC;
00126 bool m_doSlipWalls;
00127
00128 private:
00130 InflowOutflowIBC()
00131 {
00132 MayDay::Error("invalid operator");
00133 }
00134 };
00135
00137
00139 class InflowOutflowIBCFactory: public EBIBCFactory
00140 {
00141 public:
00143
00145 InflowOutflowIBCFactory(int a_flowDir, Real a_inflowVel, int a_orderEBBC, bool a_doSlipWalls)
00146 {
00147 m_flowDir = a_flowDir;
00148 m_inflowVel = a_inflowVel;
00149 m_orderEBBC = a_orderEBBC;
00150 m_doSlipWalls = a_doSlipWalls;
00151 }
00152
00154 virtual ~InflowOutflowIBCFactory() {};
00155
00157
00159 virtual EBIBC* create() const
00160 {
00161 InflowOutflowIBC* retDerived = new InflowOutflowIBC(m_flowDir, m_inflowVel, m_orderEBBC, m_doSlipWalls);
00162 EBIBC* retBase = (EBIBC*)retDerived;
00163 return retBase;
00164 }
00165
00166 protected:
00167 int m_flowDir;
00168 Real m_inflowVel;
00169 int m_orderEBBC;
00170 bool m_doSlipWalls;
00171
00172 private:
00174 InflowOutflowIBCFactory()
00175 {
00176 MayDay::Error("invalid operator");
00177 }
00178 };
00179
00180 #include "NamespaceFooter.H"
00181
00182 #endif