00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _INFLOWOUTFLOWADVECTBC_H_
00012 #define _INFLOWOUTFLOWADVECTBC_H_
00013
00014 #include <iostream>
00015
00016 #include "LevelData.H"
00017 #include "FArrayBox.H"
00018 #include "Vector.H"
00019 #include "RealVect.H"
00020 #include "EBPhysIBC.H"
00021 #include "EBPhysIBCFactory.H"
00022
00023 #include "NamespaceHeader.H"
00024
00026
00031 class InflowOutflowAdvectBC : public EBPhysIBC
00032 {
00033 public:
00034 virtual ~InflowOutflowAdvectBC()
00035 {;}
00036
00038 InflowOutflowAdvectBC(int a_flowDir, Real a_inflowVel, int a_velComp)
00039 {
00040 m_flowDir = a_flowDir;
00041 m_inflowVel = a_inflowVel;
00042 m_velComp = a_velComp;
00043 m_isDefined = false;
00044 }
00045
00047 void define(const ProblemDomain& a_domain,
00048 const RealVect& a_dx)
00049 {
00050 m_domain = a_domain;
00051 m_dx = a_dx;
00052 m_isDefined = true;
00053 }
00054
00056 void fluxBC(EBFluxFAB& a_flux,
00057 const EBCellFAB& a_Wcenter,
00058 const EBCellFAB& a_Wextrap,
00059 const Side::LoHiSide& a_sd,
00060 const Real& a_time,
00061 const EBISBox& a_ebisBox,
00062 const DataIndex& a_dit,
00063 const Box& a_box,
00064 const Box& a_faceBox,
00065 const int& a_dir);
00066
00068 void initialize(LevelData<EBCellFAB>& a_conState,
00069 const EBISLayout& a_ebisl) const
00070 {
00071 MayDay::Error("should not be called");
00072 }
00073
00075 void setBndrySlopes(EBCellFAB& a_deltaPrim,
00076 const EBCellFAB& a_primState,
00077 const EBISBox& a_ebisBox,
00078 const Box& a_box,
00079 const int& a_dir)
00080 {;}
00081
00082
00083 protected:
00084 bool m_isDefined;
00085 int m_velComp;
00086 ProblemDomain m_domain;
00087 RealVect m_dx;
00088 int m_flowDir;
00089 Real m_inflowVel;
00090
00091 private:
00092
00093
00094 InflowOutflowAdvectBC()
00095 {
00096 MayDay::Error("invalid operator");
00097 }
00098
00099 };
00100
00101
00103
00105 class InflowOutflowAdvectBCFactory: public EBPhysIBCFactory
00106 {
00107 public:
00108
00110 ~InflowOutflowAdvectBCFactory()
00111 {;}
00112
00114 InflowOutflowAdvectBCFactory(int a_flowDir, Real a_inflowVel, int a_velComp)
00115 {
00116 m_velComp = a_velComp;
00117 m_flowDir = a_flowDir;
00118 m_inflowVel = a_inflowVel;
00119 }
00120
00122 EBPhysIBC* create() const
00123 {
00124 InflowOutflowAdvectBC* retval = new InflowOutflowAdvectBC(m_flowDir, m_inflowVel, m_velComp);
00125 return static_cast<EBPhysIBC*>(retval);
00126 }
00127
00128
00129 protected:
00130
00131 int m_velComp;
00132 int m_flowDir;
00133 Real m_inflowVel;
00134
00135 private:
00136
00137 InflowOutflowAdvectBCFactory()
00138 {
00139 MayDay::Error("Invalid operator");
00140 }
00141
00142 };
00143
00144 #include "NamespaceFooter.H"
00145
00146 #endif