00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _DIRICHLETPOISSONDOMAINBC_H_
00012 #define _DIRICHLETPOISSONDOMAINBC_H_
00013
00014 #include "RefCountedPtr.H"
00015 #include "BaseDomainBC.H"
00016 #include "BaseBCValue.H"
00017 #include "NamespaceHeader.H"
00018
00019
00020
00021
00022 class DirichletPoissonDomainBC: public BaseDomainBC
00023 {
00024 public:
00025
00026
00027
00028 DirichletPoissonDomainBC();
00029
00030
00031
00032
00033 virtual ~DirichletPoissonDomainBC();
00034
00035
00036
00037
00038 virtual void setValue(Real a_value);
00039
00040
00041
00042
00043 virtual void setFunction(RefCountedPtr<BaseBCValue> a_func);
00044
00045
00046
00047
00048 virtual void setEBOrder(int a_ebOrder);
00049
00050
00051
00052
00053
00054
00055 virtual void getFaceVel(Real& a_faceFlux,
00056 const FaceIndex& a_face,
00057 const EBFluxFAB& a_vel,
00058 const RealVect& a_probLo,
00059 const RealVect& a_dx,
00060 const int& a_idir,
00061 const int& a_icomp,
00062 const Real& a_time,
00063 const Side::LoHiSide& a_side);
00064
00065
00066
00067
00068 virtual void getFaceFlux(BaseFab<Real>& a_faceFlux,
00069 const BaseFab<Real>& a_phi,
00070 const RealVect& a_probLo,
00071 const RealVect& a_dx,
00072 const int& a_idir,
00073 const Side::LoHiSide& a_side,
00074 const DataIndex& a_dit,
00075 const Real& a_time,
00076 const bool& a_useHomogeneous);
00077
00078
00079
00080
00081 void getHigherOrderFaceFlux(BaseFab<Real>& a_faceFlux,
00082 const BaseFab<Real>& a_phi,
00083 const RealVect& a_probLo,
00084 const RealVect& a_dx,
00085 const int& a_idir,
00086 const Side::LoHiSide& a_side,
00087 const DataIndex& a_dit,
00088 const Real& a_time,
00089 const bool& a_useHomogeneous);
00090
00091
00092
00093
00094
00095 virtual void getFaceFlux(Real& a_faceFlux,
00096 const VolIndex& a_vof,
00097 const int& a_comp,
00098 const EBCellFAB& a_phi,
00099 const RealVect& a_probLo,
00100 const RealVect& a_dx,
00101 const int& a_idir,
00102 const Side::LoHiSide& a_side,
00103 const DataIndex& a_dit,
00104 const Real& a_time,
00105 const bool& a_useHomogeneous);
00106
00107
00108
00109
00110
00111 void getInhomFaceFlux(Real& a_faceFlux,
00112 const VolIndex& a_vof,
00113 const int& a_comp,
00114 const EBCellFAB& a_phi,
00115 const RealVect& a_probLo,
00116 const RealVect& a_dx,
00117 const int& a_idir,
00118 const Side::LoHiSide& a_side,
00119 const DataIndex& a_dit,
00120 const Real& a_time);
00121
00122
00123
00124
00125
00126 bool isDirichletDom(const VolIndex& a_ivof,
00127 const VolIndex& a_jvof,
00128 const EBCellFAB& a_phi) const
00129 {
00130 return true;
00131 }
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141 void getHigherOrderFaceFlux(Real& a_faceFlux,
00142 const VolIndex& a_vof,
00143 const int& a_comp,
00144 const EBCellFAB& a_phi,
00145 const RealVect& a_probLo,
00146 const RealVect& a_dx,
00147 const int& a_idir,
00148 const Side::LoHiSide& a_side,
00149 const DataIndex& a_dit,
00150 const Real& a_time,
00151 const bool& a_useHomogeneous);
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161 void getHigherOrderFaceFlux(Real& a_faceFlux,
00162 const FaceIndex& a_face,
00163 const int& a_comp,
00164 const EBCellFAB& a_phi,
00165 const RealVect& a_probLo,
00166 const RealVect& a_dx,
00167 const int& a_idir,
00168 const Side::LoHiSide& a_side,
00169 const DataIndex& a_dit,
00170 const Real& a_time,
00171 const bool& a_useAreaFrac,
00172 const RealVect& a_centroid,
00173 const bool& a_useHomogeneous);
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183 void getHigherOrderInhomFaceFlux(Real& a_faceFlux,
00184 const VolIndex& a_vof,
00185 const int& a_comp,
00186 const EBCellFAB& a_phi,
00187 const RealVect& a_probLo,
00188 const RealVect& a_dx,
00189 const int& a_idir,
00190 const Side::LoHiSide& a_side,
00191 const DataIndex& a_dit,
00192 const Real& a_time);
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202 void getHigherOrderInhomFaceFlux(Real& a_faceFlux,
00203 const FaceIndex& a_face,
00204 const int& a_comp,
00205 const EBCellFAB& a_phi,
00206 const RealVect& a_probLo,
00207 const RealVect& a_dx,
00208 const int& a_idir,
00209 const Side::LoHiSide& a_side,
00210 const DataIndex& a_dit,
00211 const Real& a_time,
00212 const bool& a_useAreaFrac,
00213 const RealVect& a_centroid);
00214
00215
00216
00217
00218
00219
00220 virtual void getFaceGradPhi(Real& a_faceFlux,
00221 const FaceIndex& a_face,
00222 const int& a_comp,
00223 const EBCellFAB& a_phi,
00224 const RealVect& a_probLo,
00225 const RealVect& a_dx,
00226 const int& a_idir,
00227 const Side::LoHiSide& a_side,
00228 const DataIndex& a_dit,
00229 const Real& a_time,
00230 const bool& a_useAreaFrac,
00231 const RealVect& a_centroid,
00232 const bool& a_useHomogeneous);
00233
00234
00235
00236
00237
00238
00239 void getInhomFaceGradPhi(Real& a_faceFlux,
00240 const FaceIndex& a_face,
00241 const int& a_comp,
00242 const EBCellFAB& a_phi,
00243 const RealVect& a_probLo,
00244 const RealVect& a_dx,
00245 const int& a_idir,
00246 const Side::LoHiSide& a_side,
00247 const DataIndex& a_dit,
00248 const Real& a_time,
00249 const bool& a_useAreaFrac,
00250 const RealVect& a_centroid);
00251
00252 virtual void getFluxStencil( VoFStencil& a_stencil,
00253 const VolIndex& a_vof,
00254 const int& a_comp,
00255 const RealVect& a_dx,
00256 const int& a_idir,
00257 const Side::LoHiSide& a_side,
00258 const EBISBox& a_ebisBox);
00259
00260 virtual void getFluxStencil( VoFStencil& a_stencil,
00261 const FaceIndex& a_face,
00262 const int& a_comp,
00263 const RealVect& a_dx,
00264 const int& a_idir,
00265 const Side::LoHiSide& a_side,
00266 const EBISBox& a_ebisBox);
00267
00268 void getFirstOrderFluxStencil( VoFStencil& a_stencil,
00269 const FaceIndex& a_face,
00270 const int& a_comp,
00271 const RealVect& a_dx,
00272 const int& a_idir,
00273 const Side::LoHiSide& a_side,
00274 const EBISBox& a_ebisBox);
00275
00276 void getSecondOrderFluxStencil( VoFStencil& a_stencil,
00277 const FaceIndex& a_face,
00278 const int& a_comp,
00279 const RealVect& a_dx,
00280 const int& a_idir,
00281 const Side::LoHiSide& a_side,
00282 const EBISBox& a_ebisBox);
00283
00284 bool m_isDefined;
00285
00286 private:
00287 bool m_onlyHomogeneous;
00288 bool m_isFunctional;
00289
00290 Real m_value;
00291 RefCountedPtr<BaseBCValue> m_func;
00292
00293 int m_ebOrder;
00294 };
00295
00296 class DirichletPoissonDomainBCFactory: public BaseDomainBCFactory
00297 {
00298 public:
00299
00300
00301
00302 DirichletPoissonDomainBCFactory();
00303
00304
00305
00306
00307 virtual ~DirichletPoissonDomainBCFactory();
00308
00309
00310
00311
00312 virtual DirichletPoissonDomainBC* create(const ProblemDomain& a_domain,
00313 const EBISLayout& a_layout,
00314 const RealVect& a_dx);
00315
00316
00317
00318
00319 virtual void setValue(Real a_value);
00320
00321
00322
00323
00324 virtual void setFunction(RefCountedPtr<BaseBCValue> a_func);
00325
00326
00327
00328
00329 virtual void setEBOrder(int a_ebOrder);
00330
00331 private:
00332 bool m_onlyHomogeneous;
00333 bool m_isFunctional;
00334
00335 Real m_value;
00336 RefCountedPtr<BaseBCValue> m_func;
00337
00338 int m_ebOrder;
00339 };
00340 #include "NamespaceFooter.H"
00341 #endif