00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _DIRICHLETCONDUCTIVITYDOMAINBC_H_
00012 #define _DIRICHLETCONDUCTIVITYDOMAINBC_H_
00013
00014 #include "RefCountedPtr.H"
00015
00016 #include "DirichletPoissonDomainBC.H"
00017 #include "BaseBCValue.H"
00018 #include "NamespaceHeader.H"
00019
00020 class DirichletConductivityDomainBC: public ConductivityBaseDomainBC
00021 {
00022 public:
00023 DirichletConductivityDomainBC();
00024
00025 virtual ~DirichletConductivityDomainBC();
00026
00027 virtual void setValue(Real a_value);
00028
00029 virtual int whichBC(int a_idir,
00030 Side::LoHiSide a_side);
00031
00032 virtual void setFunction(RefCountedPtr<BaseBCValue> a_flux);
00033
00034 virtual void getFaceFlux(BaseFab<Real>& a_faceFlux,
00035 const BaseFab<Real>& a_phi,
00036 const RealVect& a_probLo,
00037 const RealVect& a_dx,
00038 const int& a_idir,
00039 const Side::LoHiSide& a_side,
00040 const DataIndex& a_dit,
00041 const Real& a_time,
00042 const bool& a_useHomogeneous);
00043
00044 virtual void getFaceFlux(Real& a_faceFlux,
00045 const VolIndex& a_vof,
00046 const int& a_comp,
00047 const EBCellFAB& a_phi,
00048 const RealVect& a_probLo,
00049 const RealVect& a_dx,
00050 const int& a_idir,
00051 const Side::LoHiSide& a_side,
00052 const DataIndex& a_dit,
00053 const Real& a_time,
00054 const bool& a_useHomogeneous);
00055
00056 virtual void getFaceGradPhi(Real& a_faceFlux,
00057 const FaceIndex& a_face,
00058 const int& a_comp,
00059 const EBCellFAB& a_phi,
00060 const RealVect& a_probLo,
00061 const RealVect& a_dx,
00062 const int& a_idir,
00063 const Side::LoHiSide& a_side,
00064 const DataIndex& a_dit,
00065 const Real& a_time,
00066 const bool& a_useAreaFrac,
00067 const RealVect& a_centroid,
00068 const bool& a_useHomogeneous);
00069
00070 virtual void getFaceVel(Real& a_faceFlux,
00071 const FaceIndex& a_face,
00072 const EBFluxFAB& a_vel,
00073 const RealVect& a_probLo,
00074 const RealVect& a_dx,
00075 const int& a_idir,
00076 const int& a_icomp,
00077 const Real& a_time,
00078 const Side::LoHiSide& a_side,
00079 const bool& a_doDivFreeOutflow);
00080
00081 private:
00082 DirichletPoissonDomainBC m_bc;
00083 };
00084
00085 class DirichletConductivityDomainBCFactory: public BaseDomainBCFactory
00086 {
00087 public:
00088 DirichletConductivityDomainBCFactory();
00089
00090 virtual ~DirichletConductivityDomainBCFactory();
00091
00092 virtual void setValue(Real a_value);
00093
00094 virtual void setFunction(RefCountedPtr<BaseBCValue> a_flux);
00095
00096 virtual DirichletConductivityDomainBC* create(const ProblemDomain& a_domain,
00097 const EBISLayout& a_layout,
00098 const RealVect& a_dx);
00099
00100 private:
00101 bool m_onlyHomogeneous;
00102 bool m_isFunction;
00103
00104 Real m_value;
00105 RefCountedPtr<BaseBCValue> m_flux;
00106 };
00107
00108 #include "NamespaceFooter.H"
00109 #endif