00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _DIRICHLETCONDUCTIVITYEBBC_H_
00012 #define _DIRICHLETCONDUCTIVITYEBBC_H_
00013
00014 #include "RefCountedPtr.H"
00015
00016 #include "DirichletPoissonEBBC.H"
00017 #include "BaseBCValue.H"
00018 #include "NamespaceHeader.H"
00019
00021
00023 class DirichletConductivityEBBC: public ConductivityBaseEBBC
00024 {
00025 public:
00027 virtual void define(const LayoutData<IntVectSet>& a_cfivs,
00028 const Real& a_factor);
00029
00031 virtual void applyEBFlux(EBCellFAB& a_lphi,
00032 const EBCellFAB& a_phi,
00033 VoFIterator& a_vofit,
00034 const LayoutData<IntVectSet>& a_cfivs,
00035 const DataIndex& a_dit,
00036 const RealVect& a_probLo,
00037 const RealVect& a_dx,
00038 const Real& a_factor,
00039 const bool& a_useHomogeneous,
00040 const Real& a_time);
00041
00043 DirichletConductivityEBBC(const ProblemDomain& a_domain,
00044 const EBISLayout& a_layout,
00045 const RealVect& a_dx,
00046 const IntVect* a_ghostCellsPhi,
00047 const IntVect* a_ghostCellsRhs)
00048
00049 {
00050 m_bc.construct(a_domain, a_layout, a_dx, a_ghostCellsPhi, a_ghostCellsRhs);
00051 }
00052
00053 virtual LayoutData<BaseIVFAB<VoFStencil> >* getFluxStencil(int ivar)
00054 {
00055 return &m_fluxStencil;
00056 }
00057
00059 virtual ~DirichletConductivityEBBC();
00060
00062 virtual void setValue(Real a_value);
00063
00065 virtual int whichBC()
00066 {
00067 return 0;
00068 };
00069
00070 virtual void setOrder(int a_order)
00071 {
00072 m_bc.setOrder(a_order);
00073 }
00074
00076 virtual void setFunction(RefCountedPtr<BaseBCValue> a_flux);
00077
00079 virtual void getEBFlux(Real& a_flux,
00080 const VolIndex& a_vof,
00081 const LevelData<EBCellFAB>& a_phi,
00082 const LayoutData<IntVectSet>& a_cfivs,
00083 const DataIndex& a_dit,
00084 const RealVect& a_probLo,
00085 const RealVect& a_dx,
00086 const bool& a_useHomogeneous,
00087 const Real& a_time,
00088 const pair<int,Real>* a_cacheHint=0 );
00089
00090 private:
00091 DirichletPoissonEBBC m_bc;
00092 LayoutData<BaseIVFAB<VoFStencil> > m_fluxStencil;
00093 };
00094
00096 class DirichletConductivityEBBCFactory: public BaseEBBCFactory
00097 {
00098 public:
00100 DirichletConductivityEBBCFactory();
00101
00103 virtual ~DirichletConductivityEBBCFactory();
00104
00105 virtual void setOrder(int a_order)
00106 {
00107 m_order = a_order;
00108 }
00109
00111 virtual void setValue(Real a_value);
00112
00114 virtual void setFunction(RefCountedPtr<BaseBCValue> a_flux);
00115
00117 virtual DirichletConductivityEBBC* create(const ProblemDomain& a_domain,
00118 const EBISLayout& a_layout,
00119 const RealVect& a_dx,
00120 const IntVect* a_ghostCellsPhi=0,
00121 const IntVect* a_ghostCellsRhs=0);
00122
00123 private:
00124 bool m_onlyHomogeneous;
00125 bool m_isFunction;
00126 int m_order;
00127 Real m_value;
00128 RefCountedPtr<BaseBCValue> m_flux;
00129 };
00130
00131 #include "NamespaceFooter.H"
00132 #endif