00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011
00012 #ifndef _NOFLOWVORTEX_H_
00013 #define _NOFLOWVORTEX_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 "NamespaceHeader.H"
00028
00030
00034 class NoFlowVortex: public EBIBC
00035 {
00036 public:
00038
00042 NoFlowVortex(const RealVect& a_center,
00043 const Real& a_coreRadius,
00044 const Real& a_strength);
00045
00047 virtual ~NoFlowVortex()
00048 {;}
00049
00051
00054 virtual void initializeVelocity(LevelData<EBCellFAB>& a_velocity,
00055 const DisjointBoxLayout& a_grids,
00056 const EBISLayout& a_ebisl,
00057 const ProblemDomain& a_domain,
00058 const RealVect& a_origin,
00059 const Real& a_time,
00060 const RealVect& a_dx) const ;
00061
00063
00066 virtual void initializePressure(LevelData<EBCellFAB>& a_pressure,
00067 const DisjointBoxLayout& a_grids,
00068 const EBISLayout& a_ebisl,
00069 const ProblemDomain& a_domain,
00070 const RealVect& a_origin,
00071 const Real& a_time,
00072 const RealVect& a_dx) const ;
00073
00075
00078 virtual void initializeScalar ( LevelData<EBCellFAB>& a_scalar,
00079 const DisjointBoxLayout& a_grids,
00080 const EBISLayout& a_ebisl,
00081 const ProblemDomain& a_domain,
00082 const RealVect& a_origin,
00083 const Real& a_time,
00084 const RealVect& a_dx) const ;
00085
00086 void getRadius(Real& a_radius,
00087 RealVect& a_xdiff,
00088 const RealVect& a_xval) const;
00089
00090 void getVelPt(RealVect& a_vel, const RealVect& a_xval, Real a_pi) const;
00091
00092
00093 void getScalarPt(Real& a_scal, const RealVect& a_xval) const;
00094
00095 void getXVal(RealVect& a_xval,
00096 const RealVect& a_origin,
00097 const VolIndex& a_vof,
00098 const RealVect& a_dx) const;
00100
00103 virtual RefCountedPtr<BaseDomainBCFactory> getPressBC() const ;
00104
00106
00108 virtual RefCountedPtr<BaseDomainBCFactory> getMACVelBC() const ;
00109
00111
00115 virtual RefCountedPtr<EBPhysIBCFactory> getVelAdvectBC(int a_velComp) const ;
00116
00117
00119
00123 virtual RefCountedPtr<EBPhysIBCFactory> getScalarAdvectBC(const int& a_comp) const ;
00124
00125
00127
00129 virtual RefCountedPtr<BaseDomainBCFactory> getVelBC(int a_icomp) const ;
00130
00132
00135 virtual RefCountedPtr<BaseEBBCFactory> getVelocityEBBC(int a_velComp) const ;
00136
00137 virtual RefCountedPtr<BaseEBBCFactory> getPressureEBBC() const ;
00138 protected:
00139 RealVect m_center;
00140 Real m_coreRadius;
00141 Real m_strength;
00142 RefCountedPtr<BaseDomainBCFactory> m_domBCPress;
00143 RefCountedPtr<BaseDomainBCFactory> m_domBCMACVel;
00144 private:
00146 NoFlowVortex()
00147 {
00148 MayDay::Error("invalid operator");
00149 }
00150
00151 };
00152
00154
00156 class NoFlowVortexFactory: public EBIBCFactory
00157 {
00158 public:
00159
00161
00165 NoFlowVortexFactory(const RealVect& a_center,
00166 const Real& a_coreRadius,
00167 const Real& a_strength)
00168 {
00169 m_center = a_center;
00170 m_coreRadius = a_coreRadius;
00171 m_strength = a_strength;
00172 }
00173
00175 virtual ~NoFlowVortexFactory() {};
00176
00178
00180 virtual EBIBC* create() const
00181 {
00182 NoFlowVortex* retDerived = new NoFlowVortex(m_center,m_coreRadius, m_strength);
00183 EBIBC* retBase = (EBIBC*)retDerived;
00184 return retBase;
00185 }
00186
00187 protected:
00188 RealVect m_center;
00189 Real m_coreRadius;
00190 Real m_strength;
00191 private:
00193 NoFlowVortexFactory()
00194 {
00195 MayDay::Error("invalid operator");
00196 }
00197 };
00198
00199 #include "NamespaceFooter.H"
00200 #endif