00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _INFLOWOUTFLOWPOISSONDOMAINBC_H_
00012 #define _INFLOWOUTFLOWPOISSONDOMAINBC_H_
00013
00014 #include "RefCountedPtr.H"
00015 #include "BaseDomainBC.H"
00016
00017 #include "NamespaceHeader.H"
00018
00020
00022 class InflowOutflowPoissonDomainBC: public BaseDomainBC
00023 {
00024 public:
00025
00027
00029 virtual ~InflowOutflowPoissonDomainBC()
00030 {;}
00031
00033
00036 virtual void getFaceFlux(BaseFab<Real>& a_faceFlux,
00037 const BaseFab<Real>& a_phi,
00038 const RealVect& a_probLo,
00039 const RealVect& a_dx,
00040 const int& a_idir,
00041 const Side::LoHiSide& a_side,
00042 const DataIndex& a_dit,
00043 const Real& a_time,
00044 const bool& a_useHomogeneous);
00045
00047
00050 virtual void getFaceFlux(Real& a_faceFlux,
00051 const VolIndex& a_vof,
00052 const int& a_comp,
00053 const EBCellFAB& a_phi,
00054 const RealVect& a_probLo,
00055 const RealVect& a_dx,
00056 const int& a_idir,
00057 const Side::LoHiSide& a_side,
00058 const DataIndex& a_dit,
00059 const Real& a_time,
00060 const bool& a_useHomogeneous);
00061
00062 virtual void getFaceGradPhi(Real& a_faceFlux,
00063 const FaceIndex& a_face,
00064 const int& a_comp,
00065 const EBCellFAB& a_phi,
00066 const RealVect& a_probLo,
00067 const RealVect& a_dx,
00068 const int& a_idir,
00069 const Side::LoHiSide& a_side,
00070 const DataIndex& a_dit,
00071 const Real& a_time,
00072 const bool& a_useAreaFrac,
00073 const RealVect& a_centroid,
00074 const bool& a_useHomogeneous);
00075
00077
00081 virtual void getFaceVel(Real& a_faceFlux,
00082 const FaceIndex& a_face,
00083 const EBFluxFAB& a_vel,
00084 const RealVect& a_probLo,
00085 const RealVect& a_dx,
00086 const int& a_idir,
00087 const int& a_icomp,
00088 const Real& a_time,
00089 const Side::LoHiSide& a_side,
00090 const bool& a_doDivFreeOutflow);
00091
00093 InflowOutflowPoissonDomainBC(const int& a_flowDir, const Real& a_inflowVel)
00094 {
00095 m_flowDir = a_flowDir;
00096 m_inflowVel = a_inflowVel;
00097 }
00098
00100
00103 static Real getDivFreeFace(const FaceIndex& a_face,
00104 const VolIndex& a_vof,
00105 const int& a_dir,
00106 const Side::LoHiSide& a_side,
00107 const EBFluxFAB& a_vel,
00108 const RealVect& a_dx,
00109 const EBISBox& a_ebisBox);
00110
00111 private:
00112
00114 InflowOutflowPoissonDomainBC(){;};
00115 int m_flowDir;
00116 Real m_inflowVel;
00117
00118 };
00119
00120 class InflowOutflowPoissonDomainBCFactory: public BaseDomainBCFactory
00121 {
00122 public:
00123
00124
00126
00128 InflowOutflowPoissonDomainBCFactory(const int& a_flowDir, const Real& a_inflowVel)
00129 {
00130 m_flowDir = a_flowDir;
00131 m_inflowVel = a_inflowVel;
00132 }
00133
00134
00136
00138 virtual ~InflowOutflowPoissonDomainBCFactory()
00139 {
00140 }
00141
00143
00145 virtual InflowOutflowPoissonDomainBC* create(const ProblemDomain& a_domain,
00146 const EBISLayout& a_layout,
00147 const RealVect& a_dx)
00148 {
00149 InflowOutflowPoissonDomainBC* newBC = new InflowOutflowPoissonDomainBC(m_flowDir, m_inflowVel);
00150
00151 return newBC;
00152 }
00153
00154
00155 private:
00156 InflowOutflowPoissonDomainBCFactory(){;}
00157
00158 int m_flowDir;
00159 Real m_inflowVel;
00160
00161 };
00162
00163
00164
00166
00168 class InflowOutflowHelmholtzDomainBC: public BaseDomainBC
00169 {
00170 public:
00171
00173
00175 virtual ~InflowOutflowHelmholtzDomainBC()
00176 {;}
00177
00179
00182 virtual void getFaceFlux(BaseFab<Real>& a_faceFlux,
00183 const BaseFab<Real>& a_phi,
00184 const RealVect& a_probLo,
00185 const RealVect& a_dx,
00186 const int& a_idir,
00187 const Side::LoHiSide& a_side,
00188 const DataIndex& a_dit,
00189 const Real& a_time,
00190 const bool& a_useHomogeneous);
00191
00193
00196 virtual void getFaceFlux(Real& a_faceFlux,
00197 const VolIndex& a_vof,
00198 const int& a_comp,
00199 const EBCellFAB& a_phi,
00200 const RealVect& a_probLo,
00201 const RealVect& a_dx,
00202 const int& a_idir,
00203 const Side::LoHiSide& a_side,
00204 const DataIndex& a_dit,
00205 const Real& a_time,
00206 const bool& a_useHomogeneous);
00207
00208 virtual void getFaceGradPhi(Real& a_faceFlux,
00209 const FaceIndex& a_face,
00210 const int& a_comp,
00211 const EBCellFAB& a_phi,
00212 const RealVect& a_probLo,
00213 const RealVect& a_dx,
00214 const int& a_idir,
00215 const Side::LoHiSide& a_side,
00216 const DataIndex& a_dit,
00217 const Real& a_time,
00218 const bool& a_useAreaFrac,
00219 const RealVect& a_centroid,
00220 const bool& a_useHomogeneous);
00221
00223
00227 virtual void getFaceVel(Real& a_faceFlux,
00228 const FaceIndex& a_face,
00229 const EBFluxFAB& a_vel,
00230 const RealVect& a_probLo,
00231 const RealVect& a_dx,
00232 const int& a_idir,
00233 const int& a_icomp,
00234 const Real& a_time,
00235 const Side::LoHiSide& a_side,
00236 const bool& a_doDivFreeOutflow);
00237
00238
00240 InflowOutflowHelmholtzDomainBC(const int& a_flowDir, const Real& a_inflowVel, const bool& a_doSlipWalls)
00241 {
00242 m_flowDir = a_flowDir;
00243 m_inflowVel = a_inflowVel;
00244 m_doSlipWalls = a_doSlipWalls;
00245 }
00246
00247 private:
00248
00249 InflowOutflowHelmholtzDomainBC(){;};
00250
00251 int m_flowDir;
00252 bool m_doSlipWalls;
00253 Real m_inflowVel;
00254 };
00255
00257
00259 class InflowOutflowHelmholtzDomainBCFactory: public BaseDomainBCFactory
00260 {
00261 public:
00262
00264 InflowOutflowHelmholtzDomainBCFactory(const int& a_flowDir, const Real& a_inflowVel, const bool& a_doSlipWalls)
00265 {
00266 m_flowDir = a_flowDir;
00267 m_inflowVel = a_inflowVel;
00268 m_doSlipWalls = a_doSlipWalls;
00269 }
00270
00271
00273
00275 virtual ~InflowOutflowHelmholtzDomainBCFactory()
00276 {
00277 }
00278
00280
00282 virtual InflowOutflowHelmholtzDomainBC* create(const ProblemDomain& a_domain,
00283 const EBISLayout& a_layout,
00284 const RealVect& a_dx)
00285 {
00286 InflowOutflowHelmholtzDomainBC* newBC = new InflowOutflowHelmholtzDomainBC(m_flowDir, m_inflowVel, m_doSlipWalls);
00287
00288 return newBC;
00289 }
00290
00291 private:
00292
00293 InflowOutflowHelmholtzDomainBCFactory(){;}
00294
00295 bool m_doSlipWalls;
00296 int m_flowDir;
00297 Real m_inflowVel;
00298 };
00299
00300 #include "NamespaceFooter.H"
00301
00302 #endif